aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorChrisC <cc697w@intl.att.com>2017-01-31 11:40:03 +0100
committerChrisC <cc697w@intl.att.com>2017-01-31 12:59:33 +0100
commit025301d08b061482c1f046d562bf017c8cbcfe8d (patch)
tree68a2a549736c9bf0f7cd4e71c76e40ef7e2606f2 /bpmn
parent2754ad52f833278a5c925bd788a16d1dce16a598 (diff)
Initial OpenECOMP MSO commit
Change-Id: Ia6a7574859480717402cc2f22534d9973a78fa6d Signed-off-by: ChrisC <cc697w@intl.att.com>
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCockpit/pom.xml66
-rw-r--r--bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml91
-rw-r--r--bpmn/MSOCockpit/src/main/resources/WEB-INF/applicationContext.xml111
-rw-r--r--bpmn/MSOCockpit/src/main/resources/WEB-INF/jboss-deployment-structure.xml34
-rw-r--r--bpmn/MSOCockpit/src/main/resources/WEB-INF/web.xml173
-rw-r--r--bpmn/MSOCoreBPMN/pom.xml181
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BPMNLogger.java33
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BadInjectedFieldException.java52
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java529
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java203
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/LogTask.java98
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldException.java39
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java440
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadConfigTask.java111
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadFileTask.java117
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ResponseBuilder.java297
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java108
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/URNMappingsTask.java32
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java84
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java243
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java443
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java102
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java122
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java424
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java170
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java340
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/CamundaDBSetup.java108
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/PropertyConfigurationSetup.java315
-rw-r--r--bpmn/MSOCoreBPMN/src/main/resources/customMyBatisConfiguration.xml32
-rw-r--r--bpmn/MSOCoreBPMN/src/main/resources/normalize-namespaces.xsl185
-rw-r--r--bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml44
-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.java255
-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.java115
-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.java262
-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.bpmn79
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml77
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/logback-test.xml48
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.properties22
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.urn.properties21
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/request.json28
-rw-r--r--bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF3
-rw-r--r--bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF3
-rw-r--r--bpmn/MSOGammaBPMN/pom.xml325
-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/AbstractServiceTaskProcessor.groovy874
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy382
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy502
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy171
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy202
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy623
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy334
-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/CreateVfModuleInfra.groovy428
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy285
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy326
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy360
-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/DeleteVfModuleInfra.groovy350
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy545
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy250
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy1281
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy284
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy654
-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/DoUpdateVfModule.groovy793
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy509
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy402
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy303
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy276
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy379
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy276
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy178
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy53
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy864
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy1325
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy363
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy368
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy837
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy32
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy330
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy416
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy1664
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy426
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy530
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy95
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy586
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy362
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy417
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy67
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy46
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy34
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java56
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.java139
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java91
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java223
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java129
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java111
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java51
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java22
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java459
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java205
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java61
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java114
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java208
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java490
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java175
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java412
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java177
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java108
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java212
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java61
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java22
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java58
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java255
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java537
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java206
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java302
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java52
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java96
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java188
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java627
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java55
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java69
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java57
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java120
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java27
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml37
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml81
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/logback.xml159
-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/CreateVfModuleInfra.bpmn472
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn480
-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/DeleteVfModuleInfra.bpmn324
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn567
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn458
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn1014
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn275
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn516
-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/DoCreateVfModuleRollback.bpmn520
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn675
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn1102
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn303
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn250
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn321
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn212
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn135
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn810
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn229
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn190
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn519
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn224
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn482
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn287
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn650
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn308
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn216
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn224
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn442
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/urn.properties30
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl233
-rw-r--r--bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml31
-rw-r--r--bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-web.xml26
-rw-r--r--bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml102
-rw-r--r--bpmn/MSORESTClient/pom.xml59
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java143
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HostNameVerifier.java45
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java65
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java618
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTConfig.java131
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTException.java85
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java217
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java140
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java79
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java78
-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.java110
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java78
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java78
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java83
-rw-r--r--bpmn/MSOURN-plugin/build.properties7
-rw-r--r--bpmn/MSOURN-plugin/build.xml60
-rw-r--r--bpmn/MSOURN-plugin/pom.xml72
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java54
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java89
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java44
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java47
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java48
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java98
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java43
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java205
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin1
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml64
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/mappings.xml32
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/dashboard.html63
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/plugin.js132
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/info.txt1
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java40
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java91
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java86
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java78
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java34
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java97
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java85
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java94
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java38
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java119
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java162
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java400
-rw-r--r--bpmn/pom.xml159
243 files changed, 65011 insertions, 0 deletions
diff --git a/bpmn/MSOCockpit/pom.xml b/bpmn/MSOCockpit/pom.xml
new file mode 100644
index 0000000..bac169d
--- /dev/null
+++ b/bpmn/MSOCockpit/pom.xml
@@ -0,0 +1,66 @@
+<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>0.0.4-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>com.att.camunda.bpm.cockpit.plugin</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>
diff --git a/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml b/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml
new file mode 100644
index 0000000..d623aa5
--- /dev/null
+++ b/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml
@@ -0,0 +1,91 @@
+<!--
+ ============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>
diff --git a/bpmn/MSOCockpit/src/main/resources/WEB-INF/applicationContext.xml b/bpmn/MSOCockpit/src/main/resources/WEB-INF/applicationContext.xml
new file mode 100644
index 0000000..fd91391
--- /dev/null
+++ b/bpmn/MSOCockpit/src/main/resources/WEB-INF/applicationContext.xml
@@ -0,0 +1,111 @@
+<!--
+ ============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=========================================================
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:activiti="http://www.activiti.org/schema/spring/components"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+
+ <!--
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
+ <property name="targetDataSource">
+ <bean class="org.apache.commons.dbcp.BasicDataSource">
+ <property name="driverClassName" value="org.h2.Driver" />
+ <property name="url" value="jdbc:h2:mem:process-engine;MVCC=TRUE;TRACE_LEVEL_FILE=0" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </bean>
+ </property>
+ </bean>
+ -->
+
+ <!-- Added for MSO: Use the datasource defined in the JBoss configuration -->
+ <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
+ <property name="jndiName" value="java:jboss/datasources/ProcessEngine"/>
+ </bean>
+
+ <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+ <property name="dataSource" ref="dataSource" />
+ </bean>
+
+ <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
+ <property name="processEngineName" value="default" />
+ <property name="dataSource" ref="dataSource" />
+ <property name="transactionManager" ref="transactionManager" />
+ <property name="databaseSchemaUpdate" value="true" />
+ <property name="jobExecutorActivate" value="false" />
+ <property name="deploymentResources" value="classpath*:bpmn/*.bpmn" />
+ <property name="authorizationEnabled" value="true" />
+ <property name="failedJobCommandFactory">
+ <bean class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
+ </property>
+ <property name="idGenerator">
+ <bean class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" />
+ </property>
+ <property name="processEnginePlugins">
+ <list>
+ <!--<ref bean="ldapIdentityProviderPlugin" />-->
+ <!--<ref bean="administratorAuthorizationPlugin" />-->
+ <bean id="spinPlugin" class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
+ <bean id="connectPlugin" class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
+ </list>
+ </property>
+ <!-- Added for MSO: Set the history level to full -->
+ <property name="historyLevel" value="HISTORY_LEVEL_FULL" />
+ </bean>
+
+ <!-- ldap identity provider (deactivated, uncomment plugin in processEngineConfiguration to activate) -->
+ <bean id="ldapIdentityProviderPlugin" class="org.camunda.bpm.identity.impl.ldap.plugin.LdapIdentityProviderPlugin">
+ <property name="serverUrl" value="ldap://localhost:3433/" />
+ <property name="managerDn" value="uid=daniel,ou=office-berlin,o=camunda,c=org" />
+ <property name="managerPassword" value="daniel" />
+ <property name="baseDn" value="o=camunda,c=org" />
+
+ <property name="userSearchBase" value="" />
+ <property name="userSearchFilter" value="(objectclass=person)" />
+ <property name="userIdAttribute" value="uid" />
+ <property name="userFirstnameAttribute" value="cn" />
+ <property name="userLastnameAttribute" value="sn" />
+ <property name="userEmailAttribute" value="mail" />
+ <property name="userPasswordAttribute" value="userpassword" />
+
+ <property name="groupSearchBase" value="" />
+ <property name="groupSearchFilter" value="(objectclass=groupOfNames)" />
+ <property name="groupIdAttribute" value="ou" />
+ <property name="groupNameAttribute" value="cn" />
+ <property name="groupMemberAttribute" value="member" />
+ </bean>
+
+ <bean id="administratorAuthorizationPlugin" class="org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin">
+ <property name="administratorUserName" value="admin" />
+ </bean>
+
+ <bean id="processEngine" class="org.camunda.bpm.engine.spring.ProcessEngineFactoryBean">
+ <property name="processEngineConfiguration" ref="processEngineConfiguration" />
+ </bean>
+
+ <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
+ <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
+ <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
+ <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
+ <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
+</beans>
diff --git a/bpmn/MSOCockpit/src/main/resources/WEB-INF/jboss-deployment-structure.xml b/bpmn/MSOCockpit/src/main/resources/WEB-INF/jboss-deployment-structure.xml
new file mode 100644
index 0000000..d183019
--- /dev/null
+++ b/bpmn/MSOCockpit/src/main/resources/WEB-INF/jboss-deployment-structure.xml
@@ -0,0 +1,34 @@
+<?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=========================================================
+ -->
+
+<jboss-deployment-structure>
+ <deployment>
+ <exclusions>
+ <module name="org.jboss.resteasy.resteasy-jackson-provider" />
+ <module name="org.jboss.resteasy.resteasy-jettison-provider" />
+
+ <!-- Added for MSO: logging -->
+ <module name="org.apache.log4j" />
+ <module name="org.slf4j" />
+ <module name="org.slf4j.impl" />
+ </exclusions>
+ </deployment>
+</jboss-deployment-structure>
diff --git a/bpmn/MSOCockpit/src/main/resources/WEB-INF/web.xml b/bpmn/MSOCockpit/src/main/resources/WEB-INF/web.xml
new file mode 100644
index 0000000..e9a9498
--- /dev/null
+++ b/bpmn/MSOCockpit/src/main/resources/WEB-INF/web.xml
@@ -0,0 +1,173 @@
+<?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 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">
+ <display-name>camunda bpm webapp</display-name>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/applicationContext.xml</param-value>
+ </context-param>
+
+ <!-- Added for MSO: use our log4j configuration file -->
+ <context-param>
+ <param-name>log.configuration</param-name>
+ <param-value>logback.bpmn.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <!-- cockpit bootstrap listener -->
+ <listener>
+ <listener-class>org.camunda.bpm.cockpit.impl.web.bootstrap.CockpitContainerBootstrap</listener-class>
+ </listener>
+
+ <!-- admin bootstrap listener -->
+ <listener>
+ <listener-class>org.camunda.bpm.admin.impl.web.bootstrap.AdminContainerBootstrap</listener-class>
+ </listener>
+
+ <!-- tasklist bootstrap listener -->
+ <listener>
+ <listener-class>org.camunda.bpm.tasklist.impl.web.bootstrap.TasklistContainerBootstrap</listener-class>
+ </listener>
+
+ <!-- Authentication filter -->
+ <filter>
+ <filter-name>Authentication Filter</filter-name>
+ <filter-class>org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>Authentication Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ </filter-mapping>
+
+ <!-- Security filter -->
+ <filter>
+ <filter-name>SecurityFilter</filter-name>
+ <filter-class>org.camunda.bpm.webapp.impl.security.filter.SecurityFilter</filter-class>
+ <init-param>
+ <param-name>configFile</param-name>
+ <param-value>/WEB-INF/securityFilterRules.json</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>SecurityFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ </filter-mapping>
+
+ <!-- engines filter -->
+ <filter>
+ <filter-name>Engines Filter</filter-name>
+ <filter-class>org.camunda.bpm.webapp.impl.engine.ProcessEnginesFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>Engines Filter</filter-name>
+ <url-pattern>/app/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ </filter-mapping>
+
+ <!-- REST cache control filter -->
+ <filter>
+ <filter-name>CacheControlFilter</filter-name>
+ <filter-class>org.camunda.bpm.engine.rest.filter.CacheControlFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>CacheControlFilter</filter-name>
+ <url-pattern>/api/*</url-pattern>
+ </filter-mapping>
+
+ <!-- cockpit rest api -->
+ <servlet>
+ <servlet-name>Cockpit Api</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.camunda.bpm.cockpit.impl.web.CockpitApplication</param-value>
+ </init-param>
+ <init-param>
+ <param-name>resteasy.servlet.mapping.prefix</param-name>
+ <param-value>/api/cockpit</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Cockpit Api</servlet-name>
+ <url-pattern>/api/cockpit/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- admin rest api -->
+ <servlet>
+ <servlet-name>Admin Api</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.camunda.bpm.admin.impl.web.AdminApplication</param-value>
+ </init-param>
+ <init-param>
+ <param-name>resteasy.servlet.mapping.prefix</param-name>
+ <param-value>/api/admin</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Admin Api</servlet-name>
+ <url-pattern>/api/admin/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- tasklist rest api -->
+ <servlet>
+ <servlet-name>Tasklist Api</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.camunda.bpm.tasklist.impl.web.TasklistApplication</param-value>
+ </init-param>
+ <init-param>
+ <param-name>resteasy.servlet.mapping.prefix</param-name>
+ <param-value>/api/tasklist</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Tasklist Api</servlet-name>
+ <url-pattern>/api/tasklist/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- engine rest api (embedded) -->
+ <servlet>
+ <servlet-name>Engine Api</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.camunda.bpm.webapp.impl.engine.EngineRestApplication</param-value>
+ </init-param>
+ <init-param>
+ <param-name>resteasy.servlet.mapping.prefix</param-name>
+ <param-value>/api/engine</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Engine Api</servlet-name>
+ <url-pattern>/api/engine/*</url-pattern>
+ </servlet-mapping>
+</web-app>
diff --git a/bpmn/MSOCoreBPMN/pom.xml b/bpmn/MSOCoreBPMN/pom.xml
new file mode 100644
index 0000000..db0f7cf
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/pom.xml
@@ -0,0 +1,181 @@
+<?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>0.0.4-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>
+
+ </plugins>
+ </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>
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BPMNLogger.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BPMNLogger.java
new file mode 100644
index 0000000..821380f
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BPMNLogger.java
@@ -0,0 +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 org.openecomp.mso.bpmn.core;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+public class BPMNLogger {
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ public static void debug (String isDebugLogEnabled, String LogText) {
+ if (("true").equalsIgnoreCase(isDebugLogEnabled))
+ msoLogger.debug(LogText);
+ }
+}
+
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BadInjectedFieldException.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BadInjectedFieldException.java
new file mode 100644
index 0000000..84c0954
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BadInjectedFieldException.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.core;
+
+public class BadInjectedFieldException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor.
+ *
+ * @param fieldName the field name
+ * @param taskName the task name
+ * @param info additional information, e.g. the field value
+ */
+ public BadInjectedFieldException(String fieldName, String taskName,
+ Object info) {
+ super(taskName + " injected field '" + fieldName + "' is bad: " + info);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param fieldName the field name
+ * @param taskName the task name
+ * @param info additional information, e.g. the field value
+ * @param cause the cause
+ */
+ public BadInjectedFieldException(String fieldName,
+ String taskName, Object info, Throwable cause) {
+ super(taskName + " injected field '" + fieldName + "' is bad: "
+ + info, cause);
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java
new file mode 100644
index 0000000..849c8ba
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java
@@ -0,0 +1,529 @@
+/*-
+ * ============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 org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+
+/**
+ * Base class for service tasks.
+ */
+public abstract class BaseTask implements JavaDelegate {
+
+ /**
+ * Get the value of a required field. This method throws
+ * MissingInjectedFieldException if the expression is null, and
+ * BadInjectedFieldException if the expression evaluates to a null
+ * value.
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the field value
+ */
+ protected Object getField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ return getFieldImpl(expression, execution, fieldName, false);
+ }
+
+ /**
+ * Gets the value of an optional field. There are three conditions
+ * in which this method returns null:
+ * <p>
+ * <ol>
+ * <li> The expression itself is null (i.e. the field is missing
+ * altogether.</li>
+ * <li>The expression evaluates to a null value.</li>
+ * <li>The expression references a single variable which has not
+ * been set.</li>
+ * </ol>
+ * <p>
+ * Examples:<br>
+ * Expression ${x} when x is null: return null<br>
+ * Expression ${x} when x is unset: return null<br>
+ * Expression ${x+y} when x and/or y are unset: exception<br>
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the field value, possibly null
+ */
+ protected Object getOptionalField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ return getFieldImpl(expression, execution, fieldName, true);
+ }
+
+ /**
+ * Get the value of a required output variable field. This method
+ * throws MissingInjectedFieldException if the expression is null, and
+ * BadInjectedFieldException if the expression produces a null or
+ * illegal variable name. Legal variable names contain only letters,
+ * numbers, and the underscore character ('_').
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the output variable name
+ */
+ protected String getOutputField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ Object o = getFieldImpl(expression, execution, fieldName, false);
+ if (o instanceof String) {
+ String variable = (String) o;
+ if (!isLegalVariable(variable)) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "'" + variable
+ + "' is not a legal variable name");
+ }
+ return variable;
+ } else {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "expected a variable name string"
+ + ", got object of type " + o.getClass().getName());
+ }
+ }
+
+ /**
+ * Get the value of an optional output variable field. This method
+ * throws BadInjectedFieldException if the expression produces an illegal
+ * variable name. Legal variable names contain only letters, numbers,
+ * and the underscore character ('_').
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the output variable name, possibly null
+ */
+ protected String getOptionalOutputField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ Object o = getFieldImpl(expression, execution, fieldName, true);
+ if (o instanceof String) {
+ String variable = (String) o;
+ if (!isLegalVariable(variable)) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "'" + variable
+ + "' is not a legal variable name");
+ }
+ return variable;
+ } else if (o == null) {
+ return null;
+ } else {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "expected a variable name string"
+ + ", got object of type " + o.getClass().getName());
+ }
+ }
+
+ /**
+ * Get the value of a required string field. This method throws
+ * MissingInjectedFieldException if the expression is null, and
+ * BadInjectedFieldException if the expression evaluates to a null
+ * value.
+ * <p>
+ * Note: the result is coerced to a string value, if necessary.
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the field value
+ */
+ protected String getStringField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ Object o = getFieldImpl(expression, execution, fieldName, false);
+ if (o instanceof String) {
+ return (String) o;
+ } else {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "cannot convert '" + o.toString()
+ + "' to Integer");
+ }
+ }
+
+ /**
+ * Gets the value of an optional string field. There are three conditions
+ * in which this method returns null:
+ * <p>
+ * <ol>
+ * <li> The expression itself is null (i.e. the field is missing
+ * altogether.</li>
+ * <li>The expression evaluates to a null value.</li>
+ * <li>The expression references a single variable which has not
+ * been set.</li>
+ * </ol>
+ * <p>
+ * Examples:<br>
+ * Expression ${x} when x is null: return null<br>
+ * Expression ${x} when x is unset: return null<br>
+ * Expression ${x+y} when x and/or y are unset: exception<br>
+ * <p>
+ * Note: the result is coerced to a string value, if necessary.
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the field value, possibly null
+ */
+ protected String getOptionalStringField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ Object o = getFieldImpl(expression, execution, fieldName, true);
+ if (o instanceof String) {
+ return (String) o;
+ } else if (o == null) {
+ return null;
+ } else {
+ return o.toString();
+ }
+ }
+
+ /**
+ * Get the value of a required integer field. This method throws
+ * MissingInjectedFieldException if the expression is null, and
+ * BadInjectedFieldException if the expression evaluates to a null
+ * value or a value that cannot be coerced to an integer.
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the field value
+ */
+ protected Integer getIntegerField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ Object o = getFieldImpl(expression, execution, fieldName, false);
+ if (o instanceof Integer) {
+ return (Integer) o;
+ } else {
+ try {
+ return Integer.parseInt(o.toString());
+ } catch (NumberFormatException e) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "cannot convert '" + o.toString()
+ + "' to Integer");
+ }
+ }
+ }
+
+ /**
+ * Gets the value of an optional integer field. There are three conditions
+ * in which this method returns null:
+ * <p>
+ * <ol>
+ * <li> The expression itself is null (i.e. the field is missing
+ * altogether.</li>
+ * <li>The expression evaluates to a null value.</li>
+ * <li>The expression references a single variable which has not
+ * been set.</li>
+ * </ol>
+ * <p>
+ * Examples:<br>
+ * Expression ${x} when x is null: return null<br>
+ * Expression ${x} when x is unset: return null<br>
+ * Expression ${x+y} when x and/or y are unset: exception<br>
+ * <p>
+ * Note: the result is coerced to an integer value, if necessary. This
+ * method throws BadInjectedFieldException if the result cannot be coerced
+ * to an integer.
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the field value, possibly null
+ */
+ protected Integer getOptionalIntegerField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ Object o = getFieldImpl(expression, execution, fieldName, true);
+ if (o instanceof Integer) {
+ return (Integer) o;
+ } else if (o == null) {
+ return null;
+ } else {
+ try {
+ return Integer.parseInt(o.toString());
+ } catch (NumberFormatException e) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "cannot convert '" + o.toString()
+ + "' to Integer");
+ }
+ }
+ }
+
+ /**
+ * Gets the value of an optional long field. There are three conditions
+ * in which this method returns null:
+ * <p>
+ * <ol>
+ * <li> The expression itself is null (i.e. the field is missing
+ * altogether.</li>
+ * <li>The expression evaluates to a null value.</li>
+ * <li>The expression references a single variable which has not
+ * been set.</li>
+ * </ol>
+ * <p>
+ * Examples:<br>
+ * Expression ${x} when x is null: return null<br>
+ * Expression ${x} when x is unset: return null<br>
+ * Expression ${x+y} when x and/or y are unset: exception<br>
+ * <p>
+ * Note: the result is coerced to a long value, if necessary. This
+ * method throws BadInjectedFieldException if the result cannot be coerced
+ * to a long.
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the field value, possibly null
+ */
+ protected Long getOptionalLongField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ Object o = getFieldImpl(expression, execution, fieldName, true);
+ if (o instanceof Long) {
+ return (Long) o;
+ } else if (o == null) {
+ return null;
+ } else {
+ try {
+ return Long.parseLong(o.toString());
+ } catch (NumberFormatException e) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "cannot convert '" + o.toString()
+ + "' to Long");
+ }
+ }
+ }
+
+ /**
+ * Get the value of a required long field. This method throws
+ * MissingInjectedFieldException if the expression is null, and
+ * BadInjectedFieldException if the expression evaluates to a null
+ * value or a value that cannot be coerced to a long.
+ *
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @return the field value
+ */
+ protected Long getLongField(Expression expression,
+ DelegateExecution execution, String fieldName) {
+ Object o = getFieldImpl(expression, execution, fieldName, false);
+ if (o instanceof Long) {
+ return (Long) o;
+ } else {
+ try {
+ return Long.parseLong(o.toString());
+ } catch (NumberFormatException e) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "cannot convert '" + o.toString()
+ + "' to Long");
+ }
+ }
+ }
+
+ /**
+ * Common implementation for field "getter" methods.
+ * @param expression the expression
+ * @param execution the execution
+ * @param fieldName the field name (for logging and exceptions)
+ * @param optional true if the field is optional
+ * @return the field value, possibly null
+ */
+ private Object getFieldImpl(Expression expression,
+ DelegateExecution execution, String fieldName, boolean optional) {
+ if (expression == null) {
+ if (!optional) {
+ throw new MissingInjectedFieldException(
+ fieldName, getTaskName());
+ }
+ return null;
+ }
+
+ Object value;
+
+ try {
+ value = expression.getValue(execution);
+ } catch (Exception e) {
+ if (!optional) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+ }
+
+ // At this point, we have an exception that occurred while
+ // evaluating an expression for an optional field. A common
+ // problem is that the expression is a simple reference to a
+ // variable which has never been set, e.g. the expression is
+ // ${x}. The normal activiti behavior is to throw an exception,
+ // but we don't like that, so we have the following workaround,
+ // which parses the expression text to see if it is a "simple"
+ // variable reference, and if so, returns null. If the
+ // expression is anything other than a single variable
+ // reference, then an exception is thrown, as it would have
+ // been without this workaround.
+
+ // Get the expression text so we can parse it
+ String s = expression.getExpressionText();
+
+// if (isDebugEnabled(execution)) {
+// logDebug(execution, getTaskName() + " field '" + fieldName
+// + "' expression evaluation failed: " + s);
+// }
+
+ int len = s.length();
+ int i = 0;
+
+ // Skip whitespace
+ while (i < len && Character.isWhitespace(s.charAt(i))) {
+ i++;
+ }
+
+ // Next character must be '$'
+ if (i == len || s.charAt(i++) != '$') {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+ }
+
+ // Skip whitespace
+ while (i < len && Character.isWhitespace(s.charAt(i))) {
+ i++;
+ }
+
+ // Next character must be '{'
+ if (i == len || s.charAt(i++) != '{') {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+ }
+
+ // Skip whitespace
+ while (i < len && Character.isWhitespace(s.charAt(i))) {
+ i++;
+ }
+
+ // Collect the variable name
+ StringBuilder variable = new StringBuilder();
+ while (i < len && isWordCharacter(s.charAt(i))) {
+ variable.append(s.charAt(i));
+ i++;
+ }
+
+ if (variable.length() == 0) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+ }
+
+ // Skip whitespace
+ while (i < len && Character.isWhitespace(s.charAt(i))) {
+ i++;
+ }
+
+ // Next character must be '}'
+ if (i == len || s.charAt(i++) != '}') {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+ }
+
+ // Skip whitespace
+ while (i < len && Character.isWhitespace(s.charAt(i))) {
+ i++;
+ }
+
+ // Must be at end of string
+ if (i != len) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+ }
+
+// if (isDebugEnabled(execution)) {
+// logDebug(execution, "Checking if variable '"
+// + variable.toString() + "' exists");
+// }
+
+ // If the variable exists then the problem was
+ // something else...
+ if (execution.hasVariable(variable.toString())) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+ }
+
+ // The variable doesn't exist.
+
+// if (isDebugEnabled(execution)) {
+// logDebug(execution, "Variable '" + variable.toString()
+// + "' does not exist [ok]");
+// }
+
+ value = null;
+ }
+
+ if (value == null && !optional) {
+ throw new BadInjectedFieldException(
+ fieldName, getTaskName(), "required field has null value");
+ }
+
+ return value;
+ }
+
+ /**
+ * Tests if a character is a "word" character.
+ * @param c the character
+ * @return true if the character is a "word" character.
+ */
+ private boolean isWordCharacter(char c) {
+ return (Character.isLetterOrDigit(c) || c == '_');
+ }
+
+ /**
+ * Tests if the specified string is a legal flow variable name.
+ * @param name the string
+ * @return true if the string is a legal flow variable name
+ */
+ private boolean isLegalVariable(String name) {
+ if (name == null) {
+ return false;
+ }
+
+ int len = name.length();
+
+ if (len == 0) {
+ return false;
+ }
+
+ char c = name.charAt(0);
+
+ if (!Character.isLetter(c) && c != '_') {
+ return false;
+ }
+
+ for (int i = 1; i < len; i++) {
+ c = name.charAt(i);
+ if (!Character.isLetterOrDigit(c) && c != '_') {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns the name of the task (normally the java class name).
+ * @return the name of the task
+ */
+ public String getTaskName() {
+ return getClass().getSimpleName();
+ }
+}
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
new file mode 100644
index 0000000..df62132
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
@@ -0,0 +1,203 @@
+/*-
+ * ============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 org.apache.http.client.config.RequestConfig;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.util.Map;
+import java.util.UUID;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+
+import org.camunda.bpm.engine.ProcessEngines;
+
+@Path("/")
+public class HealthCheckHandler {
+
+ 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 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>";
+ private static final String NOT_HEALTHY = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not available or at least one of the sub-modules is not available.</body></html>";
+ public static final Response HEALTH_CHECK_RESPONSE = Response.status (HttpStatus.SC_OK)
+ .entity (CHECK_HTML)
+ .build ();
+ public static final Response HEALTH_CHECK_NOK_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+ .entity (NOT_HEALTHY)
+ . build ();
+ public static final Response NOT_STARTED_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+ .entity (NOT_FOUND)
+ .build ();
+
+ @HEAD
+ @GET
+ @Path("/healthcheck")
+ @Produces("text/html")
+ public Response healthcheck (@QueryParam("requestId") String requestId) {
+ MsoLogger.setServiceName ("Healthcheck");
+ verifyOldUUID(requestId);
+
+ 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)) {
+ 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;
+ }
+
+ try {
+ ProcessEngines.getDefaultProcessEngine().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);
+
+ msoLogger.debug("Exception while verifying Camunda engine");
+ return NOT_STARTED_RESPONSE;
+ }
+
+ return HEALTH_CHECK_RESPONSE;
+ }
+
+
+ private String verifyOldUUID (String oldId) {
+ if (!isValidUUID(oldId)) {
+ String newId = UUID.randomUUID().toString();
+ MsoLogger.setLogContext(newId, null);
+ return newId;
+ }
+ MsoLogger.setLogContext(oldId, null);
+ return oldId;
+ }
+
+
+ private boolean isValidUUID (String id) {
+ try {
+ if (null == id) {
+ return false;
+ }
+ UUID uuid = UUID.fromString(id);
+ return uuid.toString().equalsIgnoreCase(id);
+ } catch (IllegalArgumentException iae) {
+ return false;
+ }
+ }
+
+ private boolean getSiteStatus (String url, String site) throws Exception {
+ HttpResponse response;
+ // set the connection timeout value to 30 seconds (30000 milliseconds)
+ RequestConfig.Builder requestBuilder = RequestConfig.custom();
+ requestBuilder = requestBuilder.setConnectTimeout(30000);
+ requestBuilder = requestBuilder.setConnectionRequestTimeout(30000);
+ HttpClientBuilder builder = HttpClientBuilder.create ();
+ builder.setDefaultRequestConfig (requestBuilder.build ());
+
+ HttpPost post = new HttpPost(url);
+ 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:Header/>\n");
+ payload.append("<soapenv:Body>\n");
+ payload.append("<req:getSiteStatus>\n");
+ payload.append("<siteName>" + site + "</siteName>\n");
+ payload.append("</req:getSiteStatus>\n");
+ payload.append("</soapenv:Body>\n");
+ payload.append("</soapenv:Envelope>\n");
+
+ msoLogger.debug ("Initialize SOAP request to url:" + url);
+ msoLogger.debug ("The payload of the request is:" + payload);
+ 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) {
+
+ 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);
+
+ Exception e = new Exception("Communication with DB Adapter failed");
+ throw e;
+ }
+ BufferedReader rd = new BufferedReader(
+ new InputStreamReader(response.getEntity().getContent()));
+
+ 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>"));
+
+ return Boolean.valueOf(status);
+ }
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/LogTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/LogTask.java
new file mode 100644
index 0000000..41033d9
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/LogTask.java
@@ -0,0 +1,98 @@
+/*-
+ * ============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 org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Logs a text message. The text may contain variable references.
+ * For example:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;name=$name, address=$address
+ * <p>
+ * Required fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;text: The text to log<br/>
+ * Optional fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;level: The log level (TRACE, DEBUG, INFO, WARN, ERROR)<br/>
+ */
+public class LogTask extends BaseTask {
+
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger();
+
+ private Expression text;
+ private Expression level;
+
+ public void execute(DelegateExecution execution) throws Exception {
+ String theText = getStringField(text, execution, "text");
+
+
+
+ StringBuilder out = new StringBuilder();
+ StringBuilder var = new StringBuilder();
+ boolean inVar = false;
+
+ int pos = 0;
+ int len = theText.length();
+
+ while (pos < len) {
+ char c = theText.charAt(pos++);
+
+ if (inVar && !Character.isLetterOrDigit(c) && c != '_') {
+ if (var.length() > 0) {
+ Object value = execution.getVariable(var.toString());
+
+ if (value != null) {
+ out.append(value.toString());
+ }
+
+ var.setLength(0);
+ }
+
+ inVar = false;
+ }
+
+ if (c == '$') {
+ inVar = true;
+ } else {
+ if (inVar) {
+ var.append(c);
+ } else {
+ out.append(c);
+ }
+ }
+ }
+
+ if (inVar && var.length() > 0) {
+ Object value = execution.getVariable(var.toString());
+ if (value != null) {
+ out.append(value.toString());
+ }
+ }
+
+
+
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldException.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldException.java
new file mode 100644
index 0000000..589a111
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldException.java
@@ -0,0 +1,39 @@
+/*-
+ * ============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;
+
+/**
+ * A BadInjectedFieldException that indicates a required field is missing.
+ */
+public class MissingInjectedFieldException extends BadInjectedFieldException {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor.
+ *
+ * @param fieldName the field name
+ * @param taskName the task name
+ */
+ public MissingInjectedFieldException(String fieldName, String taskName) {
+ super(fieldName, taskName, "missing required field");
+ }
+}
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
new file mode 100644
index 0000000..90df1da
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
@@ -0,0 +1,440 @@
+/*-
+ * ============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 static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.file.ClosedWatchServiceException;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.slf4j.MDC;
+
+import org.openecomp.mso.logger.MessageEnum;
+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).
+ */
+ public static final String MSO_BPMN_PROPERTIES = "mso.bpmn.properties";
+
+ /**
+ * 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 name of the meta-property holding the time the properties were loaded
+ * from the file.
+ */
+ public static final String TIMESTAMP_PROPERTY = "mso.properties.timestamp";
+
+ 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);
+
+ private volatile String msoConfigPath = null;
+
+ private final ConcurrentHashMap<String, Map<String, String>> propFileCache =
+ new ConcurrentHashMap<String, Map<String, String>>();
+
+ private final Object CACHELOCK = new Object();
+ private FileWatcherThread fileWatcherThread = null;
+
+ // 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.
+ */
+ private static class PropertyConfigurationInstanceHolder {
+ private static PropertyConfiguration instance = new PropertyConfiguration();
+ }
+
+ /**
+ * Gets the one and only instance of this class.
+ */
+ public static PropertyConfiguration getInstance() {
+ return PropertyConfigurationInstanceHolder.instance;
+ }
+
+ /**
+ * Returns the list of supported files.
+ */
+ public static List<String> supportedFiles() {
+ return new ArrayList<String>(SUPPORTED_FILES);
+ }
+
+ /**
+ * Private Constructor.
+ */
+ private PropertyConfiguration() {
+ startUp();
+ }
+
+ /**
+ * May be called to restart the PropertyConfiguration if it was previously shut down.
+ */
+ public synchronized void startUp() {
+ msoConfigPath = System.getProperty("mso.config.path");
+
+ if (msoConfigPath == null) {
+ LOGGER.debug("mso.config.path JVM system property is not set");
+ return;
+ }
+
+ try {
+ Path directory = FileSystems.getDefault().getPath(msoConfigPath);
+ WatchService watchService = FileSystems.getDefault().newWatchService();
+ directory.register(watchService, ENTRY_MODIFY);
+
+ LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN", "Starting FileWatcherThread");
+ LOGGER.debug("Starting FileWatcherThread");
+ fileWatcherThread = new FileWatcherThread(watchService);
+ fileWatcherThread.start();
+ } catch (Exception e) {
+ LOGGER.debug("Error occurred while starting FileWatcherThread:", e);
+ LOGGER.error(
+ MessageEnum.BPMN_GENERAL_EXCEPTION,
+ "BPMN",
+ "Property Configuration",
+ MsoLogger.ErrorCode.UnknownError,
+ "Error occurred while starting FileWatcherThread:" + e);
+ }
+ }
+
+ /**
+ * May be called to shut down the PropertyConfiguration. A shutDown followed
+ * by a startUp will reset the PropertyConfiguration to its initial state.
+ */
+ public synchronized void shutDown() {
+ if (fileWatcherThread != null) {
+ LOGGER.debug("Shutting down FileWatcherThread " + System.identityHashCode(fileWatcherThread));
+ fileWatcherThread.shutdown();
+
+ long waitInSeconds = 10;
+
+ try {
+ fileWatcherThread.join(waitInSeconds * 1000);
+ } catch (InterruptedException e) {
+ LOGGER.debug("FileWatcherThread " + System.identityHashCode(fileWatcherThread)
+ + " shutdown did not occur within " + waitInSeconds + " seconds");
+ }
+
+ LOGGER.debug("Finished shutting down FileWatcherThread " + System.identityHashCode(fileWatcherThread));
+ fileWatcherThread = null;
+ }
+
+ clearCache();
+ msoConfigPath = null;
+ }
+
+ public synchronized boolean isFileWatcherRunning() {
+ return fileWatcherThread != null;
+ }
+
+ public void clearCache() {
+ synchronized(CACHELOCK) {
+ propFileCache.clear();
+ }
+ }
+
+ public int cacheSize() {
+ return propFileCache.size();
+ }
+
+ // TODO: throw IOException?
+ public Map<String, String> getProperties(String fileName) {
+ Map<String, String> properties = propFileCache.get(fileName);
+
+ if (properties == null) {
+ if (!SUPPORTED_FILES.contains(fileName)) {
+ throw new IllegalArgumentException("Not a supported property file: " + fileName);
+ }
+
+ if (msoConfigPath == null) {
+ LOGGER.debug("mso.config.path JVM system property must be set to load " + fileName);
+
+ LOGGER.error(
+ MessageEnum.BPMN_GENERAL_EXCEPTION,
+ "BPMN",
+ MDC.get(fileName),
+ MsoLogger.ErrorCode.UnknownError,
+ "mso.config.path JVM system property must be set to load " + fileName);
+
+ return null;
+ }
+
+ try {
+ properties = readProperties(new File(msoConfigPath, fileName));
+ } catch (Exception e) {
+ LOGGER.debug("Error loading " + fileName);
+
+ LOGGER.error(
+ MessageEnum.BPMN_GENERAL_EXCEPTION,
+ "BPMN",
+ MDC.get(fileName),
+ MsoLogger.ErrorCode.UnknownError,
+ "Error loading " + fileName, e);
+
+ return null;
+ }
+ }
+
+ return Collections.unmodifiableMap(properties);
+ }
+
+ /**
+ * Reads properties from the specified file, updates the property file cache, and
+ * returns the properties in a map.
+ * @param file the file to read
+ * @param reload true if this is a reload event
+ * @return a map of properties
+ */
+ private Map<String, String> readProperties(File file) throws IOException {
+ String fileName = file.getName();
+ LOGGER.debug("Reading " + fileName);
+
+ Map<String, String> properties = new HashMap<String, String>();
+ Properties newProperties = new Properties();
+
+ FileReader reader = null;
+ try {
+ reader = new FileReader(file);
+ newProperties.load(reader);
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ LOGGER.debug("Closed " + fileName);
+ } catch (Exception e) {
+ // Ignore
+ }
+ }
+ }
+
+ for (Entry<Object, Object> entry : newProperties.entrySet()) {
+ properties.put(entry.getKey().toString(), entry.getValue().toString());
+ }
+
+ properties.put(TIMESTAMP_PROPERTY, String.valueOf(System.currentTimeMillis()));
+
+ synchronized(CACHELOCK) {
+ propFileCache.put(fileName, properties);
+ }
+
+ return properties;
+ }
+
+ /**
+ * File watcher thread which monitors a directory for file modification.
+ */
+ private class FileWatcherThread extends Thread {
+ private final WatchService watchService;
+ private final Timer timer = new Timer("FileWatcherTimer");
+
+ public FileWatcherThread(WatchService service) {
+ this.watchService = service;
+ }
+
+ public void shutdown() {
+ interrupt();
+ }
+
+ public void run() {
+ LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN",
+ "FileWatcherThread started");
+
+ LOGGER.debug("Started FileWatcherThread " + System.identityHashCode(fileWatcherThread));
+
+ try {
+ WatchKey watchKey = null;
+
+ while (!isInterrupted()) {
+ try {
+ if (watchKey != null) {
+ watchKey.reset();
+ }
+
+ watchKey = watchService.take();
+
+ for (WatchEvent<?> event : watchKey.pollEvents()) {
+ @SuppressWarnings("unchecked")
+ WatchEvent<Path> pathEvent = (WatchEvent<Path>) event;
+
+ if ("EVENT_OVERFLOW".equals(pathEvent.kind())) {
+ LOGGER.debug("Ignored overflow event for " + msoConfigPath);
+ continue;
+ }
+
+ String fileName = pathEvent.context().getFileName().toString();
+
+ if (!SUPPORTED_FILES.contains(fileName)) {
+ LOGGER.debug("Ignored modify event for " + fileName);
+ continue;
+ }
+
+ LOGGER.debug("Configuration file has changed: " + fileName);
+
+ LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN",
+ "Configuation file has changed: " + fileName);
+
+ // There's a potential problem here. The MODIFY event is
+ // triggered as soon as somebody starts writing the file but
+ // there's no obvious way to know when the write is done. If we
+ // read the file while the write is still in progress, then the
+ // cache can really be messed up. As a workaround, we use a timer
+ // to sleep for at least one second, and then we sleep for as long
+ // as it takes for the file's lastModified time to stop changing.
+ // The timer has another benefit: it consolidates multiple events
+ // that we seem to receive when a file is modified.
+
+ synchronized(timerTaskMap) {
+ TimerTask task = timerTaskMap.get(fileName);
+
+ if (task != null) {
+ task.cancel();
+ }
+
+ File file = new File(msoConfigPath, fileName);
+ task = new DelayTimerTask(timer, file, 1000);
+ timerTaskMap.put(fileName, task);
+ }
+ }
+ } catch (InterruptedException e) {
+ break;
+ } catch (ClosedWatchServiceException e) {
+ LOGGER.info(
+ MessageEnum.BPMN_GENERAL_INFO,
+ "BPMN",
+ "FileWatcherThread shut down because the watch service was closed");
+ break;
+ } catch (Exception e) {
+ LOGGER.error(
+ MessageEnum.BPMN_GENERAL_EXCEPTION,
+ "BPMN",
+ "Property Configuration",
+ MsoLogger.ErrorCode.UnknownError,
+ "FileWatcherThread caught unexpected " + e.getClass().getSimpleName(), e);
+ }
+
+ }
+ } finally {
+ timer.cancel();
+
+ synchronized(timerTaskMap) {
+ timerTaskMap.clear();
+ }
+
+ try {
+ watchService.close();
+ } catch (IOException e) {
+ LOGGER.debug("FileWatcherThread caught " + e.getClass().getSimpleName()
+ + " while closing the watch service");
+ }
+
+ LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN",
+ "FileWatcherThread stopped");
+ }
+ }
+ }
+
+ private class DelayTimerTask extends TimerTask {
+ private final File file;
+ private final long lastModifiedTime;
+ private final Timer timer;
+
+ public DelayTimerTask(Timer timer, File file, long delay) {
+ this.timer = timer;
+ this.file = file;
+ this.lastModifiedTime = file.lastModified();
+ timer.schedule(this, delay);
+ }
+
+ @Override
+ public void run() {
+ try {
+ long newLastModifiedTime = file.lastModified();
+
+ if (newLastModifiedTime == lastModifiedTime) {
+ try {
+ readProperties(file);
+ } catch (Exception e) {
+ LOGGER.error(
+ MessageEnum.BPMN_GENERAL_EXCEPTION,
+ "BPMN",
+ "Property Configuration",
+ MsoLogger.ErrorCode.UnknownError,
+ "Unable to reload " + file, e);
+ }
+ } else {
+ LOGGER.debug("Delaying reload of " + file + " by 1 second");
+
+ synchronized(timerTaskMap) {
+ TimerTask task = timerTaskMap.get(file.getName());
+
+ if (task != null && task != this) {
+ task.cancel();
+ }
+
+ task = new DelayTimerTask(timer, file, 1000);
+ timerTaskMap.put(file.getName(), task);
+ }
+ }
+ } finally {
+ synchronized(timerTaskMap) {
+ TimerTask task = timerTaskMap.get(file.getName());
+
+ if (task == this) {
+ timerTaskMap.remove(file.getName());
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadConfigTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadConfigTask.java
new file mode 100644
index 0000000..b46ffcd
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadConfigTask.java
@@ -0,0 +1,111 @@
+/*-
+ * ============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;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Reads the contents of a resource file as a string and stores it in an
+ * execution variable.
+ * <p>
+ * Required fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;file: the resource file path<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;outputVariable: the output variable name<br/>
+ */
+public class ReadConfigTask extends BaseTask {
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static Properties properties = null;
+
+ private Expression propertiesFile;
+
+ public void execute(DelegateExecution execution) throws Exception {
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("Started Executing " + getTaskName());
+ }
+
+ String thePropertiesFile =
+ getStringField(propertiesFile, execution, "propertiesFile");
+
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("propertiesFile = " + thePropertiesFile);
+ }
+
+ Boolean shouldFail = (Boolean) execution.getVariable("shouldFail");
+
+ if (shouldFail != null && shouldFail) {
+ throw new ProcessEngineException(getClass().getSimpleName() + " Failed");
+ }
+
+ synchronized (ReadConfigTask.class) {
+ if (properties == null) {
+ properties = new Properties();
+
+ InputStream stream = null;
+
+ try {
+ stream = getClass().getResourceAsStream(thePropertiesFile);
+
+ if (stream == null) {
+ throw new IOException("Resource not found: " + thePropertiesFile);
+ }
+
+ properties.load(stream);
+
+ stream.close();
+ stream = null;
+
+ } finally {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (Exception e) {
+ // Do nothing
+ }
+ }
+ }
+ }
+ }
+
+ for (Object objectKey : properties.keySet()) {
+ String key = (String) objectKey;
+ String value = properties.getProperty(key);
+
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("Setting variable '" + key + "' to '" + value + "'");
+ }
+
+ execution.setVariable(key, value);
+ }
+
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("Done Executing " + getTaskName());
+ }
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadFileTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadFileTask.java
new file mode 100644
index 0000000..389fdc0
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadFileTask.java
@@ -0,0 +1,117 @@
+/*-
+ * ============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;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Conditionally reads the contents of a resource file as a string and stores it
+ * in an execution variable. The file is read only if the value of the input
+ * variable is null.
+ * <p>
+ * Required fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;file: the resource file path<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;inputVariable: the input variable name<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;outputVariable: the output variable name<br/>
+ */
+public class ReadFileTask extends BaseTask {
+
+ private Expression file;
+ private Expression inputVariable;
+ private Expression outputVariable;
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ public void execute(DelegateExecution execution) throws Exception {
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("Started Executing " + getTaskName());
+ }
+
+ String theInputVariable =
+ getStringField(inputVariable, execution, "inputVariable");
+ String theOutputVariable =
+ getOutputField(outputVariable, execution, "outputVariable");
+ String theFile =getStringField(file, execution, "file");
+
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("inputVariable = " + theInputVariable
+ + " outputVariable = " + theOutputVariable
+ + "file = " + theFile);
+ }
+
+ Boolean shouldFail = (Boolean) execution.getVariable("shouldFail");
+
+ if (shouldFail != null && shouldFail) {
+ throw new ProcessEngineException(getClass().getSimpleName() + " Failed");
+ }
+
+ Object value = execution.getVariable(theInputVariable);
+
+ if (value == null) {
+ InputStream xmlStream = null;
+
+ try {
+ xmlStream = getClass().getResourceAsStream(theFile);
+
+ if (xmlStream == null) {
+ throw new IOException("Resource not found: " + theFile);
+ }
+
+ BufferedReader reader = new BufferedReader(new InputStreamReader(xmlStream));
+ StringBuilder output = new StringBuilder();
+ String line;
+
+ while ((line = reader.readLine()) != null) {
+ output.append(line);
+ }
+
+ xmlStream.close();
+ xmlStream = null;
+
+ value = output.toString();
+
+ } finally {
+ if (xmlStream != null) {
+ try {
+ xmlStream.close();
+ } catch (Exception e) {
+ // Do nothing
+ }
+ }
+ }
+ }
+ execution.setVariable(theInputVariable, value);
+ execution.setVariable(theOutputVariable, value);
+ System.out.println("ServiceInput - " + execution.getVariable("gServiceInput"));
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("Done Executing " + getTaskName());
+ }
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ResponseBuilder.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ResponseBuilder.java
new file mode 100644
index 0000000..632933d
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ResponseBuilder.java
@@ -0,0 +1,297 @@
+/*-
+ * ============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 org.camunda.bpm.engine.delegate.DelegateExecution;
+
+/**
+ * Used in the output variable mapping configuration of subflow call activity
+ * tasks to normalize subflow responses. The output mapping is normally set up
+ * as follows. Note that the order of these mappings is important!
+ * <p>
+ * OUTPUT MAPPING
+ * <pre>
+ * SOURCE EXPRESSION TARGET
+ * ${ResponseBuilder.buildWorkflowException(execution)} WorkflowException
+ * ${ResponseBuilder.buildWorkflowResponse(execution)} SomeResponseVariable
+ * </pre>
+ */
+public class ResponseBuilder implements java.io.Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Creates a WorkflowException using data from the execution variables.
+ * If the variables do not indicate that there was an error, null
+ * is returned.
+ * @param execution the execution
+ */
+ public WorkflowException buildWorkflowException(DelegateExecution execution) {
+
+ String method = getClass().getSimpleName() + ".buildWorkflowException(" +
+ "execution=" + execution.getId() +
+ ")";
+ String isDebugLogEnabled = (String) execution.getVariable("isDebugLogEnabled");
+ logDebug("Entered " + method, isDebugLogEnabled);
+
+ String prefix = (String) execution.getVariable("prefix");
+ String processKey = getProcessKey(execution);
+
+ logDebug("processKey=" + processKey, isDebugLogEnabled);
+
+ // See if there"s already a WorkflowException object in the execution.
+ WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
+
+ if (theException != null) {
+ logDebug("Exited " + method + " - propagated " + theException, isDebugLogEnabled);
+ return theException;
+ }
+
+ // Look in the legacy variables: ErrorResponse and ResponseCode
+
+ String errorResponse = trimString(execution.getVariable(prefix + "ErrorResponse"), null);
+ String responseCode = trimString(execution.getVariable(prefix + "ResponseCode"), null);
+ logDebug("errorResponse=" + errorResponse, isDebugLogEnabled);
+ logDebug("responseCode=" + responseCode, isDebugLogEnabled);
+ if (errorResponse != null || !isOneOf(responseCode, null, "0", "200", "201", "202", "204")) {
+ // This is an error condition. We need to return a WorkflowExcpetion
+
+ if (errorResponse == null) {
+ // No errorResponse string. See if there"s something in the Response variable
+ String response = trimString(execution.getVariable(processKey + "Response"), null);
+ if (response == null) {
+ errorResponse = "Received response code " + responseCode + " from " + processKey;
+ } else {
+ errorResponse = response;
+ }
+ }
+
+ // Some subflows may try to return a WorkflowException as XML in the
+ // errorResponse. If provided, use the errorCode and errorMessage
+ // from the XML
+
+ String maybeXML = removeXMLNamespaces(errorResponse);
+
+ String xmlErrorMessage = trimString(getXMLTextElement(maybeXML, "ErrorMessage"), null);
+ String xmlErrorCode = trimString(getXMLTextElement(maybeXML, "ErrorCode"), null);
+
+ if (xmlErrorMessage != null || xmlErrorCode != null) {
+ logDebug("xmlErrorMessage=" + xmlErrorMessage, isDebugLogEnabled);
+ logDebug("xmlErrorCode=" + xmlErrorCode, isDebugLogEnabled);
+
+ if (xmlErrorMessage == null) {
+ errorResponse = "Received error code " + xmlErrorCode + " from " + processKey;
+ } else {
+ errorResponse = xmlErrorMessage;
+ }
+
+ if (xmlErrorCode != null) {
+ responseCode = xmlErrorCode;
+ }
+ }
+
+ // Convert the responseCode to an integer
+
+ int intResponseCode;
+
+ try {
+ intResponseCode = Integer.valueOf(responseCode);
+ } catch (NumberFormatException e) {
+ // Internal Error
+ intResponseCode = 2000;
+ }
+
+ // Convert 3-digit HTTP response codes (we should not be using them here)
+ // to appropriate 4-digit response codes
+
+ if (intResponseCode < 1000) {
+ if (intResponseCode >= 400 && intResponseCode <= 499) {
+ // Invalid Message
+ intResponseCode = 1002;
+ } else {
+ // Internal Error
+ intResponseCode = 2000;
+ }
+ }
+
+ // Create a new WorkflowException object
+
+ theException = new WorkflowException(processKey, intResponseCode, errorResponse);
+ execution.setVariable("WorkflowException", theException);
+ logDebug("Exited " + method + " - created " + theException, isDebugLogEnabled);
+ return theException;
+ }
+
+ logDebug("Exited " + method + " - no WorkflowException", isDebugLogEnabled);
+ return null;
+ }
+
+ /**
+ * Returns the "Response" variable, unless the execution variables
+ * indicate there was an error. In that case, null is returned.
+ * @param execution the execution
+ */
+ public Object buildWorkflowResponse(DelegateExecution execution) {
+
+ String method = getClass().getSimpleName() + ".buildWorkflowResponse(" +
+ "execution=" + execution.getId() +
+ ")";
+ String isDebugLogEnabled = (String) execution.getVariable("isDebugLogEnabled");
+ logDebug("Entered " + method, isDebugLogEnabled);
+
+ String prefix = (String) execution.getVariable("prefix");
+ String processKey = getProcessKey(execution);
+
+ Object theResponse = null;
+
+ WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
+ String errorResponse = trimString(execution.getVariable(prefix + "ErrorResponse"), null);
+ String responseCode = trimString(execution.getVariable(prefix + "ResponseCode"), null);
+
+ if (theException == null && errorResponse == null &&
+ isOneOf(responseCode, null, "0", "200", "201", "202", "204")) {
+
+ theResponse = execution.getVariable("WorkflowResponse");
+
+ if (theResponse == null) {
+ theResponse = execution.getVariable(processKey + "Response");
+ }
+ }
+
+ logDebug("Exited " + method, isDebugLogEnabled);
+ return theResponse;
+ }
+
+ /**
+ * Checks if the specified item is one of the specified values.
+ * @param item the item
+ * @param values the list of values
+ * @return true if the item is in the list of values
+ */
+ private boolean isOneOf(Object item, Object ... values) {
+ if (values == null) {
+ return item == null;
+ }
+
+ for (Object value : values) {
+ if (value == null) {
+ if (item == null) {
+ return true;
+ }
+ } else {
+ if (value.equals(item)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Creates a string value of the specified object, trimming whitespace in
+ * the process. If the result is null or empty, the specified empty string
+ * value is returned. Otherwise the trimmed value is returned. This method
+ * helps ensure consistent treatment of empty and null strings.
+ * @param object the object to convert (possibly null)
+ * @param emptyStringValue the desired value for empty results
+ */
+ private String trimString(Object object, String emptyStringValue) {
+ if (object == null) {
+ return emptyStringValue;
+ }
+
+ String s = String.valueOf(object).trim();
+ return s.equals("") ? emptyStringValue : s;
+ }
+
+ /**
+ * Returns the process definition key (i.e. the process name) from the
+ * execution.
+ * @param execution the execution
+ */
+ private String getProcessKey(DelegateExecution execution) {
+ Object testKey = execution.getVariable("testProcessKey");
+
+ if (testKey instanceof String) {
+ return (String) testKey;
+ }
+
+ return execution.getProcessEngineServices().getRepositoryService()
+ .getProcessDefinition(execution.getProcessDefinitionId()).getKey();
+ }
+
+ /**
+ * Logs a message at the DEBUG level.
+ * @param message the message
+ * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
+ */
+ private void logDebug(String message, String isDebugLogEnabled) {
+ BPMNLogger.debug(isDebugLogEnabled, message);
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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
+ */
+ private 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);
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
new file mode 100644
index 0000000..1b2bb87
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
@@ -0,0 +1,108 @@
+/*-
+ * ============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.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * An object that stores data for rollbacks. Data is organized by type. A
+ * type is simply a string identifier. Multiple types of data may be stored
+ * in the same object for separate rollback operations.
+ */
+public class RollbackData implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private Map<String, Map<String, Serializable>> dictionary =
+ new HashMap<String, Map<String, Serializable>>();
+
+ /**
+ * Returns true if the specified type is stored in this object.
+ * @param type the data type
+ */
+ public boolean hasType(String type) {
+ return dictionary.containsKey(type);
+ }
+
+ /**
+ * Stores a single item.
+ * @param type the data type
+ * @param key the key
+ * @param value the value
+ */
+ public void put(String type, String key, String value) {
+ Map<String, Serializable> mapForType = dictionary.get(type);
+
+ if (mapForType == null) {
+ mapForType = new HashMap<String, Serializable>();
+ dictionary.put(type, mapForType);
+ }
+
+ mapForType.put(key, value);
+ }
+
+ /**
+ * Gets a single item.
+ * @param type the data type
+ * @param key the key
+ * @return the item or null if there is no item for the specified type and key
+ */
+ public Serializable get(String type, String key) {
+ Map<String, Serializable> mapForType = dictionary.get(type);
+
+ if (mapForType == null) {
+ return null;
+ }
+
+ return mapForType.get(key);
+ }
+
+ /**
+ * Gets a map containing all items associated with the specified data type.
+ * @param type the data type
+ * @return a map, or null if there are no items associated with the specified
+ * data type
+ */
+ public Map<String, Serializable> get(String type) {
+ return dictionary.get(type);
+ }
+
+ /**
+ * Returns a string representation of this object.
+ */
+ public String toString() {
+ StringBuilder out = new StringBuilder();
+ out.append(getClass().getSimpleName());
+ out.append('[');
+ boolean hasOne = false;
+ for (String type : dictionary.keySet()) {
+ if (hasOne) {
+ out.append(',');
+ }
+ out.append(type);
+ out.append(dictionary.get(type));
+ hasOne = true;
+ }
+ out.append(']');
+ return out.toString();
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/URNMappingsTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/URNMappingsTask.java
new file mode 100644
index 0000000..6c6d96a
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/URNMappingsTask.java
@@ -0,0 +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 org.openecomp.mso.bpmn.core;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+
+/**
+ * DEPRECATION WARNING: setting of URN mappings is now done by a plugin.
+ */
+@Deprecated
+public class URNMappingsTask extends BaseTask {
+ public void execute(DelegateExecution execution) throws Exception {
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
new file mode 100644
index 0000000..559ec6d
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
@@ -0,0 +1,84 @@
+/*-
+ * ============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.Serializable;
+
+/**
+ * An object that represents a workflow exception.
+ */
+public class WorkflowException implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final String processKey;
+ private final int errorCode;
+ private final String errorMessage;
+
+ /**
+ * Constructor
+ * @param processKey the process key for the process that generated the exception
+ * @param errorCode the numeric error code (normally 1xxx or greater)
+ * @param errorMessage a short error message
+ */
+ public WorkflowException(String processKey, int errorCode,
+ String errorMessage) {
+ this.processKey = processKey;
+ this.errorCode = errorCode;
+ this.errorMessage = errorMessage;
+ }
+
+ /**
+ * Returns the process key.
+ */
+ public String getProcessKey() {
+ return processKey;
+ }
+
+ /**
+ * Returns the error code.
+ */
+ public int getErrorCode() {
+ return errorCode;
+ }
+
+ /**
+ * Returns the error message.
+ */
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ /**
+ * Returns a string representation of this object.
+ */
+ public String toString() {
+ StringBuilder out = new StringBuilder();
+ out.append(getClass().getSimpleName());
+ out.append("[processKey=");
+ out.append(getProcessKey());
+ out.append(",errorCode=");
+ out.append(getErrorCode());
+ out.append(",errorMessage=");
+ out.append(getErrorMessage());
+ out.append("]");
+ return out.toString();
+ }
+}
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
new file mode 100644
index 0000000..8a7b200
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java
@@ -0,0 +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
+ }
+ }
+ }
+ }
+}
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
new file mode 100644
index 0000000..8329746
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
@@ -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.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;
+ }
+}
+
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
new file mode 100644
index 0000000..3a73155
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
@@ -0,0 +1,102 @@
+/*-
+ * ============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.mybatis;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+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;
+
+
+/**
+ * A special process engine that provides access to MyBatis mappings.
+ * @version 1.0
+ */
+public class CustomMyBatisSessionFactory extends
+ StandaloneProcessEngineConfiguration {
+
+ private String resourceName;
+
+ /**
+ * Overridden to ensure nobody ever tries to initialize this process engine
+ * in the normal way. We are using this process engine only for MyBatis
+ * access.
+ */
+ @Override
+ protected void init() {
+ throw new UnsupportedOperationException("init");
+ }
+
+ /**
+ * Initialize the ProcessEngineConfiguration from an existing one, just
+ * using the database settings to 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/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java
new file mode 100644
index 0000000..07959cb
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java
@@ -0,0 +1,122 @@
+/*-
+ * ============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.mybatis;
+
+/**
+ * A bean that represents a single URN mapping.
+ */
+public class URNMapping {
+ private String name;
+ private String value;
+ private String rev;
+
+ /**
+ * Get the name.
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the name.
+ * @param name the name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Get the value mapped to the name.
+ * @return the value mapped to the name
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Set the value mapped to the name.
+ * @param value the value mapped to the name
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the revision attribute (currently unused).
+ * @return the revision attribute
+ */
+ public String getRev() {
+ return rev;
+ }
+
+ /**
+ * Set the revision attribute (currently unused).
+ * @param rev the revision attribute
+ */
+ public void setRev(String rev) {
+ this.rev = rev;
+ }
+
+ /**
+ * Converts a URN to "normal" form so it can used as a java or groovy
+ * variable identifier. This is done in a way that makes the identifier
+ * as readable as possible, but note that it might result in a loss of
+ * uniqueness.
+ * <ol>
+ * <li> URN_ is prepended </li>
+ * <li> All characters that are not letters or digits are converted to
+ * underscore characters </li>
+ * <li> Sequences of multiple underscores are collapsed to a single
+ * underscore character </li>
+ * </ol>
+ * Examples:
+ * <p>
+ * aai:endpoint becomes URN_aai_endpoint <br/>
+ * ae:internal-reporting becomes URN_ae_internal_reporting <br/>
+ *
+ * @param name the URN
+ * @return a normalized identifier
+ */
+ public static String createIdentifierFromURN(String urn) {
+ StringBuilder builder = new StringBuilder();
+ builder.append("URN_");
+ char last = builder.charAt(builder.length() - 1);
+
+ int len = urn.length();
+
+ for (int i = 0; i < len; i++) {
+ char c = urn.charAt(i);
+
+ if (!Character.isLetterOrDigit(c) && c != '_') {
+ c = '_';
+ }
+
+ if (!(c == '_' && last == '_')) {
+ builder.append(c);
+ }
+
+ last = c;
+ }
+
+ return builder.toString();
+ }
+}
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
new file mode 100644
index 0000000..8e3f254
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -0,0 +1,424 @@
+/*-
+ * ============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.plugins;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
+import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.context.Context;
+import org.camunda.bpm.engine.impl.interceptor.Command;
+import org.camunda.bpm.engine.impl.interceptor.CommandContext;
+import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
+import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
+import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl;
+import org.camunda.bpm.engine.impl.pvm.process.TransitionImpl;
+import org.camunda.bpm.engine.impl.util.xml.Element;
+import org.camunda.bpm.engine.impl.variable.VariableDeclaration;
+
+import org.openecomp.mso.bpmn.core.BPMNLogger;
+import org.openecomp.mso.bpmn.core.PropertyConfiguration;
+import org.openecomp.mso.bpmn.core.mybatis.CustomMyBatisSessionFactory;
+import org.openecomp.mso.bpmn.core.mybatis.URNMapping;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Plugin for MSO logging and URN mapping.
+ */
+public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
+ private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static final String FSPROPKEY = "URNMapping.FileSystemLoading.Enabled";
+
+ @Override
+ public void preInit(
+ ProcessEngineConfigurationImpl processEngineConfiguration) {
+ List<BpmnParseListener> preParseListeners = processEngineConfiguration
+ .getCustomPreBPMNParseListeners();
+ if (preParseListeners == null) {
+ preParseListeners = new ArrayList<BpmnParseListener>();
+ processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
+ }
+ preParseListeners.add(new LoggingParseListener());
+ }
+
+ /**
+ * Called when a process flow is parsed so we can inject listeners.
+ */
+ public static class LoggingParseListener extends AbstractBpmnParseListener {
+ private void injectLogExecutionListener(ActivityImpl activity) {
+ activity.addListener(
+ ExecutionListener.EVENTNAME_END,
+ new LoggingExecutionListener("END"));
+
+ activity.addListener(
+ ExecutionListener.EVENTNAME_START,
+ new LoggingExecutionListener("START"));
+
+ activity.addListener(
+ ExecutionListener.EVENTNAME_TAKE,
+ new LoggingExecutionListener("TAKE"));
+ }
+
+ public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
+ }
+
+ public void parseStartEvent(Element startEventElement, ScopeImpl scope, ActivityImpl startEventActivity) {
+ // Inject these listeners only on the main start event for the flow, not on any embedded subflow start events
+ if (scope instanceof ProcessDefinitionEntity) {
+ startEventActivity.addListener(ExecutionListener.EVENTNAME_START, new URNMappingInitializerListener("START"));
+ startEventActivity.addListener(ExecutionListener.EVENTNAME_START, new LoggingInitializerListener("START"));
+ }
+
+ injectLogExecutionListener(startEventActivity);
+ }
+
+ public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseExclusiveGateway(Element exclusiveGwElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseInclusiveGateway(Element inclusiveGwElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseParallelGateway(Element parallelGwElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseScriptTask(Element scriptTaskElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseBusinessRuleTask(Element businessRuleTaskElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseTask(Element taskElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseManualTask(Element manualTaskElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseEndEvent(Element endEventElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseBoundaryTimerEventDefinition(Element timerEventDefinition, boolean interrupting, ActivityImpl timerActivity) {
+ injectLogExecutionListener(timerActivity);
+ }
+
+ public void parseBoundaryErrorEventDefinition(Element errorEventDefinition, boolean interrupting, ActivityImpl activity, ActivityImpl nestedErrorEventActivity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseSubProcess(Element subProcessElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseCallActivity(Element callActivityElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseProperty(Element propertyElement, VariableDeclaration variableDeclaration, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseSequenceFlow(Element sequenceFlowElement, ScopeImpl scopeElement, TransitionImpl transition) {
+ //injectLogExecutionListener(activity);
+ }
+
+ public void parseSendTask(Element sendTaskElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseMultiInstanceLoopCharacteristics(Element activityElement, Element multiInstanceLoopCharacteristicsElement, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseIntermediateTimerEventDefinition(Element timerEventDefinition, ActivityImpl timerActivity) {
+ injectLogExecutionListener(timerActivity);
+ }
+
+ public void parseRootElement(Element rootElement, List<ProcessDefinitionEntity> processDefinitions) {
+ //injectLogExecutionListener(activity);
+ }
+
+ public void parseReceiveTask(Element receiveTaskElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseIntermediateSignalCatchEventDefinition(Element signalEventDefinition, ActivityImpl signalActivity) {
+ injectLogExecutionListener(signalActivity);
+ }
+
+ public void parseBoundarySignalEventDefinition(Element signalEventDefinition, boolean interrupting, ActivityImpl signalActivity) {
+ injectLogExecutionListener(signalActivity);
+ }
+
+ public void parseEventBasedGateway(Element eventBasedGwElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseTransaction(Element transactionElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseCompensateEventDefinition(Element compensateEventDefinition, ActivityImpl compensationActivity) {
+ injectLogExecutionListener(compensationActivity);
+ }
+
+ public void parseIntermediateThrowEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseIntermediateCatchEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) {
+ injectLogExecutionListener(activity);
+ }
+
+ public void parseBoundaryEvent(Element boundaryEventElement, ScopeImpl scopeElement, ActivityImpl nestedActivity) {
+ injectLogExecutionListener(nestedActivity);
+ }
+
+ public void parseIntermediateMessageCatchEventDefinition(Element messageEventDefinition, ActivityImpl nestedActivity) {
+ injectLogExecutionListener(nestedActivity);
+ }
+
+ public void parseBoundaryMessageEventDefinition(Element element, boolean interrupting, ActivityImpl messageActivity) {
+ injectLogExecutionListener(messageActivity);
+ }
+ }
+
+ /**
+ * Initializes URN mapping variables on process entry.
+ */
+ public static class URNMappingInitializerListener implements ExecutionListener {
+ private String event;
+
+ public URNMappingInitializerListener(String eventData) {
+ this.event = eventData;
+ }
+
+ public String getEvent() {
+ return event;
+ }
+
+ public void notify(DelegateExecution execution) throws Exception {
+ ProcessEngineConfigurationImpl processEngineConfiguration =
+ Context.getProcessEngineConfiguration();
+ loadURNProperties(execution, processEngineConfiguration);
+ }
+
+ private void loadURNProperties(DelegateExecution execution,
+ ProcessEngineConfigurationImpl processEngineConfiguration) {
+ Map<String,String> bpmnProps = PropertyConfiguration.getInstance().getProperties("mso.bpmn.properties");
+ if (bpmnProps == null) {
+ LOGGER.debug("Unable to load mso.bpmn.properties; loading URN Mapping from DB");
+
+ LOGGER.error (MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError,
+ "Unable to load mso.bpmn.properties; loading URN Mapping from DB");
+
+ loadFromDB(execution, processEngineConfiguration);
+ } else {
+ String fsEnabled = bpmnProps.get(FSPROPKEY);
+ if (fsEnabled != null) {
+ if (Boolean.parseBoolean(fsEnabled)) {
+ LOGGER.debug("File system loading is enabled; loading URN properties from File system");
+ LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN", "File system loading is enabled; loading URN properties from File System");
+ loadFromFileSystem(execution);
+ } else {
+ LOGGER.debug("File system loading is disabled; loading URN properties from DB");
+ LOGGER.info (MessageEnum.BPMN_GENERAL_INFO, "BPMN", "File system loading is disabled; loading URN properties from DB");
+
+ loadFromDB(execution, processEngineConfiguration);
+ }
+ } else {
+
+ LOGGER.error (MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError,
+ "Unable to retrieve URNMapping.FileSystemLoading.Enabled from mso.bpmn.properties; loading URN Mapping from DB");
+
+ loadFromDB(execution, processEngineConfiguration);
+ }
+ }
+ }
+
+ private void loadFromFileSystem(DelegateExecution execution) {
+ PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+ Map<String,String> props = propertyConfiguration.getProperties("mso.bpmn.urn.properties");
+ for (String key : props.keySet()) {
+ String varName = URNMapping.createIdentifierFromURN(key);
+ String varValue = props.get(key);
+ execution.setVariable(varName, varValue);
+ }
+ }
+
+ private void loadFromDB(DelegateExecution execution, ProcessEngineConfigurationImpl processEngineConfiguration) {
+ Command<List<URNMapping>> command = new Command<List<URNMapping>>() {
+ @SuppressWarnings("unchecked")
+ public List<URNMapping> execute(CommandContext commandContext) {
+ return (List<URNMapping>) commandContext.getDbSqlSession().selectList(
+ "mso.urnMapping.selectAll", null);
+ }
+ };
+
+ CustomMyBatisSessionFactory sessionFactory = new CustomMyBatisSessionFactory();
+ sessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration,
+ "customMyBatisConfiguration.xml");
+
+ List<URNMapping> mappings = sessionFactory.getCommandExecutorTxRequired().execute(command);
+
+ if (mappings != null && mappings.size() > 0) {
+ for (URNMapping mapping : mappings) {
+ String varName = URNMapping.createIdentifierFromURN(mapping.getName());
+ String varValue = mapping.getValue();
+
+ LOGGER.debug("URN Mapping = '" + mapping.getName()
+ + "', setting variable '" + varName + "' to '" + varValue + "'");
+
+ execution.setVariable(varName, varValue);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the isDebugLogEnabled variable on process entry.
+ */
+ public static class LoggingInitializerListener implements ExecutionListener {
+ private String event;
+
+ public LoggingInitializerListener(String eventData) {
+ this.event = eventData;
+ }
+
+ public String getEvent() {
+ return event;
+ }
+
+ public void notify(DelegateExecution execution) throws Exception {
+ String processKey = execution.getProcessEngineServices().getRepositoryService()
+ .getProcessDefinition(execution.getProcessDefinitionId()).getKey();
+
+ // If a "true" value is already injected, e.g. from a top-level flow, it SHOULD NOT be
+ // overridden by the value in the URN mapping. This allows a top-level flow and all
+ // invoked subflows to be debugged by turning on the debug flag for just the top-level
+ // flow, assuming the isDebugEnabled flag variable is passed from the top-level flow to
+ // its subflows.
+
+ // If a "false" value is already injected, e.g. from a top-level flow, it SHOULD be
+ // overridden by the value in the URN mapping. This allows a subflow to be debugged
+ // without turning on the the debug flag for the top-level flow.
+
+ String injectedValue = (String) execution.getVariable("isDebugLogEnabled");
+ String urnValue = "true".equals(execution.getVariable("URN_log_debug_" + processKey)) ? "true" : "false";
+
+ if ("true".equals(injectedValue)) {
+ LOGGER.debug("Setting isDebugLogEnabled to \"" + injectedValue + "\" for process: " + processKey + " (injected value)");
+ execution.setVariable("isDebugLogEnabled", injectedValue);
+ } else {
+ LOGGER.debug("Setting isDebugLogEnabled to \"" + urnValue + "\" for process: " + processKey + " (from URN mapping)");
+ execution.setVariable("isDebugLogEnabled", urnValue);
+ }
+ }
+ }
+
+ /**
+ * Logs details about the current activity.
+ */
+ public static class LoggingExecutionListener implements ExecutionListener {
+ private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static ConcurrentHashMap<String, Long> startTimes = new ConcurrentHashMap<String, Long>();
+
+ private String event;
+
+ public LoggingExecutionListener(String event) {
+ this.event = event;
+ }
+
+ public String getEvent() {
+ return event;
+ }
+
+ public void notify(DelegateExecution execution) throws Exception {
+ BPMNLogger.debug(
+ (String) execution.getVariable("isDebugLogEnabled"),
+ "Logging for activity---------------:" + event + ":"
+ + execution.getCurrentActivityName()
+ + ", processDefinitionId="
+ + execution.getProcessDefinitionId() + ", activtyId="
+ + execution.getCurrentActivityId() + ", activtyName='"
+ + execution.getCurrentActivityName() + "'"
+ + ", processInstanceId="
+ + execution.getProcessInstanceId() + ", businessKey="
+ + execution.getProcessBusinessKey() + ", executionId="
+ + execution.getId());
+
+ if (!isBlank(execution.getCurrentActivityName())) {
+ try {
+ String id = execution.getId();
+ if ("START".equals(event) && id != null ) {
+ startTimes.put(id, (Long)System.currentTimeMillis());
+ } else if ("END".equals(event) && id != null) {
+ String prefix = (String) execution.getVariable("prefix");
+
+ if (prefix != null ) {
+ 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");
+ MsoLogger.setLogContext(requestId, svcid);
+ long startTime = startTimes.remove(id);
+
+ if (startTime != 0) {
+
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ event + ": " + execution.getCurrentActivityName(), "BPMN", execution.getCurrentActivityName(), null);
+
+ }
+ }
+ } catch(Exception e) {
+ // Do nothing
+ }
+ }
+ }
+
+ private boolean isBlank(Object object) {
+ return object == null || object.toString().trim().equals("");
+ }
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
new file mode 100644
index 0000000..10386d7
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
@@ -0,0 +1,170 @@
+/*-
+ * ============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.plugins;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior;
+import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.FieldDeclaration;
+import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
+import org.camunda.bpm.engine.impl.pvm.PvmTransition;
+import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
+import org.camunda.bpm.engine.impl.pvm.process.TransitionImpl;
+import org.camunda.bpm.engine.impl.util.xml.Element;
+
+import org.openecomp.mso.bpmn.core.BPMNLogger;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * This plugin does the following:
+ * <ol>
+ * <li>
+ * Adds logic at the start of every Call Activity to remove any existing
+ * WorkflowException object from the execution (saving a copy of it in a
+ * different variable).
+ * </li>
+ * <li>
+ * Adds logic at the end of every Call Activity to generate a MSOWorkflowException
+ * event if there is a WorkflowException object in the execution.
+ * </li>
+ * </ol>
+ */
+public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
+
+ @Override
+ public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
+ List<BpmnParseListener> preParseListeners =
+ processEngineConfiguration.getCustomPreBPMNParseListeners();
+
+ if (preParseListeners == null) {
+ preParseListeners = new ArrayList<BpmnParseListener>();
+ processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
+ }
+
+ preParseListeners.add(new WorkflowExceptionParseListener());
+ }
+
+ public static class WorkflowExceptionParseListener extends AbstractBpmnParseListener {
+ @Override
+ public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
+ AtomicInteger triggerTaskIndex = new AtomicInteger(1);
+ List<ActivityImpl> activities = new ArrayList<ActivityImpl>(processDefinition.getActivities());
+ recurse(activities, triggerTaskIndex);
+ }
+
+ /**
+ * Helper method that recurses (into subprocesses) over all the listed activities.
+ * @param activities a list of workflow activities
+ * @param triggerTaskIndex the index of the next trigger task (mutable)
+ */
+ private void recurse(List<ActivityImpl> activities, AtomicInteger triggerTaskIndex) {
+ for (ActivityImpl activity : activities) {
+ String type = (String) activity.getProperty("type");
+
+ if ("callActivity".equals(type)) {
+ // Add a WorkflowExceptionResetListener to clear the WorkflowException
+ // variable when each Call Activity starts.
+
+ activity.addListener(
+ ExecutionListener.EVENTNAME_START,
+ new WorkflowExceptionResetListener());
+
+ // Add a WorkflowExceptionTriggerTask after the call activity.
+ // It must be a task because a listener cannot be used to generate
+ // an event. Throwing BpmnError from an execution listener will
+ // cause the process to die.
+
+ List<PvmTransition> outTransitions =
+ new ArrayList<PvmTransition>(activity.getOutgoingTransitions());
+
+ for (PvmTransition transition : outTransitions) {
+ String triggerTaskId = "WorkflowExceptionTriggerTask_" + triggerTaskIndex;
+
+ ActivityImpl triggerTask = activity.getFlowScope().createActivity(triggerTaskId);
+
+ ClassDelegateActivityBehavior behavior = new ClassDelegateActivityBehavior(
+ WorkflowExceptionTriggerTask.class.getName(),
+ new ArrayList<FieldDeclaration>(0));
+
+ triggerTask.setActivityBehavior(behavior);
+ triggerTask.setName("Workflow Exception Trigger Task " + triggerTaskIndex);
+ triggerTaskIndex.getAndIncrement();
+
+ TransitionImpl transitionImpl = (TransitionImpl) transition;
+ TransitionImpl triggerTaskOutTransition = triggerTask.createOutgoingTransition();
+ triggerTaskOutTransition.setDestination((ActivityImpl)transitionImpl.getDestination());
+ transitionImpl.setDestination(triggerTask);
+ }
+ } else if ("subProcess".equals(type)) {
+ recurse(new ArrayList<ActivityImpl>(activity.getActivities()), triggerTaskIndex);
+ }
+ }
+ }
+ }
+
+ /**
+ * If there is a WorkflowException object in the execution, this method
+ * removes it (saving a copy of it in a different variable).
+ */
+ public static class WorkflowExceptionResetListener implements ExecutionListener {
+ public void notify(DelegateExecution execution) throws Exception {
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ int index = 1;
+ String saveName = "SavedWorkflowException" + index;
+ while (execution.getVariable(saveName) != null) {
+ saveName = "SavedWorkflowException" + (++index);
+ }
+
+ BPMNLogger.debug((String)execution.getVariable("isDebugLogEnabled"),
+ "WorkflowExceptionResetTask is moving WorkflowException to " + saveName);
+
+ execution.setVariable(saveName, workflowException);
+ execution.setVariable("WorkflowException", null);
+ }
+ }
+ }
+
+ /**
+ * Generates an MSOWorkflowException event if there is a WorkflowException
+ * object in the execution.
+ */
+ public static class WorkflowExceptionTriggerTask implements JavaDelegate {
+ public void execute(DelegateExecution execution) throws Exception {
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ BPMNLogger.debug((String)execution.getVariable("isDebugLogEnabled"),
+ "WorkflowExceptionTriggerTask is generating a MSOWorkflowException event");
+ throw new BpmnError("MSOWorkflowException");
+ }
+ }
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java
new file mode 100644
index 0000000..4211475
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java
@@ -0,0 +1,340 @@
+/*-
+ * ============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.xml;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * XML transformation methods and other useful functions.
+ */
+public final class XmlTool {
+
+ private static final Map<String, Integer> ENTITIES = new HashMap<String, Integer>();
+
+ static {
+ ENTITIES.put("amp", new Integer(38));
+ ENTITIES.put("quot", new Integer(34));
+ ENTITIES.put("lt", new Integer(60));
+ ENTITIES.put("gt", new Integer(62));
+ }
+
+ /**
+ * Normalizes and formats XML. This method consolidates and moves all namespace
+ * declarations to the root element. The result will not have an XML prolog or
+ * a trailing newline.
+ * @param xml the XML to normalize
+ * @throws IOException
+ * @throws TransformerException
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws XPathExpressionException
+ */
+ public static String normalize(Object xml) throws IOException, TransformerException,
+ ParserConfigurationException, SAXException, XPathExpressionException {
+
+ if (xml == null) {
+ return null;
+ }
+
+ Source xsltSource = new StreamSource(new StringReader(
+ readResourceFile("normalize-namespaces.xsl")));
+
+ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+ dbFactory.setNamespaceAware(true);
+ DocumentBuilder db = dbFactory.newDocumentBuilder();
+ InputSource source = new InputSource(new StringReader(String.valueOf(xml)));
+ Document doc = db.parse(source);
+
+ // Start of code to remove whitespace outside of tags
+ XPath xPath = XPathFactory.newInstance().newXPath();
+ NodeList nodeList = (NodeList) xPath.evaluate(
+ "//text()[normalize-space()='']", doc, XPathConstants.NODESET);
+
+ for (int i = 0; i < nodeList.getLength(); ++i) {
+ Node node = nodeList.item(i);
+ node.getParentNode().removeChild(node);
+ }
+ // End of code to remove whitespace outside of tags
+
+ // the factory pattern supports different XSLT processors
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ Transformer transformer = transformerFactory.newTransformer(xsltSource);
+
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
+
+ StringWriter writer = new StringWriter();
+ transformer.transform(new DOMSource(doc), new StreamResult(writer));
+ return writer.toString().trim();
+ }
+
+ /**
+ * Encodes a value so it can be used inside an XML text element.
+ * @param s the string to encode
+ * @return the encoded string
+ */
+ public static String encode(Object value) {
+ if (value == null) {
+ return null;
+ }
+
+ String s = String.valueOf(value);
+ StringBuilder out = new StringBuilder();
+ boolean modified = false;
+
+ for (int i = 0; i < s.length(); i++) {
+ char c = s.charAt(i);
+
+ if (c == '<') {
+ out.append("&lt;");
+ modified = true;
+ } else if (c == '>') {
+ out.append("&gt;");
+ modified = true;
+ } else if (c == '&') {
+ out.append("&amp;");
+ modified = true;
+ } else if (c < 32 || c > 126) {
+ out.append("&#" + (int)c + ";");
+ modified = true;
+ } else {
+ out.append(c);
+ }
+ }
+
+ if (modified) {
+ return out.toString();
+ } else {
+ return s;
+ }
+ }
+
+ /**
+ * Encodes a value so it can be used inside an XML attribute.
+ * @param s the string to encode
+ * @return the encoded string
+ */
+ public static String encodeAttr(Object value) {
+ if (value == null) {
+ return null;
+ }
+
+ String s = String.valueOf(value);
+ StringBuilder out = new StringBuilder();
+ boolean modified = false;
+
+ for (int i = 0; i < s.length(); i++) {
+ char c = s.charAt(i);
+
+ if (c == '<') {
+ out.append("&lt;");
+ modified = true;
+ } else if (c == '>') {
+ out.append("&gt;");
+ modified = true;
+ } else if (c == '"') {
+ out.append("&quot;");
+ modified = true;
+ } else if (c == '&') {
+ out.append("&amp;");
+ modified = true;
+ } else if (c < 32 || c > 126) {
+ out.append("&#" + (int)c + ";");
+ modified = true;
+ } else {
+ out.append(c);
+ }
+ }
+
+ if (modified) {
+ return out.toString();
+ } else {
+ return s;
+ }
+ }
+
+ /**
+ * Decodes XML entities in a string value
+ * @param value a value with embedded XML entities
+ * @return the decoded string
+ */
+ public static String decode(Object value) {
+ if (value == null) {
+ return null;
+ }
+
+ String s = String.valueOf(value);
+
+ StringBuilder out = new StringBuilder(s.length());
+ int ampIndex = s.indexOf("&");
+ int lastEnd = 0;
+
+ while (ampIndex >= 0) {
+ int nextAmpIndex = s.indexOf("&", ampIndex + 1);
+ int nextSemiIndex = s.indexOf(";", ampIndex + 1);
+ if (nextSemiIndex != -1 && (nextAmpIndex == -1 || nextSemiIndex < nextAmpIndex)) {
+ int code = -1;
+ String entity = s.substring(ampIndex + 1, nextSemiIndex);
+
+ try {
+ if (entity.startsWith("#")) {
+ code = Integer.parseInt(entity.substring(1), 10);
+ } else {
+ if (ENTITIES.containsKey(entity)) {
+ code = ENTITIES.get(entity);
+ }
+ }
+ } catch (NumberFormatException x) {
+ // Do nothing
+ }
+
+ out.append(s.substring(lastEnd, ampIndex));
+ lastEnd = nextSemiIndex + 1;
+ if (code >= 0 && code <= 0xffff) {
+ out.append((char) code);
+ } else {
+ out.append("&");
+ out.append(entity);
+ out.append(";");
+ }
+ }
+
+ ampIndex = nextAmpIndex;
+ }
+
+ out.append(s.substring(lastEnd));
+ return out.toString();
+ }
+
+ /**
+ * Removes the preamble, if present, from an XML document.
+ * @param xml the XML document
+ * @return a possibly modified document
+ */
+ public static String removePreamble(Object xml) {
+ if (xml == null) {
+ return null;
+ }
+
+ return String.valueOf(xml).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "");
+ }
+
+ /**
+ * Removes namespaces and namespace declarations from an XML document.
+ * @param xml the XML document
+ * @return a possibly modified document
+ */
+ public static String removeNamespaces(Object xml) {
+ if (xml == null) {
+ return null;
+ }
+
+ String text = String.valueOf(xml);
+
+ // remove xmlns declaration
+ text = text.replaceAll("xmlns.*?(\"|\').*?(\"|\')", "");
+ // remove opening tag prefix
+ text = text.replaceAll("(<)(\\w+:)(.*?>)", "$1$3");
+ // remove closing tags prefix
+ text = text.replaceAll("(</)(\\w+:)(.*?>)", "$1$3");
+ // remove extra spaces left when xmlns declarations are removed
+ text = text.replaceAll("\\s+>", ">");
+
+ return text;
+ }
+
+
+ /**
+ * Reads the specified resource file and return the contents as a string.
+ * @param file 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
+ */
+ private static String readResourceFile(String file) throws IOException {
+ InputStream stream = null;
+ try {
+ stream = XmlTool.class.getClassLoader().getResourceAsStream(file);
+
+ if (stream == null) {
+ throw new FileNotFoundException("No such resource file: " + file);
+ }
+
+ Reader reader = new InputStreamReader(stream, "UTF-8");
+ StringBuilder out = new StringBuilder();
+ char[] buf = new char[1024];
+ int n;
+
+ while ((n = reader.read(buf)) >= 0) {
+ out.append(buf, 0, n);
+ }
+
+ stream.close();
+ stream = null;
+ return out.toString();
+ } finally {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (Exception e) {
+ // Ignore
+ }
+ }
+ }
+ }
+
+ /**
+ * Instantiation is not allowed.
+ */
+ private XmlTool() {
+ }
+}
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/test/CamundaDBSetup.java
new file mode 100644
index 0000000..13eed2d
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/CamundaDBSetup.java
@@ -0,0 +1,108 @@
+/*-
+ * ============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;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+/**
+ * Sets up the unit test (H2) database for Camunda.
+ */
+public class CamundaDBSetup {
+ private static boolean isDBConfigured = false;
+
+ public static synchronized void configure() throws SQLException {
+ if (isDBConfigured) {
+ return;
+ }
+
+ System.out.println("Configuring the Camunda H2 database for MSO");
+
+ Connection connection = null;
+ PreparedStatement stmt = null;
+
+ try {
+ connection = DriverManager.getConnection(
+ "jdbc:h2:mem:camunda;DB_CLOSE_DELAY=-1", "sa", "");
+
+ stmt = connection.prepareStatement("delete from ACT_HI_VARINST");
+ stmt.executeUpdate();
+ stmt.close();
+ stmt = null;
+
+ stmt = connection.prepareStatement("ALTER TABLE ACT_HI_VARINST alter column TEXT_ 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();
+ stmt.close();
+ stmt = null;
+
+ stmt = connection.prepareStatement("ALTER TABLE ACT_HI_DETAIL alter column TEXT_ 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();
+ stmt.close();
+ stmt = null;
+
+ connection.close();
+ connection = null;
+
+ isDBConfigured = true;
+ } catch (SQLException e) {
+ System.out.println("CamundaDBSetup caught " + e.getClass().getSimpleName());
+ e.printStackTrace();
+ } finally {
+ if (stmt != null) {
+ try {
+ stmt.close();
+ } catch (Exception e) {
+ // Ignore
+ }
+ }
+
+ if (connection != null) {
+ try {
+ connection.close();
+ } catch (Exception e) {
+ // Ignore
+ }
+ }
+ }
+ }
+}
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/test/PropertyConfigurationSetup.java
new file mode 100644
index 0000000..6f1cd7d
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/PropertyConfigurationSetup.java
@@ -0,0 +1,315 @@
+/*-
+ * ============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;
+
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.openecomp.mso.bpmn.core.PropertyConfiguration;
+
+/**
+ * Sets up mso.bpmn.properties and mso.bpmn.urn.properties for unit tests.
+ */
+public class PropertyConfigurationSetup {
+
+ private static Path msoConfigPath = null;
+ private static Path bpmnPropertiesPath = null;
+ private static Path bpmnUrnPropertiesPath = null;
+ private static boolean modifiedConfiguration = false;
+
+ /**
+ * Ensures that the the PropertyConfiguration is initialized and that the
+ * property data is reset to initial values. Any extra properties that are
+ * specified will be merged with the initial values. The following example
+ * shows how a test can specify a replacement URN mapping property.
+ * <pre>
+ * Map<String, String> urnProperties =
+ * PropertyConfigurationSetup.createBpmnUrnProperties();
+ * urnProperties.add("mso.po.timeout", "PT1M");
+ * PropertyConfiguration.init(urnProperties);
+ * </pre>
+ * @param args one or more maps created with createBpmnProperties()
+ * and/or createBpmnUrnProperties()
+ */
+ public static synchronized void init(Object ... args) throws IOException {
+
+ Map<String, String> extraBpmnProperties = null;
+ Map<String, String> extraBpmnUrnProperties = null;
+
+ boolean propertiesSpecified = false;
+
+ for (Object arg : args) {
+ @SuppressWarnings("unchecked")
+ Map<String, String> properties = (Map<String, String>) arg;
+
+ String type = properties.get("PROPERTIES-TYPE");
+
+ if (PropertyConfiguration.MSO_BPMN_PROPERTIES.equals(type)) {
+ if (properties.size() > 1) {
+ extraBpmnProperties = properties;
+ propertiesSpecified = false;
+ }
+ } else if (PropertyConfiguration.MSO_BPMN_URN_PROPERTIES.equals(type)) {
+ if (properties.size() > 1) {
+ extraBpmnUrnProperties = properties;
+ propertiesSpecified = false;
+ }
+ } else {
+ throw new IllegalArgumentException("Not a supported PROPERTIES-TYPE map");
+ }
+ }
+
+ // There are three cases in which we need to change the existing configuration:
+ // 1) There is no existing configuration, i.e. first time setup
+ // 2) The existing configuration was modified, i.e. it has non-default values
+ // 3) Non-default values are specified for this initialization
+
+ if (msoConfigPath == null || modifiedConfiguration || propertiesSpecified) {
+ modifiedConfiguration = propertiesSpecified;
+
+ Path bpmnPropertiesSourcePath = Paths.get("src", "test", "resources", "mso.bpmn.properties");
+ Path bpmnUrnPropertiesSourcePath = Paths.get("src", "test", "resources", "mso.bpmn.urn.properties");
+
+ if (msoConfigPath == null) {
+ // Initialize from scratch.
+ msoConfigPath = Files.createTempDirectory("mso-config-path-");
+ System.setProperty("mso.config.path", msoConfigPath.toString());
+ msoConfigPath.toFile().deleteOnExit();
+
+ bpmnPropertiesPath = msoConfigPath.resolve("mso.bpmn.properties");
+ mergeCopy(bpmnPropertiesSourcePath, extraBpmnProperties, bpmnPropertiesPath);
+ bpmnPropertiesPath.toFile().deleteOnExit();
+
+ bpmnUrnPropertiesPath = msoConfigPath.resolve("mso.bpmn.urn.properties");
+ mergeCopy(bpmnUrnPropertiesSourcePath, extraBpmnUrnProperties, bpmnUrnPropertiesPath);
+ bpmnUrnPropertiesPath.toFile().deleteOnExit();
+
+ PropertyConfiguration.getInstance();
+ } else {
+ // Just reset the data.
+ PropertyConfiguration.getInstance().clearCache();
+ mergeCopy(bpmnPropertiesSourcePath, extraBpmnProperties, bpmnPropertiesPath);
+ mergeCopy(bpmnUrnPropertiesSourcePath, extraBpmnUrnProperties, bpmnUrnPropertiesPath);
+ }
+ }
+ }
+
+ /**
+ * Resets the PropertyConfiguration to its initial state, as if it had never
+ * been started. Note that this is a very expensive option and should not
+ * be needed by most unit tests.
+ * @throws IOException
+ */
+ public static synchronized void nuke() throws IOException {
+ if (msoConfigPath == null) {
+ return;
+ }
+
+ PropertyConfiguration.getInstance().shutDown();
+
+ bpmnUrnPropertiesPath.toFile().delete();
+ bpmnUrnPropertiesPath = null;
+
+ bpmnPropertiesPath.toFile().delete();
+ bpmnPropertiesPath = null;
+
+ msoConfigPath.toFile().delete();
+ msoConfigPath = null;
+
+ System.setProperty("mso.config.path", null);
+
+ modifiedConfiguration = false;
+ }
+
+ /**
+ * Create a map to hold properties to be added to mso.bpmn.properties.
+ */
+ public static Map<String, String> createBpmnProperties() {
+ Map<String, String> properties = new HashMap<String, String>();
+ properties.put("PROPERTIES-TYPE", PropertyConfiguration.MSO_BPMN_PROPERTIES);
+ return properties;
+ }
+
+ /**
+ * Create a map to hold properties to be added to mso.bpmn.urn.properties.
+ */
+ public static Map<String, String> createBpmnUrnProperties() {
+ Map<String, String> properties = new HashMap<String, String>();
+ properties.put("PROPERTIES-TYPE", PropertyConfiguration.MSO_BPMN_URN_PROPERTIES);
+ return properties;
+ }
+
+ /**
+ * Adds (or replaces) the specified values in the mso.bpmn.urn.properties file.
+ * Note that properties added this way may take some time to be loaded by the
+ * PropertyConfiguration, just like they do when a property file is updated on
+ * a real MSO system. This method will optionally wait for the new properties
+ * to be loaded. Timeout results in an IOException.
+ * @param values new properties
+ * @param wait maximum amount of time to wait for new properties to be loaded,
+ * in milliseconds. A value of zero means, "Do not wait."
+ * @throws IOException
+ */
+ public static synchronized void addProperties(Map<String, String> properties, long wait)
+ throws IOException, InterruptedException {
+
+ if (msoConfigPath == null) {
+ throw new IllegalStateException();
+ }
+
+ String type = properties.get("PROPERTIES-TYPE");
+ Path path;
+
+ if (PropertyConfiguration.MSO_BPMN_PROPERTIES.equals(type)) {
+ path = bpmnPropertiesPath;
+ } else if (PropertyConfiguration.MSO_BPMN_URN_PROPERTIES.equals(type)) {
+ path = bpmnUrnPropertiesPath;
+ } else {
+ throw new IllegalArgumentException("Not a supported PROPERTIES-TYPE map");
+ }
+
+ String oldTimestamp = PropertyConfiguration.getInstance().getProperties(type)
+ .get(PropertyConfiguration.TIMESTAMP_PROPERTY);
+
+ modifiedConfiguration = true;
+ addProperties(properties, path);
+
+ if (wait <= 0) {
+ return;
+ }
+
+ long endTime = System.currentTimeMillis() + wait;
+
+ while (true) {
+ Thread.sleep(250);
+
+ String newTimestamp = PropertyConfiguration.getInstance().getProperties(type)
+ .get(PropertyConfiguration.TIMESTAMP_PROPERTY);
+
+ if (newTimestamp != oldTimestamp) {
+ return;
+ }
+
+ long now = System.currentTimeMillis();
+
+ if (now >= endTime) {
+ throw new IOException("Timed out after " + wait
+ + "ms waiting for PropertyConfiguration change");
+ }
+ }
+ }
+
+ /**
+ * Helper method that adds properties to the specified file.
+ */
+ private static void addProperties(Map<String, String> values, Path path)
+ throws IOException {
+
+ FileReader fileReader = null;
+ FileOutputStream outputStream = null;
+
+ try {
+ fileReader = new FileReader(path.toFile());
+ Properties properties = new Properties();
+ properties.load(fileReader);
+
+ for (String key : values.keySet()) {
+ if (!key.equals("PROPERTIES-TYPE")) {
+ properties.setProperty(key, values.get(key));
+ }
+ }
+
+ outputStream = new FileOutputStream(path.toFile());
+ properties.store(outputStream, "Custom Test Properties");
+ } finally {
+ if (fileReader != null) {
+ try {
+ fileReader.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+
+ if (outputStream != null) {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ }
+ }
+
+ /**
+ * Helper method that copies properties from the specified source file, and
+ * optionally merges them with the specified extra values, then writes the
+ * whole mess to the destination file.
+ */
+ private static void mergeCopy(Path sourcePath, Map<String, String> extraValues, Path destPath)
+ throws IOException {
+ if (extraValues == null || extraValues.isEmpty()) {
+ Files.copy(sourcePath, destPath, StandardCopyOption.REPLACE_EXISTING);
+ return;
+ }
+
+ FileReader fileReader = null;
+ FileOutputStream outputStream = null;
+
+ try {
+ fileReader = new FileReader(sourcePath.toFile());
+ Properties properties = new Properties();
+ properties.load(fileReader);
+
+ for (String key : extraValues.keySet()) {
+ if (!key.equals("PROPERTIES-TYPE")) {
+ properties.setProperty(key, extraValues.get(key));
+ }
+ }
+
+ outputStream = new FileOutputStream(destPath.toFile());
+ properties.store(outputStream, "Custom Test Properties");
+ } finally {
+ if (fileReader != null) {
+ try {
+ fileReader.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+
+ if (outputStream != null) {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ }
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/resources/customMyBatisConfiguration.xml b/bpmn/MSOCoreBPMN/src/main/resources/customMyBatisConfiguration.xml
new file mode 100644
index 0000000..2c3d5da
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/resources/customMyBatisConfiguration.xml
@@ -0,0 +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="urnMapping.xml" />
+ </mappers>
+</configuration>
diff --git a/bpmn/MSOCoreBPMN/src/main/resources/normalize-namespaces.xsl b/bpmn/MSOCoreBPMN/src/main/resources/normalize-namespaces.xsl
new file mode 100644
index 0000000..56c8a00
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/resources/normalize-namespaces.xsl
@@ -0,0 +1,185 @@
+<?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=========================================================
+ -->
+
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" extension-element-prefixes="exsl">
+ <!--
+ Select one namespace node for each unique URI (almost), excluding
+ the implicit "xml" namespace. This does not filter out namespace
+ nodes declared on the same element with the same URI (thanks to
+ limitations of XPath 1.0); we take care of that later... Note that if
+ we had a distinct() function, this would be much, much simpler,
+ e.g. distinct(//namespace::*)
+ -->
+ <xsl:variable name="almost-unique-uri-namespace-nodes" select="//namespace::*[name()!='xml'][not(.=../preceding::*/namespace::* or .=ancestor::*[position()&gt;1]/namespace::*)]"/>
+
+ <!-- EXSLT functions are not supported by Saxon HE. Define the function we need here -->
+ <xsl:function name="exsl:node-set" as="node()">
+ <xsl:param name="n" as="node()"/>
+ <xsl:sequence select="$n"/>
+ </xsl:function>
+
+ <!-- Create a table of URI-prefix bindings -->
+ <xsl:variable name="almost-unique-uri-bindings-tree">
+ <xsl:for-each select="$almost-unique-uri-namespace-nodes">
+ <binding>
+ <prefix>
+ <xsl:choose>
+ <!--
+ If there are any unqualified element names or
+ attributes in this namespace in our document,
+ then force default namespaces to use an arbitrary
+ prefix, because we want to guarantee that the
+ only namespace declarations in our result will
+ be attached to the root element.
+ -->
+ <xsl:when test="not(name()) and (//*[namespace-uri()=''] or //@*[namespace-uri()=current()])">
+ <xsl:variable name="alternate-prefix-candidate" select="//namespace::*[count(.|current())!=1][.=current()][name()!=''][1]"/>
+ <xsl:choose>
+ <xsl:when test="$alternate-prefix-candidate">
+ <xsl:value-of select="name($alternate-prefix-candidate)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!--
+ If no alternative candidates exist, then generate a
+ "random" one.
+ -->
+ <xsl:value-of select="generate-id()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="name()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </prefix>
+ <uri>
+ <xsl:value-of select="."/>
+ </uri>
+ </binding>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <!-- Select the first binding from the table for each unique URI -->
+ <xsl:variable name="unique-uri-bindings" select="exsl:node-set($almost-unique-uri-bindings-tree)/binding[not(uri=preceding::uri)]"/>
+
+ <!--
+ Since there is no <xsl:namespace/> instruction, the only way we
+ can create the namespace nodes we want is to create elements in
+ a certain namespace and with a certain (prefixed) name.
+ -->
+ <xsl:variable name="created-namespace-nodes-tree">
+ <xsl:for-each select="$unique-uri-bindings">
+ <xsl:variable name="prefix">
+ <xsl:choose>
+ <!-- Replace a duplicated prefix with a different prefix. -->
+ <xsl:when test="prefix=preceding::prefix">
+ <xsl:value-of select="generate-id()"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="prefix"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="maybe-colon">
+ <xsl:if test="string($prefix)">:</xsl:if>
+ </xsl:variable>
+ <xsl:element name="{$prefix}{$maybe-colon}temporary" namespace="{uri}"/>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <!--
+ Select all the namespace nodes from our temporary tree
+ of namespace-decorated elements.
+ -->
+ <xsl:variable name="created-namespace-nodes" select="exsl:node-set($created-namespace-nodes-tree)//namespace::*"/>
+
+ <!--
+ Do for the root element the same thing we do for every element,
+ except that we explicitly copy all of our namespace nodes onto
+ the root element, eliminating the need for namespace declarations
+ to appear anywhere else in the output.
+ -->
+ <xsl:template match="/*">
+ <xsl:call-template name="copy">
+ <xsl:with-param name="insert-namespace-declarations" select="true()"/>
+ </xsl:call-template>
+ <!-- <xsl:call-template name="do-xsl-message-diagnostics"/> -->
+ </xsl:template>
+
+ <!--
+ For each element, create a new element with the same expanded name,
+ but not necessarily the same QName. We create a new element instead
+ of copying the original, because, besides potentially having a
+ QName we don't want, a copy would include with it all of the
+ namespace nodes attached to the original, and we don't necessarily
+ want that.
+ -->
+ <xsl:template match="*" name="copy">
+ <xsl:param name="insert-namespace-declarations"/>
+ <xsl:variable name="prefix" select="name($created-namespace-nodes[.=namespace-uri(current())])"/>
+ <xsl:variable name="maybe-colon">
+ <xsl:if test="$prefix">:</xsl:if>
+ </xsl:variable>
+ <xsl:element name="{$prefix}{$maybe-colon}{local-name()}" namespace="{namespace-uri()}">
+ <xsl:if test="$insert-namespace-declarations">
+ <xsl:copy-of select="$created-namespace-nodes"/>
+ </xsl:if>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+
+ <!--
+ For each attribute, create a new attribute with the same expanded
+ name, but not necessarily the same QName.
+ -->
+ <xsl:template match="@*">
+ <xsl:variable name="prefix" select="name($created-namespace-nodes[.=namespace-uri(current())])"/>
+ <xsl:variable name="maybe-colon">
+ <xsl:if test="$prefix">:</xsl:if>
+ </xsl:variable>
+ <xsl:attribute name="{$prefix}{$maybe-colon}{local-name()}" namespace="{namespace-uri()}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <!-- Do a simple copy of text, comments, and processing instructions -->
+ <xsl:template match="text()|comment()|processing-instruction()">
+ <xsl:copy/>
+ </xsl:template>
+
+ <!-- Print out some diagnostics to show what's going on beneath the covers. -->
+ <xsl:template name="do-xsl-message-diagnostics">
+ <xsl:message>
+ <diagnostics xml:space="preserve">
+ <diagnostic name="almost-unique-uri-bindings-tree">
+ <xsl:copy-of select="$almost-unique-uri-bindings-tree"/>
+ </diagnostic>
+ <diagnostic name="unique-uri-bindings">
+ <xsl:copy-of select="$unique-uri-bindings"/>
+ </diagnostic>
+ <diagnostic name="created-namespace-nodes-tree">
+ <xsl:copy-of select="$created-namespace-nodes-tree"/>
+ </diagnostic>
+ </diagnostics>
+ </xsl:message>
+ </xsl:template>
+
+</xsl:transform>
diff --git a/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml b/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml
new file mode 100644
index 0000000..fd5d586
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml
@@ -0,0 +1,44 @@
+<?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 mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="mso.urnMapping">
+
+ <resultMap id="urnMapping" type="org.openecomp.mso.bpmn.core.mybatis.URNMapping">
+ <result property="name" column="NAME_" jdbcType="VARCHAR"/>
+ <result property="value" column="VALUE_" jdbcType="VARCHAR" />
+ <result property="rev" column="REV_" jdbcType="INTEGER" />
+ </resultMap>
+
+ <select id="selectAll" resultMap="urnMapping">
+ select NAME_, VALUE_, REV_
+ from ATT_URN_MAPPING
+ </select>
+
+ <select id="selectOne" resultMap="urnMapping">
+ select NAME_, VALUE_, REV_
+ from ATT_URN_MAPPING
+ where name = #{name}
+ </select>
+
+</mapper>
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
new file mode 100644
index 0000000..71b9e08
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTest.java
@@ -0,0 +1,30 @@
+/*
+ * 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
new file mode 100644
index 0000000..2449157
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTestscaffolding.java
@@ -0,0 +1,106 @@
+/**
+ * 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
new file mode 100644
index 0000000..113c819
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTest.java
@@ -0,0 +1,24 @@
+/*
+ * 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
new file mode 100644
index 0000000..69ee3dc
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTestscaffolding.java
@@ -0,0 +1,83 @@
+/**
+ * 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
new file mode 100644
index 0000000..6176029
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java
@@ -0,0 +1,255 @@
+/*-
+ * ============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;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+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;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.bpmn.core.xml.XmlTool;
+
+/**
+ * @version 1.0
+ */
+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();
+ }
+ }
+}
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
new file mode 100644
index 0000000..70e5050
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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
new file mode 100644
index 0000000..ab7ee56
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTestscaffolding.java
@@ -0,0 +1,342 @@
+/**
+ * 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
new file mode 100644
index 0000000..f62d6af
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTest.java
@@ -0,0 +1,20 @@
+/*
+ * 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
new file mode 100644
index 0000000..03cb94f
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTestscaffolding.java
@@ -0,0 +1,85 @@
+/**
+ * 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
new file mode 100644
index 0000000..ff92355
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
@@ -0,0 +1,115 @@
+/*-
+ * ============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;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.openecomp.mso.bpmn.test.PropertyConfigurationSetup;
+
+public class PropertyConfigurationTest {
+ @Before
+ public void beforeTest() throws IOException {
+ Map<String, String> defaultProperties = PropertyConfigurationSetup.createBpmnProperties();
+ defaultProperties.put("testValue", "testKey");
+ PropertyConfigurationSetup.init(defaultProperties);
+ }
+
+ @Test
+ public void testPropertyFileWatcher() throws InterruptedException, IOException {
+ Assert.assertEquals(true, PropertyConfiguration.getInstance().isFileWatcherRunning());
+ }
+
+ @Test
+ public void testPropertyLoading() throws IOException, InterruptedException {
+ PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+ Map<String,String> props = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+ Assert.assertNotNull(props);
+ Assert.assertEquals("testValue", props.get("testKey"));
+ }
+
+ @Test
+ public void testPropertyReload() throws IOException, InterruptedException {
+ PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+ Map<String,String> properties = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+ Assert.assertNotNull(properties);
+ Assert.assertEquals("testValue", properties.get("testKey"));
+
+ Map<String, String> newProperties = PropertyConfigurationSetup.createBpmnProperties();
+ newProperties.put("newKey", "newValue");
+ PropertyConfigurationSetup.addProperties(newProperties, 10000);
+
+ // Reload and check for the new value
+ properties = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+ Assert.assertNotNull(properties);
+ Assert.assertEquals("newValue", properties.get("newKey"));
+ }
+
+ @Test(expected=IllegalArgumentException.class)
+ public void testPropertyFileDoesNotExists_NotIntheList() throws IOException {
+ PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+ propertyConfiguration.getProperties("badfile.properties");
+ Assert.fail("Expected IllegalArgumentException");
+ }
+
+ @Test(expected=java.lang.UnsupportedOperationException.class)
+ public void testPropertyModificationException() throws IOException {
+ PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+ Map<String,String> props = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+ Assert.assertNotNull(props);
+ Assert.assertEquals("testValue", props.get("testKey"));
+ props.put("newKey", "newvalue");
+ }
+
+ @Test
+ public void testNotAllowedPropertyReloading() throws IOException {
+ Path msoConfigPath = Paths.get(System.getProperty("mso.config.path"));
+ Path backupPropFilePath = msoConfigPath.resolve("backup-" + PropertyConfiguration.MSO_BPMN_PROPERTIES);
+
+ try {
+ // Create a new file... a backup file
+ Files.createFile(backupPropFilePath);
+
+ // Load properties
+ PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+ Map<String,String> props = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+ Assert.assertNotNull(props);
+ Assert.assertEquals("testValue", props.get("testKey"));
+
+ // Update the backup file
+ Path bpmnPropertiesSourcePath = Paths.get("src", "test", "resources", "mso.bpmn.properties");
+ Files.copy(bpmnPropertiesSourcePath, backupPropFilePath, StandardCopyOption.REPLACE_EXISTING);
+
+ // Cache size should remain the same
+ Assert.assertEquals(1, PropertyConfiguration.getInstance().cacheSize());
+ } finally {
+ backupPropFilePath.toFile().delete();
+ }
+ }
+}
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
new file mode 100644
index 0000000..6422685
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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
new file mode 100644
index 0000000..c134c9c
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTestscaffolding.java
@@ -0,0 +1,331 @@
+/**
+ * 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
new file mode 100644
index 0000000..741872a
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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
new file mode 100644
index 0000000..4b11c76
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTestscaffolding.java
@@ -0,0 +1,339 @@
+/**
+ * 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
new file mode 100644
index 0000000..e26f5a9
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTest.java
@@ -0,0 +1,117 @@
+/*
+ * 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
new file mode 100644
index 0000000..7dc6ca1
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTestscaffolding.java
@@ -0,0 +1,83 @@
+/**
+ * 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
new file mode 100644
index 0000000..3f2f74d
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
@@ -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.core;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.test.ProcessEngineRule;
+import org.junit.Assert;
+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;
+
+/**
+ * Unit test for BaseTask class.
+ */
+public class TestBaseTask {
+
+ @Rule
+ public ProcessEngineRule processEngineRule = new ProcessEngineRule();
+
+ @Before
+ public void beforeTest() throws Exception {
+ CamundaDBSetup.configure();
+ PropertyConfigurationSetup.init();
+ }
+
+ @Test
+ @Deployment(resources={"BaseTaskTest.bpmn"})
+ public void shouldInvokeService() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("firstName", "Jane");
+ variables.put("lastName", "Doe");
+ variables.put("age", (Integer)25);
+ variables.put("lastVisit", (Long)1438270117000L);
+
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ processEngineRule.getTaskService();
+ runtimeService.startProcessInstanceByKey("BaseTaskTest", variables);
+ }
+
+ /**
+ * Unit test code for BaseTask.
+ */
+ public static class TestTask extends BaseTask {
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ private Expression existingString;
+ private Expression nonExistingString;
+ private Expression existingStringFromVar;
+ private Expression nonExistingStringFromVar;
+
+ private Expression existingInteger;
+ private Expression nonExistingInteger;
+ private Expression existingIntegerFromVar;
+ private Expression nonExistingIntegerFromVar;
+
+ private Expression existingLong;
+ private Expression nonExistingLong;
+ private Expression existingLongFromVar;
+ private Expression nonExistingLongFromVar;
+
+ private Expression existingOutputVar;
+ private Expression nonExistingOutputVar;
+ private Expression existingBadOutputVar;
+
+ public void execute(DelegateExecution execution) throws Exception {
+ msoLogger.debug("Started executing " + getClass().getSimpleName());
+
+ /*********************************************************************/
+ msoLogger.debug("Running String Field Tests");
+ /*********************************************************************/
+
+ String s = getStringField(existingString, execution, "existingString");
+ Assert.assertEquals("Hello World", s);
+
+ try {
+ s = getStringField(nonExistingString, execution, "nonExistingString");
+ Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+ } catch (Exception e) {
+ if (!(e instanceof BadInjectedFieldException)) {
+ Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+ }
+ }
+
+ s = getOptionalStringField(existingString, execution, "existingString");
+ Assert.assertEquals("Hello World", s);
+
+ s = getOptionalStringField(nonExistingString, execution, "nonExistingString");
+ Assert.assertEquals(null, s);
+
+ /*********************************************************************/
+ msoLogger.debug("Running String Expression Tests");
+ /*********************************************************************/
+
+ s = getStringField(existingStringFromVar, execution, "existingStringFromVar");
+ Assert.assertEquals("Jane", s);
+
+ try {
+ s = getStringField(nonExistingStringFromVar, execution, "nonExistingStringFromVar");
+ Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+ } catch (Exception e) {
+ if (!(e instanceof BadInjectedFieldException)) {
+ Assert.fail("Expected BadInjectedFieldException for nonExistingStringFromVar");
+ }
+ }
+
+ s = getOptionalStringField(existingStringFromVar, execution, "existingStringFromVar");
+ Assert.assertEquals("Jane", s);
+
+ s = getOptionalStringField(nonExistingStringFromVar, execution, "nonExistingStringFromVar");
+ Assert.assertEquals(null, s);
+
+ /*********************************************************************/
+ msoLogger.debug("Running Integer Field Tests");
+ /*********************************************************************/
+
+ Integer i = getIntegerField(existingInteger, execution, "existingInteger");
+ Assert.assertEquals((Integer)42, i);
+
+ try {
+ i = getIntegerField(nonExistingInteger, execution, "nonExistingInteger");
+ Assert.fail("Expected BadInjectedFieldException for nonExistingInteger");
+ } catch (Exception e) {
+ if (!(e instanceof BadInjectedFieldException)) {
+ Assert.fail("Expected BadInjectedFieldException for nonExistingInteger");
+ }
+ }
+
+ i = getOptionalIntegerField(existingInteger, execution, "existingInteger");
+ Assert.assertEquals((Integer)42, i);
+
+ i = getOptionalIntegerField(nonExistingInteger, execution, "nonExistingInteger");
+ Assert.assertEquals(null, i);
+
+ /*********************************************************************/
+ msoLogger.debug("Running Integer Expression Tests");
+ /*********************************************************************/
+
+ i = getIntegerField(existingIntegerFromVar, execution, "existingIntegerFromVar");
+ Assert.assertEquals((Integer)25, i);
+
+ try {
+ i = getIntegerField(nonExistingIntegerFromVar, execution, "nonExistingIntegerFromVar");
+ Assert.fail("Expected BadInjectedFieldException for nonExistingInteger");
+ } catch (Exception e) {
+ if (!(e instanceof BadInjectedFieldException)) {
+ Assert.fail("Expected BadInjectedFieldException for nonExistingIntegerFromVar");
+ }
+ }
+
+ i = getOptionalIntegerField(existingIntegerFromVar, execution, "existingIntegerFromVar");
+ Assert.assertEquals((Integer)25, i);
+
+ i = getOptionalIntegerField(nonExistingIntegerFromVar, execution, "nonExistingIntegerFromVar");
+ Assert.assertEquals(null, i);
+
+ /*********************************************************************/
+ msoLogger.debug("Running Long Field Tests");
+ /*********************************************************************/
+
+ Long l = getLongField(existingLong, execution, "existingLong");
+ Assert.assertEquals((Long)123456789L, l);
+
+ try {
+ l = getLongField(nonExistingLong, execution, "nonExistingLong");
+ Assert.fail("Expected BadInjectedFieldException for nonExistingLong");
+ } catch (Exception e) {
+ if (!(e instanceof BadInjectedFieldException)) {
+ Assert.fail("Expected BadInjectedFieldException for nonExistingLong");
+ }
+ }
+
+ l = getOptionalLongField(existingLong, execution, "existingLong");
+ Assert.assertEquals((Long)123456789L, l);
+
+ l = getOptionalLongField(nonExistingLong, execution, "nonExistingLong");
+ Assert.assertEquals(null, l);
+
+ /*********************************************************************/
+ msoLogger.debug("Running Long Expression Tests");
+ /*********************************************************************/
+
+ l = getLongField(existingLongFromVar, execution, "existingLongFromVar");
+ Assert.assertEquals((Long)1438270117000L, l);
+
+ try {
+ l = getLongField(nonExistingLongFromVar, execution, "nonExistingLongFromVar");
+ Assert.fail("Expected BadInjectedFieldException for nonExistingLong");
+ } catch (Exception e) {
+ if (!(e instanceof BadInjectedFieldException)) {
+ Assert.fail("Expected BadInjectedFieldException for nonExistingLongFromVar");
+ }
+ }
+
+ l = getOptionalLongField(existingLongFromVar, execution, "existingLongFromVar");
+ Assert.assertEquals((Long)1438270117000L, l);
+
+ l = getOptionalLongField(nonExistingLongFromVar, execution, "nonExistingLongFromVar");
+ Assert.assertEquals(null, i);
+
+ /*********************************************************************/
+ msoLogger.debug("Running Output Variable Field Tests");
+ /*********************************************************************/
+
+ String var = getOutputField(existingOutputVar, execution, "existingOutputVar");
+ Assert.assertEquals("goodVariable", var);
+
+ try {
+ var = getOutputField(nonExistingOutputVar, execution, "nonExistingOutputVar");
+ Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+ } catch (Exception e) {
+ if (!(e instanceof BadInjectedFieldException)) {
+ Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+ }
+ }
+
+ var = getOptionalOutputField(existingOutputVar, execution, "existingOutputVar");
+ Assert.assertEquals("goodVariable", var);
+
+ var = getOptionalOutputField(nonExistingOutputVar, execution, "nonExistingOutputVar");
+ Assert.assertEquals(null, var);
+
+ try {
+ var = getOutputField(existingBadOutputVar, execution, "existingBadOutputVar");
+ Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+ } catch (Exception e) {
+ if (!(e instanceof BadInjectedFieldException)) {
+ Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+ }
+ }
+
+ msoLogger.debug("Finished executing " + getClass().getSimpleName());
+ }
+ }
+}
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
new file mode 100644
index 0000000..64220f0
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
new file mode 100644
index 0000000..93151d3
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTestscaffolding.java
@@ -0,0 +1,103 @@
+/**
+ * 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
new file mode 100644
index 0000000..1891c8d
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTest.java
@@ -0,0 +1,88 @@
+/*
+ * 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
new file mode 100644
index 0000000..88e0e0f
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTestscaffolding.java
@@ -0,0 +1,83 @@
+/**
+ * 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
new file mode 100644
index 0000000..a149341
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTest.java
@@ -0,0 +1,81 @@
+/*
+ * 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
new file mode 100644
index 0000000..b0c1585
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTestscaffolding.java
@@ -0,0 +1,533 @@
+/**
+ * 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
new file mode 100644
index 0000000..fec405e
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTest.java
@@ -0,0 +1,165 @@
+/*
+ * 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
new file mode 100644
index 0000000..6d05db0
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTestscaffolding.java
@@ -0,0 +1,120 @@
+/**
+ * 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
new file mode 100644
index 0000000..9c17cae
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTest.java
@@ -0,0 +1,114 @@
+/*
+ * 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
new file mode 100644
index 0000000..183ea84
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * 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
new file mode 100644
index 0000000..d94a0c5
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn
@@ -0,0 +1,79 @@
+<?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:process id="BaseTaskTest" name="BaseTaskTest" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:serviceTask id="ServiceTask_1" camunda:class="org.openecomp.mso.bpmn.core.TestBaseTask$TestTask" name="TestTask">
+ <bpmn2:extensionElements>
+ <camunda:field name="existingString">
+ <camunda:string>Hello World</camunda:string>
+ </camunda:field>
+ <camunda:field name="existingStringFromVar">
+ <camunda:expression>${firstName}</camunda:expression>
+ </camunda:field>
+ <camunda:field name="nonExistingStringFromVar">
+ <camunda:expression>${undefinedVariable}</camunda:expression>
+ </camunda:field>
+ <camunda:field name="existingInteger">
+ <camunda:string>42</camunda:string>
+ </camunda:field>
+ <camunda:field name="existingIntegerFromVar">
+ <camunda:expression>${age}</camunda:expression>
+ </camunda:field>
+ <camunda:field name="nonExistingIntegerFromVar">
+ <camunda:expression>${undefinedVariable}</camunda:expression>
+ </camunda:field>
+ <camunda:field name="existingLong">
+ <camunda:string>123456789</camunda:string>
+ </camunda:field>
+ <camunda:field name="existingLongFromVar">
+ <camunda:expression>${lastVisit}</camunda:expression>
+ </camunda:field>
+ <camunda:field name="nonExistingLongFromVar">
+ <camunda:expression>${undefinedVariable}</camunda:expression>
+ </camunda:field>
+ <camunda:field name="existingOutputVar">
+ <camunda:string>goodVariable</camunda:string>
+ </camunda:field>
+ <camunda:field name="existingBadOutputVar">
+ <camunda:string>bad Variable</camunda:string>
+ </camunda:field>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ServiceTask_1"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ServiceTask_1" targetRef="EndEvent_1"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="BaseTaskTest">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_36" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="55.0" y="38.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_68" bpmnElement="ServiceTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="180.0" y="16.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_36" targetElement="_BPMNShape_ServiceTask_68">
+ <di:waypoint xsi:type="dc:Point" x="91.0" y="56.0"/>
+ <di:waypoint xsi:type="dc:Point" x="180.0" y="56.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_83" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="369.0" y="38.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="387.0" y="79.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ServiceTask_68" targetElement="_BPMNShape_EndEvent_83">
+ <di:waypoint xsi:type="dc:Point" x="280.0" y="56.0"/>
+ <di:waypoint xsi:type="dc:Point" x="369.0" y="56.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="370.0" y="57.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml b/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
new file mode 100644
index 0000000..4858ea0
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
@@ -0,0 +1,77 @@
+<?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=========================================================
+ -->
+
+
+<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="false" />
+
+ <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" />
+ </list>
+ </property>
+
+ </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/MSOCoreBPMN/src/test/resources/logback-test.xml b/bpmn/MSOCoreBPMN/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..92876fc
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/logback-test.xml
@@ -0,0 +1,48 @@
+<!--
+ ============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 >
+
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+ </encoder>
+ </appender>
+
+
+ <logger name="com.att.eelf.audit" level="info" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="com.att.eelf.error" level="trace" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <root level="info">
+ <appender-ref ref="STDOUT" />
+ </root>
+
+
+</configuration>
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.properties b/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.properties
new file mode 100644
index 0000000..d329dbb
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.properties
@@ -0,0 +1,22 @@
+###
+# ============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=========================================================
+###
+
+URNMapping.FileSystemLoading.Enabled=true
+testKey=testValue
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.urn.properties
new file mode 100644
index 0000000..7fa5873
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.urn.properties
@@ -0,0 +1,21 @@
+###
+# ============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=========================================================
+###
+
+log.debug.TestTask=true
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/request.json b/bpmn/MSOCoreBPMN/src/test/resources/request.json
new file mode 100644
index 0000000..bdca336
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/request.json
@@ -0,0 +1,28 @@
+{
+ "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",
+ "type": "String"
+ },
+ "host": {
+ "value": "localhost",
+ "type": "String"
+ },
+ "att-mso-schema-version": {
+ "value": "v1",
+ "type": "String"
+ },
+ "att-mso-request-id": {
+ "value": "d00eb185-b1d7-429e-aca3-42a61b459535",
+ "type": "String"
+ },
+ "att-mso-service-instance-id": {
+ "value": "AA01|VLXM|003717||SW_INTERNET",
+ "type": "String"
+ },
+ "att-mso-service-request-timeout": {
+ "value": "180",
+ "type": "String"
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF b/bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF b/bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/bpmn/MSOGammaBPMN/pom.xml b/bpmn/MSOGammaBPMN/pom.xml
new file mode 100644
index 0000000..fa2055c
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/pom.xml
@@ -0,0 +1,325 @@
+<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>0.0.4-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> \ No newline at end of file
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
new file mode 100644
index 0000000..96431b6
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AaiUtil.groovy
@@ -0,0 +1,530 @@
+/*-
+ * ============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/AbstractServiceTaskProcessor.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AbstractServiceTaskProcessor.groovy
new file mode 100644
index 0000000..168cf0b
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AbstractServiceTaskProcessor.groovy
@@ -0,0 +1,874 @@
+/*-
+ * ============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)
+ }
+ }
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy
new file mode 100644
index 0000000..fae12c3
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.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 com.att.bpm.scripts
+
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+class CommonExceptionUtil {
+
+
+
+ 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://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">
+ <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">
+ <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
+ }
+
+
+
+
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy
new file mode 100644
index 0000000..8ec267d
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy
@@ -0,0 +1,502 @@
+/*-
+ * ============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)
+ }
+
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy
new file mode 100644
index 0000000..b13fff7
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy
@@ -0,0 +1,171 @@
+/*-
+ * ============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)
+ }
+
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy
new file mode 100644
index 0000000..45ffd55
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy
@@ -0,0 +1,202 @@
+/*-
+ * ============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)
+ }
+
+
+
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy
new file mode 100644
index 0000000..ea01503
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy
@@ -0,0 +1,623 @@
+/*-
+ * ============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)
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy
new file mode 100644
index 0000000..51e77a8
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy
@@ -0,0 +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)
+ }
+}
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
new file mode 100644
index 0000000..bfd8648
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateNetworkInstanceInfra.groovy
@@ -0,0 +1,1780 @@
+/*-
+ * ============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
new file mode 100644
index 0000000..3c3bb81
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateServiceInstanceInfra.groovy
@@ -0,0 +1,776 @@
+/*-
+ * ============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/CreateVfModuleInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleInfra.groovy
new file mode 100644
index 0000000..fa80c76
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleInfra.groovy
@@ -0,0 +1,428 @@
+/*-
+ * ============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 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 {
+
+ /**
+ * Validates the request message and sets up the workflow.
+ * @param execution the execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ def prefix = 'CVFMI_'
+ logDebug('Entered 1' + method, isDebugLogEnabled)
+ execution.setVariable('prefix', prefix)
+ logDebug('Entered 2' + method, isDebugLogEnabled)
+ execution.setVariable("isVidRequest", "false")
+
+ logDebug("Set variables", isDebugLogEnabled)
+
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+ execution.setVariable("RollbackData", rollbackData)
+
+ logDebug("Set rollback data", isDebugLogEnabled)
+ 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, 'CREATE_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")
+
+ }
+ catch(groovy.json.JsonException je) {
+ utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
+ workflowException(execution, "Invalid request format", 400)
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ //execution.setVariable("CVFMODVOL2_RESTFault", restFaultMessage)
+ //execution.setVariable("CVFMODVOL2_isDataOk", false)
+ utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
+ workflowException(execution, restFaultMessage, 400)
+ }
+
+ try {
+ String request = validateInfraRequest(execution)
+
+ execution.setVariable("CreateVfModuleInfraSuccessIndicator", false)
+ execution.setVariable("RollbackCompleted", false)
+ execution.setVariable("DoCreateVfModuleRequest", request)
+ execution.setVariable("isDebugLogEnabled", isDebugLogEnabled)
+ execution.setVariable("CVFMI_requestInfo",utils.getNodeXml(request,"request-info"))
+ execution.setVariable("CVFMI_requestId",utils.getNodeText1(request,"request-id"))
+ execution.setVariable("CVFMI_source",utils.getNodeText1(request,"source"))
+ execution.setVariable("CVFMI_serviceInstanceId", utils.getNodeText1(request, "service-instance-id"))
+ execution.setVariable("CVFMI_vnfInputs",utils.getNodeXml(request,"vnf-inputs"))
+ //backoutOnFailure
+
+ NetworkUtils networkUtils = new NetworkUtils()
+ execution.setVariable("CVFMI_rollbackEnabled", networkUtils.isRollbackEnabled(execution,request))
+ execution.setVariable("CVFMI_originalWorkflowException", null)
+ def vnfParams = ""
+ if (utils.nodeExists(request, "vnf-params")) {
+ vnfParams = utils.getNodeXml(request,"vnf-params")
+ }
+ execution.setVariable("CVFMI_vnfParams", vnfParams)
+
+ def newVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("newVfModuleId", newVfModuleId)
+
+ logDebug('RequestInfo: ' + execution.getVariable("CVFMI_requestInfo"), isDebugLogEnabled)
+ logDebug('VnfInputs: ' + execution.getVariable("CVFMI_vnfInputs"), isDebugLogEnabled)
+ logDebug('VnfParams: ' + execution.getVariable("CVFMI_vnfParams"), isDebugLogEnabled)
+ logDebug('rollbackEnabled: ' + execution.getVariable("CVFMI_rollbackEnabled"), isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError bpmnError) {
+ buildErrorResponse(execution,bpmnError.getMessage(),"400")
+ throw bpmnError
+ } catch (Exception exception) {
+ workflowException(execution, exception.getMessage(), 400)
+ }
+ }
+
+ /**
+ * Validates a workflow response.
+ * @param execution the execution
+ * @param responseVar the execution variable in which the response is stored
+ * @param responseCodeVar the execution variable in which the response code is stored
+ * @param errorResponseVar the execution variable in which the error response is stored
+ */
+ public void validateWorkflowResponse(Execution execution, String responseVar,
+ String responseCodeVar, String errorResponseVar) {
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
+ }
+
+
+ /**
+ * Sends the empty, synchronous response back to the API Handler.
+ * @param execution the execution
+ */
+ public void sendResponse(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestInfo = execution.getVariable('CVFMI_requestInfo')
+ def requestId = execution.getVariable('CVFMI_requestId')
+ def source = execution.getVariable('CVFMI_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def newVfModuleId = execution.getVariable("newVfModuleId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${newVfModuleId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, 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())
+ }
+ }
+
+ /**
+ *
+ * @param execution the execution
+ */
+ public void postProcessResponse(Execution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ======== STARTED PostProcessResponse Process ======== ", isDebugEnabled)
+ try{
+ def request = execution.getVariable("DoCreateVfModuleRequest")
+ def requestInfo = utils.getNodeXml(request, 'request-info', false)
+ def action = utils.getNodeText1(requestInfo, "action")
+
+ utils.log("DEBUG", "requestInfo is: " + requestInfo, isDebugEnabled)
+ utils.log("DEBUG", "action is: " + action, isDebugEnabled)
+
+ 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">
+ ${requestInfo}
+ </request-info>
+ <ns8:status-message>Vf Module has been created successfully.</ns8:status-message>
+ <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_SuccessFlag", true)
+ execution.setVariable("CVFMI_msoCompletionRequest", payload)
+ utils.log("DEBUG", "Outgoing MsoCompletionRequest: \n" + payload, isDebugEnabled)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing PostProcessResponse. Exception is:\n" + e, isDebugEnabled)
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occured during PostProcessResponse Method:\n" + e.getMessage())
+ }
+ utils.log("DEBUG", "======== COMPLETED PostProcessResponse Process ======== ", isDebugEnabled)
+ }
+
+
+
+
+
+ /**
+ * Validates the request, request id and service instance id. If a problem is found,
+ * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+ * method also sets up the log context for the workflow.
+ * @param execution the execution
+ * @return the validated request
+ */
+ public String validateInfraRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String processKey = getProcessKey(execution);
+ def prefix = execution.getVariable("prefix")
+
+ if (prefix == null) {
+ createWorkflowException(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) {
+ createWorkflowException(execution, 1002, processKey + " request is null")
+ }
+
+ /*
+
+ def requestId = execution.getVariable("att-mso-request-id")
+
+ if (requestId == null) {
+ createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+ }
+
+ setVariable(execution, prefix + 'requestId', requestId)
+
+ def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ createWorkflowException(execution, 1002, processKey + " request message has no 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)
+ createWorkflowException(execution, 1002, "Invalid Message")
+ }
+ }
+
+ public void prepareUpdateInfraRequest(Execution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ======== STARTED prepareUpdateInfraRequest Process ======== ", isDebugEnabled)
+ try{
+
+ String vnfInputs = execution.getVariable("CVFMI_vnfInputs")
+ String requestInfo = execution.getVariable("CVFMI_requestInfo")
+ def aicCloudRegion = utils.getNodeText1(vnfInputs, "aic-cloud-region")
+ def tenantId = utils.getNodeText1(vnfInputs, "tenant-id")
+ def requestId = utils.getNodeText1(requestInfo, "request-id")
+ def vnfId = execution.getVariable("CVFMI_vnfId")
+ def vfModuleId = execution.getVariable("CVFMI_vfModuleId")
+
+ def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_db_endpoint")
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://com.att.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://com.att.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>
+ <vfModuleId>${vfModuleId}</vfModuleId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_updateInfraRequest", payload)
+ utils.log("DEBUG", "Outgoing UpdateInfraRequest: \n" + payload, isDebugEnabled)
+
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing prepareUpdateInfraRequest. Exception is:\n" + e, isDebugEnabled)
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareUpdateInfraRequest Method:\n" + e.getMessage())
+ }
+ utils.log("DEBUG", "======== COMPLETED prepareUpdateInfraRequest Process ======== ", isDebugEnabled)
+ }
+
+ /**
+ * 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 WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def request = execution.getVariable("DoCreateVfModuleRequest")
+ def requestInformation = utils.getNodeXml(request, 'request-info', false)
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ }
+
+ 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">
+ ${requestInformation}
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${encErrorResponseMsg}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorResponseCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>
+ """
+
+ logDebug("CONTENT before translation: " + content, isDebugLogEnabled)
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ public void logAndSaveOriginalException(Execution execution) {
+ def method = getClass().getSimpleName() + '.validateRollbackResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logWorkflowException(execution, 'CreateVfModuleInfra caught an event')
+ saveWorkflowException(execution, 'CVFMI_originalWorkflowException')
+ }
+
+ public void validateRollbackResponse(Execution execution) {
+ def method = getClass().getSimpleName() + '.validateRollbackResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ def originalException = execution.getVariable("CVFMI_originalWorkflowException")
+ execution.setVariable("WorkflowException", originalException)
+
+ execution.setVariable("RollbackCompleted", true)
+
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000..672bb34
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.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 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")
+ }
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy
new file mode 100644
index 0000000..05537ad
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy
@@ -0,0 +1,326 @@
+/*-
+ * ============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.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.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+
+
+/**
+ * This class supports the CreateVnfInfra Flow
+ * with the creation of a generic vnf for
+ * infrastructure.
+ */
+class CreateVnfInfra extends AbstractServiceTaskProcessor {
+
+ String Prefix="CREVI_"
+ 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 CreateVnfInfra PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("CREVI_sentSyncResponse", false)
+
+ try{
+ // Get Variables
+ String createVnfRequest = execution.getVariable("bpmnRequest")
+ execution.setVariable("CREVI_createVnfRequest", createVnfRequest)
+ utils.logAudit("Incoming CreateVnfInfra Request is: \n" + createVnfRequest)
+
+ if(createVnfRequest != null){
+
+ String requestId = execution.getVariable("att-mso-request-id")
+ execution.setVariable("CREVI_requestId", requestId)
+ utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("CREVI_serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfType = execution.getVariable("vnfType")
+ execution.setVariable("CREVI_vnfType", vnfType)
+ utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled)
+
+ String vnfName = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.instanceName")
+ execution.setVariable("CREVI_vnfName", vnfName)
+ utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+ String serviceId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("CREVI_serviceId", serviceId)
+ utils.log("DEBUG", "Incoming Service Id is: " + serviceId, isDebugEnabled)
+
+ String source = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.source")
+ execution.setVariable("CREVI_source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ String suppressRollback = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("CREVI_suppressRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String modelInvariantId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelInvariantId")
+ execution.setVariable("CREVI_modelInvariantId", modelInvariantId)
+ utils.log("DEBUG", "Incoming Invariant Id is: " + modelInvariantId, isDebugEnabled)
+
+ String modelVersion = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelVersion")
+ execution.setVariable("CREVI_modelVersion", modelVersion)
+ utils.log("DEBUG", "Incoming Model Version is: " + modelVersion, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<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>"""
+
+ execution.setVariable("CREVI_requestInfo", requestInfo)
+
+ //TODO: Orch Status - TBD, will come from SDN-C Response in 1702
+ String orchStatus = "Created"
+ execution.setVariable("CREVI_orchStatus", orchStatus)
+
+ //TODO: Equipment Role - Should come from SDN-C Response in 1702
+ String equipmentRole = " "
+ execution.setVariable("CREVI_equipmentRole", equipmentRole)
+
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = UUID.randomUUID().toString()
+ utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+ }
+ execution.setVariable("CREVI_vnfId", vnfId)
+
+ // Setting for Sub Flow Calls
+ execution.setVariable("CREVI_type", "generic-vnf")
+ execution.setVariable("GENGS_type", "service-instance")
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Bpmn Request is Null.")
+ }
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in CreateVnfInfra PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED CreateVnfInfra SendSyncResponse Process *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("CREVI_requestId")
+ String vnfId = execution.getVariable("CREVI_vnfId")
+
+ String createVnfResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " CreateVnfInfra Sync Response is: \n" + createVnfResponse, isDebugEnabled)
+
+ sendWorkflowResponse(execution, 202, createVnfResponse)
+
+ execution.setVariable("CREVI_sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in CreateVnfInfra SendSyncResponse Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra SendSyncResponse Process")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra SendSyncResponse Process ***", isDebugEnabled)
+ }
+
+ public void prepareCreateGenericVnf (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED CreateVnfInfra PrepareCreateGenericVnf Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfId = execution.getVariable("CREVI_vnfId")
+ def vnfName = execution.getVariable("CREVI_vnfName")
+ def vnfType = execution.getVariable("CREVI_vnfType")
+ def serviceId = execution.getVariable("CREVI_serviceId")
+ def orchStatus = execution.getVariable("CREVI_orchStatus")
+ def modelInvariantId = execution.getVariable("CREVI_modelInvariantId")
+ def modelVersion = execution.getVariable("CREVI_modelVersion")
+ // TODO: 1702 Variable
+ def equipmentRole = execution.getVariable("CREVI_equipmentRole")
+
+ //Get Service Instance Info
+ def serviceInstanceId = execution.getVariable("CREVI_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>
+ <orchestration-status>${orchStatus}</orchestration-status>
+ <persona-model-id>${modelInvariantId}</persona-model-id>
+ <persona-model-version>${modelVersion}</persona-model-version>
+ <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("CREVI_genericVnfPayload", payload)
+
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in CreateVnfInfra PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PrepareCreateGenericVnf Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+ public void prepareCompletionHandlerRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED CreateVnfInfra PrepareCompletionHandlerRequest Process *** ", isDebugEnabled)
+
+ try {
+ String requestInfo = execution.getVariable("CREVI_requestInfo")
+ String vnfId = execution.getVariable("CREVI_vnfId")
+ 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">
+ ${requestInfo}
+ <status-message>Vnf has been created successfully.</status-message>
+ <vnfId>${vnfId}</vnfId>
+ <mso-bpel-name>CreateVnfInfra</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ execution.setVariable("CREVI_completionHandlerRequest", request)
+ utils.log("DEBUG", "Completion Handler Request is: " + request, isDebugEnabled)
+
+ execution.setVariable("WorkflowResponse", "Success") // for junits
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in CreateVnfInfra PrepareCompletionHandlerRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PrepareCompletionHandlerRequest Process")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCompletionHandlerRequest Process ***", isDebugEnabled)
+ }
+
+ public void sendErrorResponse(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED CreateVnfInfra sendErrorResponse Process *** ", isDebugEnabled)
+ try {
+ def sentSyncResponse = execution.getVariable("CREVI_sentSyncResponse")
+ if(sentSyncResponse == false){
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ String response = exceptionUtil.buildErrorResponseXml(wfex)
+
+ utils.logAudit(response)
+ sendWorkflowResponse(execution, 500, response)
+ }else{
+ utils.log("DEBUG", "Not Sending Error Response. Sync Response Already Sent", isDebugEnabled)
+ }
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in CreateVnfInfra sendErrorResponse Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra sendErrorResponse Process")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra sendErrorResponse Process ***", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED CreateVnfInfra prepareFalloutRequest Process *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestInfo = execution.getVariable("CREVI_requestInfo")
+ utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable("CREVI_falloutRequest", falloutRequest)
+
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in CreateVnfInfra prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra prepareFalloutRequest Process")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra prepareFalloutRequest Process ***", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy
new file mode 100644
index 0000000..0e5360d
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy
@@ -0,0 +1,360 @@
+/*-
+ * ============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)
+ }
+}
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
new file mode 100644
index 0000000..9cc7562
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteNetworkInstanceInfra.groovy
@@ -0,0 +1,873 @@
+/*-
+ * ============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
new file mode 100644
index 0000000..7004004
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteServiceInstanceInfra.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 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/DeleteVfModuleInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleInfra.groovy
new file mode 100644
index 0000000..bf5e62d
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleInfra.groovy
@@ -0,0 +1,350 @@
+/*-
+ * ============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 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.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'DELVfModI_')
+ execution.setVariable('DELVfModI_requestInfo', null)
+ execution.setVariable('DELVfModI_requestId', null)
+ execution.setVariable('DELVfModI_source', null)
+ execution.setVariable('DELVfModI_vnfInputs', null)
+ execution.setVariable('DELVfModI_vnfId', null)
+ execution.setVariable('DELVfModI_vfModuleId', null)
+ execution.setVariable('DELVfModI_tenantId', null)
+ execution.setVariable('DELVfModI_volumeGroupId', null)
+ execution.setVariable('DELVfModI_vnfParams', null)
+ execution.setVariable('DELVfModI_updateInfraRequest', null)
+ execution.setVariable('DeleteVfModuleRequest', null)
+ execution.setVariable('DeleteVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Process the incoming DELETE_VF_MODULE vnf-request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("isVidRequest", "false")
+ initProcessVariables(execution)
+
+ def prefix = execution.getVariable('prefix')
+
+ 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, 'DELETE_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")
+
+ }
+ catch(groovy.json.JsonException je) {
+ utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
+ workflowException(execution, "Invalid request format", 400)
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
+ workflowException(execution, restFaultMessage, 400)
+ }
+
+
+ try {
+
+ String request = validateRequest(execution)
+ execution.setVariable('DeleteVfModuleRequest', request)
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('DELVfModI_requestInfo', requestInfo)
+ execution.setVariable('DELVfModI_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('DELVfModI_source', getNodeTextForce(requestInfo, 'source'))
+
+ def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs')
+ execution.setVariable('DELVfModI_vnfInputs', vnfInputs)
+ execution.setVariable('DELVfModI_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+ execution.setVariable('DELVfModI_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('DELVfModI_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ execution.setVariable('DELVfModI_volumeGroupId', getNodeTextForce(vnfInputs, 'volume-group-id'))
+
+ def vnfParams = utils.getNodeXml(request, 'vnf-params')
+ execution.setVariable('DELVfModI_vnfParams', vnfParams)
+
+ 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())
+ }
+ }
+
+ /**
+ * Sends the 'IN_PROGRESS' synchronous response.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestInfo = execution.getVariable('DELVfModI_requestInfo')
+ def requestId = execution.getVariable('DELVfModI_requestId')
+ def source = execution.getVariable('DELVfModI_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vfModuleId = execution.getVariable('DELVfModI_vfModuleId')
+ String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, 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())
+ }
+ }
+
+ /**
+ * Currently passing the entire DELETE_VF_MODULE vnf-request to DoDeleteVfModule.
+ * 'DeleteVfModuleRequest' is now being set in preProcessRequest().
+ * TBD: may want to eventually create a specific request that only contains the needed fields.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoDeleteVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepDoDeleteVfModule(' +
+ '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)
+ createWorkflowException(execution, 1002, 'Error in prepDoDeleteVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare the DB update to add an entry for the Vf Module request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateInfraRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('DELVfModI_requestId')
+ def vnfId = execution.getVariable('DELVfModI_vnfId')
+ def vfModuleId = execution.getVariable('DELVfModI_vfModuleId')
+ def tenantId = execution.getVariable('DELVfModI_tenantId')
+ def volumeGroupId = execution.getVariable('DELVfModI_volumeGroupId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://com.att.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('DELVfModI_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in prepInfraRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Builds a "CompletionHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void completionHandlerPrep(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 request = execution.getVariable("DeleteVfModuleRequest")
+ def requestInfo = utils.getNodeXml(request, 'request-info', false)
+ 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">
+ ${requestInfo}
+ </request-info>
+ <ns8:status-message>Vf Module has been deleted successfully.</ns8:status-message>
+ <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(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 = execution.getVariable("DeleteVfModuleRequest")
+ def requestInfo = utils.getNodeXml(request, 'request-info', false)
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg.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(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000..bfbaf68
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy
@@ -0,0 +1,545 @@
+/*-
+ * ============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)
+
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy
new file mode 100644
index 0000000..e53df32
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy
@@ -0,0 +1,250 @@
+/*-
+ * ============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.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.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.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+
+
+/**
+ * This class supports the DeleteVnfInfra Flow
+ * with the Deletion of a generic vnf for
+ * infrastructure.
+ */
+class DeleteVnfInfra extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELVI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DeleteVnfInfra PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("DELVI_SuccessIndicator", false)
+ execution.setVariable("DELVI_vnfInUse", false)
+
+ try{
+ // Get Variables
+ String deleteVnfRequest = execution.getVariable("bpmnRequest")
+ execution.setVariable("DELVI_DeleteVnfRequest", deleteVnfRequest)
+ utils.logAudit("Incoming DeleteVnfInfra Request is: \n" + deleteVnfRequest)
+
+ if(deleteVnfRequest != null){
+
+ String requestId = execution.getVariable("att-mso-request-id")
+ execution.setVariable("DELVI_requestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DELVI_serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DELVI_vnfId", vnfId)
+ utils.log("DEBUG", "Incoming Vnf(Instance) Id is: " + vnfId, isDebugEnabled)
+
+ String source = jsonUtil.getJsonValue(deleteVnfRequest, "requestDetails.requestInfo.source")
+ execution.setVariable("DELVI_source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<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>"""
+
+ execution.setVariable("DELVI_requestInfo", requestInfo)
+
+ // Setting for sub flow calls
+ execution.setVariable("DELVI_type", "generic-vnf")
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Bpmn Request is Null.")
+ }
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DeleteVnfInfra PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DeleteVnfInfra SendSyncResponse Process *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("DELVI_requestId")
+ String vnfId = execution.getVariable("DELVI_vnfId")
+
+ String DeleteVnfResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " DeleteVnfInfra Sync Response is: \n" + DeleteVnfResponse, isDebugEnabled)
+ execution.setVariable("DELVI_sentSyncResponse", true)
+
+ sendWorkflowResponse(execution, 202, DeleteVnfResponse)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in DeleteVnfInfra SendSyncResponse Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra SendSyncResponse Process")
+
+ }
+ 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)
+
+ utils.log("DEBUG", " *** STARTED DeleteVnfInfra PrepareCompletionHandlerRequest Process *** ", isDebugEnabled)
+
+ try {
+ String requestInfo = execution.getVariable("DELVI_requestInfo")
+ requestInfo = utils.removeXmlPreamble(requestInfo)
+ 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">
+ ${requestInfo}
+ <status-message>Vnf has been deleted successfully.</status-message>
+ <vnfId>${vnfId}</vnfId>
+ <mso-bpel-name>DeleteVnfInfra</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ execution.setVariable("DELVI_completionHandlerRequest", request)
+ utils.log("DEBUG", "Completion Handler Request is: " + request, isDebugEnabled)
+
+ execution.setVariable("WorkflowResponse", "Success") // for junits
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in DeleteVnfInfra PrepareCompletionHandlerRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra PrepareCompletionHandlerRequest Process")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra PrepareCompletionHandlerRequest Process ***", isDebugEnabled)
+ }
+
+ public void sendErrorResponse(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DeleteVnfInfra sendErrorResponse Process *** ", isDebugEnabled)
+ try {
+ def sentSyncResponse = execution.getVariable("DELVI_sentSyncResponse")
+ if(sentSyncResponse == false){
+ utils.log("DEBUG", "Sending a Sync Error Response", isDebugEnabled)
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ String response = exceptionUtil.buildErrorResponseXml(wfex)
+
+ utils.logAudit(response)
+ sendWorkflowResponse(execution, 500, response)
+ }else{
+ utils.log("DEBUG", "A Sync Response has already been sent. Skipping Send Sync Error Response.", isDebugEnabled)
+ }
+
+ } catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DeleteVnfInfra sendErrorResponse Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra sendErrorResponse Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra sendErrorResponse Process ***", isDebugEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy
new file mode 100644
index 0000000..8293bfa
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy
@@ -0,0 +1,1281 @@
+/*-
+ * ============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.*
+
+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.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 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()
+
+ /**
+ * Validates the request message and sets up the workflow.
+ * @param execution the execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ 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()
+ }
+
+ 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)
+
+ //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)
+ }
+
+ // 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){
+ throw b
+}catch(Exception e){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
+}
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+
+ /**
+ * Validates a workflow response.
+ * @param execution the execution
+ * @param responseVar the execution variable in which the response is stored
+ * @param responseCodeVar the execution variable in which the response code is stored
+ * @param errorResponseVar the execution variable in which the error response is stored
+ */
+ public void validateWorkflowResponse(Execution execution, String responseVar,
+ String responseCodeVar, String errorResponseVar) {
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
+ }
+
+
+ /**
+ * Sends the empty, synchronous response back to the API Handler.
+ * @param execution the execution
+ */
+ public void sendResponse(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)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Internal Error')
+ }
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+ * A 200 response is expected with the VNF info in the response body. Will find out the base module info
+ * and existing VNF's name for add-on modules
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void postProcessCreateAAIVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.getVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def createResponse = execution.getVariable('DCVFM_createVfModuleResponse')
+ utils.logAudit("createVfModule Response: " + createResponse)
+
+ def rollbackData = execution.getVariable("RollbackData")
+ String vnfName = utils.getNodeText1(createResponse, 'vnf-name')
+ if (vnfName != null) {
+ execution.setVariable('DCVFM_vnfName', vnfName)
+ logDebug("vnfName retrieved from AAI is: " + vnfName, isDebugLogEnabled)
+ rollbackData.put("VFMODULE", "vnfname", vnfName)
+ }
+ String vnfId = utils.getNodeText1(createResponse, 'vnf-id')
+ execution.setVariable('DCVFM_vnfId', vnfId)
+ logDebug("vnfId is: " + vnfId, isDebugLogEnabled)
+ String vfModuleId = utils.getNodeText1(createResponse, 'vf-module-id')
+ execution.setVariable('DCVFM_vfModuleId', vfModuleId)
+ logDebug("vfModuleId is: " + vfModuleId, isDebugLogEnabled)
+ rollbackData.put("VFMODULE", "vnfid", vnfId)
+ rollbackData.put("VFMODULE", "vfmoduleid", vfModuleId)
+ rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true")
+ rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "true")
+ execution.setVariable("RollbackData", rollbackData)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while postProcessing CreateAAIVfModule request:' + ex.getMessage(),isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Bad response from CreateAAIVfModule' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, 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('DCVFM_vnfId')
+ def vfModuleId = execution.getVariable('DCVFM_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('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DCVFM_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("DCVFM_baseVfModuleId", baseModuleId)
+ logDebug('Received baseVfModuleId: ' + baseModuleId, isDebugLogEnabled)
+ String baseModuleHeatStackId = utils.getNodeText1(vfModuleXml, "heat-stack-id")
+ execution.setVariable("DCVFM_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())
+ }
+ }
+
+
+ public void preProcessSDNCAssignRequest(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+ logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled)
+ utils.logAudit("NEW VNF ID: " + vnfId)
+
+ try{
+
+ //Build SDNC Request
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vfModuleId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+
+ String assignSDNCRequest = buildSDNCRequest(execution, svcInstId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("DCVFM_assignSDNCRequest", assignSDNCRequest)
+ 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 preProcessSDNCGetRequest(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ 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()
+ }
+
+ String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vfModuleId
+ def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
+ utils.logAudit("callbackUrl:" + callbackUrl)
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vfModuleId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+
+ //!!!! 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">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.logAudit("SDNCGetRequest: \n" + SDNCGetRequest)
+ execution.setVariable("DCVFM_getSDNCRequest", SDNCGetRequest)
+ utils.log("DEBUG", "Outgoing GetSDNCRequest is: \n" + SDNCGetRequest, isDebugLogEnabled)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occurred Processing preProcessSDNCGetRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
+ }
+ utils.log("DEBUG", "======== COMPLETED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled)
+ }
+
+
+ public void preProcessVNFAdapterRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.VNFAdapterCreateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ //def xml = execution.getVariable("DoCreateVfModuleRequest")
+ //logDebug('VNF REQUEST is: ' + xml, isDebugLogEnabled)
+
+ //Get variables
+ //cloudSiteId
+ def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+ //tenantId
+ def tenantId = execution.getVariable("DCVFM_tenantId")
+ //vnfType
+ def vnfType = execution.getVariable("DCVFM_vnfType")
+ //vnfName
+ def vnfName = execution.getVariable("DCVFM_vnfName")
+ //vnfId
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ //vfModuleName
+ def vfModuleName = execution.getVariable("DCVFM_vfModuleName")
+ //vfModuleModelName
+ def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
+ //vfModuleId
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ //requestId
+ def requestId = execution.getVariable("DCVFM_requestId")
+ //serviceId
+ def serviceId = execution.getVariable("DCVFM_serviceId")
+ //serviceInstanceId
+ def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+ //backoutOnFailure
+ def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure")
+ //volumeGroupId
+ def volumeGroupId = execution.getVariable("DCVFM_volumeGroupId")
+ // baseVfModuleId
+ def baseVfModuleId = execution.getVariable("DCVFM_baseVfModuleId")
+ // baseVfModuleStackId
+ def baseVfModuleStackId = execution.getVariable("DCVFM_baseVfModuleHeatStackId")
+ // asdcServiceModelVersion
+ def asdcServiceModelVersion = execution.getVariable("DCVFM_asdcServiceModelVersion")
+ //volumeGroupStackId
+ def volumeGroupStackId = execution.getVariable("DCVFM_volumeGroupStackId")
+
+ 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")
+
+ utils.logAudit("notificationUrl: " + notificationUrl)
+ utils.logAudit("QualifiedHostName: " + useQualifiedHostName)
+
+ if ('true'.equals(useQualifiedHostName)) {
+ 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 = ""
+ }
+
+ //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)
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = serviceId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+
+
+ def createVnfARequest = """
+ <createVfModuleRequest>
+ <cloudSiteId>${cloudSiteId}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vnfName>${vnfName}</vnfName>
+ <vfModuleName>${vfModuleName}</vfModuleName>
+ <vfModuleId>${vfModuleId}</vfModuleId>
+ <vnfType>${vnfType}</vnfType>
+ <vfModuleType>${vfModuleModelName}</vfModuleType>
+ <vnfVersion>${asdcServiceModelVersion}</vnfVersion>
+ <requestType></requestType>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupStackId>${volumeGroupStackId}</volumeGroupStackId>
+ <baseVfModuleId>${baseVfModuleId}</baseVfModuleId>
+ <baseVfModuleStackId>${baseVfModuleStackId}</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>${backoutOnFailure}</backout>
+ <failIfExists>true</failIfExists>
+ <vfModuleParams>
+ ${vfModuleParams}
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${svcInstId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </createVfModuleRequest>"""
+
+ utils.logAudit("Create VfModule Request to VNF Adapter : " + createVnfARequest)
+ logDebug("Create VfModule Request to VNF Adapter: " + createVnfARequest, isDebugLogEnabled)
+ execution.setVariable("DCVFM_createVnfARequest", createVnfARequest)
+ }
+
+ /**
+ * Validates the request, request id and service instance id. If a problem is found,
+ * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+ * method also sets up the log context for the workflow.
+ * @param execution the execution
+ * @return the validated request
+ */
+ public String validateInfraRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ 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")
+ }
+ utils.logAudit("DoCreateVfModule Request: " + request)
+
+ /*
+
+ def requestId = execution.getVariable("att-mso-request-id")
+
+ if (requestId == null) {
+ createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+ }
+
+ def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ createWorkflowException(execution, 1002, processKey + " request message has no 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")
+ }
+ }
+
+ public boolean isVolumeGroupIdPresent(Execution execution) {
+
+ def method = getClass().getSimpleName() + '.isVolumeGroupIdPresent(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ def request = execution.getVariable('DoCreateVfModuleRequest')
+ String volumeGroupId = utils.getNodeText1(request, "volume-group-id")
+ if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+ logDebug('No volume group id is present', isDebugLogEnabled)
+ return false
+ }
+ else {
+ logDebug('Volume group id is present', isDebugLogEnabled)
+ return true
+ }
+
+ }
+
+ public boolean isVolumeGroupNamePresent(Execution execution) {
+
+ def method = getClass().getSimpleName() + '.isVolumeGroupNamePresent(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ def request = execution.getVariable('DoCreateVfModuleRequest')
+ String volumeGroupName = utils.getNodeText1(request, "volume-group-name")
+ if (volumeGroupName == null || volumeGroupName.isEmpty()) {
+ logDebug('No volume group name is present', isDebugLogEnabled)
+ return false
+ }
+ else {
+ logDebug('Volume group name is present', isDebugLogEnabled)
+ return true
+ }
+
+ }
+
+ public String buildSDNCRequest(Execution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable("DCVFM_sdncCallbackUrl")
+ def requestId = execution.getVariable("DCVFM_requestId")
+ def serviceId = execution.getVariable("DCVFM_serviceId")
+ def vnfType = execution.getVariable("DCVFM_vnfType")
+ def vnfName = execution.getVariable("DCVFM_vnfName")
+ def tenantId = execution.getVariable("DCVFM_tenantId")
+ def source = execution.getVariable("DCVFM_source")
+ def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure")
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ def vfModuleName = execution.getVariable("DCVFM_vfModuleName")
+ def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+
+ String sdncVNFParamsXml = ""
+
+ if(execution.getVariable("DCVFM_vnfParamsExistFlag") == true){
+ sdncVNFParamsXml = buildSDNCParamsXml(execution)
+ }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">
+ <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>${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>
+ ${sdncVNFParamsXml}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.logAudit("sdncRequest: " + sdncRequest)
+ return sdncRequest
+
+ }
+
+ 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("DCVFM_vnfId")
+ String vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ String serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vfModuleId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+ String activateSDNCRequest = buildSDNCRequest(execution, svcInstId, "activate")
+
+ execution.setVariable("DCVFM_activateSDNCRequest", activateSDNCRequest)
+ 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 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("DCVFM_createVnfAResponse")
+ logDebug("VNF Adapter Response is: " + vnfResponse, isDebugLogEnabled)
+ utils.logAudit("createVnfAResponse is: \n" + vnfResponse)
+
+ RollbackData rollbackData = execution.getVariable("RollbackData")
+ if(vnfResponse != null){
+
+ if(vnfResponse.contains("createVfModuleResponse")){
+ logDebug("Received a Good Response from VNF Adapter for CREATE_VF_MODULE Call.", isDebugLogEnabled)
+ execution.setVariable("DCVFM_vnfVfModuleCreateCompleted", true)
+ String heatStackId = utils.getNodeText1(vnfResponse, "vfModuleStackId")
+ execution.setVariable("DCVFM_heatStackId", heatStackId)
+ logDebug("Received heat stack id from VNF Adapter: " + heatStackId, isDebugLogEnabled)
+ rollbackData.put("VFMODULE", "heatstackid", heatStackId)
+ // Parse vnfOutputs for network_fqdn
+ if (vnfResponse.contains("vfModuleOutputs")) {
+ def vfModuleOutputsXml = utils.getNodeXml(vnfResponse, "vfModuleOutputs")
+ InputSource source = new InputSource(new StringReader(vfModuleOutputsXml));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document outputsXml = docBuilder.parse(source)
+
+ NodeList entries = outputsXml.getElementsByTagNameNS("*", "entry")
+ for (int i = 0; i< entries.getLength(); i++) {
+ Node node = entries.item(i)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element element = (Element) node
+ String key = element.getElementsByTagNameNS("*", "key").item(0).getTextContent()
+ if (key.equals("contrail-service-instance-fqdn")) {
+ String contrailServiceInstanceFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained contrailServiceInstanceFqdn: " + contrailServiceInstanceFqdn, isDebugLogEnabled)
+ execution.setVariable("DCVFM_contrailServiceInstanceFqdn", contrailServiceInstanceFqdn)
+ }
+ }
+ }
+ }
+ }else{
+ logDebug("Received a BAD Response from VNF Adapter for CREATE_VF_MODULE Call.", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
+ }
+ }else{
+ logDebug("Response from VNF Adapter is Null for CREATE_VF_MODULE Call.", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Empty response from VNF Adapter")
+ }
+
+ rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "true")
+ execution.setVariable("RollbackData", rollbackData)
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ 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 preProcessUpdateAAIVfModuleRequestOrch(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessUpdateAAIVfModuleRequestOrch(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessUpdateAAIVfModuleRequestOrch ======== ", isDebugLogEnabled)
+
+ try{
+
+ //Build UpdateAAIVfModule Request
+ boolean setContrailServiceInstanceFqdn = false
+ def contrailServiceInstanceFqdn = execution.getVariable("DCVFM_contrailServiceInstanceFqdn")
+ if (!contrailServiceInstanceFqdn.equals("")) {
+ setContrailServiceInstanceFqdn = true
+ }
+
+ String updateAAIVfModuleRequest = buildUpdateAAIVfModuleRequest(execution, false, true, true, setContrailServiceInstanceFqdn)
+
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
+ logDebug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessUpdateAAIVfModuleRequestOrch. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestOrch Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessUpdateAAIVfModuleRequestOrch ======== ", isDebugLogEnabled)
+
+ }
+
+ public void preProcessUpdateAAIVfModuleRequestGroup(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessUpdateAAIVfModuleRequestGroup(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessUpdateAAIVfModuleRequestGroup ======== ", isDebugLogEnabled)
+
+ try{
+
+ //Build UpdateAAIVfModule Request
+
+ String updateAAIVfModuleRequest = buildUpdateAAIVfModuleRequest(execution, true, false, false, false)
+
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
+ logDebug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessUpdateAAIVfModuleRequestGroup. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestGroup Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessUpdateAAIVfModuleRequestGroup ======== ", isDebugLogEnabled)
+
+ }
+
+ 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)
+ RollbackData rollbackData = execution.getVariable("RollbackData")
+
+ if(method.equals("assign")){
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestAssign", "true")
+ execution.setVariable("CRTGVNF_sdncAssignCompleted", true)
+ }
+ else if (method.equals("activate")) {
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "true")
+ }
+ execution.setVariable("RollbackData", rollbackData)
+ }else{
+ logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+ }
+
+ public void preProcessUpdateAfterCreateRequest(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ utils.log("DEBUG", " ======== STARTED preProcessRequest Process ======== ", isDebugLogEnabled)
+ try{
+ String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+ utils.logAudit("DCVFM_assignSDNCAdapterResponse: " + response)
+
+ String data = utils.getNodeXml(response, "response-data")
+ data = data.replaceAll("&lt;", "<")
+ data = data.replaceAll("&gt;", ">")
+ String vnfId = utils.getNodeText1(data, "vnf-id")
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vnfId
+ def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
+ 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">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ execution.setVariable("DCVFM_getSDNCRequest", SDNCGetRequest)
+ utils.log("DEBUG", "Outgoing GetSDNCRequest is: \n" + SDNCGetRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing GetSDNCRequest: " + SDNCGetRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessSDNCGetRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
+ }
+ utils.log("DEBUG", "======== COMPLETED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled)
+ }
+
+ public String buildUpdateAAIVfModuleRequest(Execution execution, boolean updateVolumeGroupId,
+ boolean updateOrchestrationStatus, boolean updateHeatStackId, boolean updateContrailFqdn){
+
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ def volumeGroupIdString = ""
+ if (updateVolumeGroupId) {
+ volumeGroupIdString = "<volume-group-id>" + execution.getVariable("DCVFM_volumeGroupId") +
+ "</volume-group-id>"
+ }
+ def orchestrationStatusString = ""
+ if (updateOrchestrationStatus) {
+ orchestrationStatusString = "<orchestration-status>Created</orchestration-status>"
+ }
+ def heatStackIdString = ""
+ if (updateHeatStackId) {
+ heatStackIdString = "<heat-stack-id>" + execution.getVariable("DCVFM_heatStackId") + "</heat-stack-id>"
+ }
+ def contrailFqdnString = ""
+ if (updateContrailFqdn) {
+ contrailFqdnString = "<contrail-service-instance-fqdn>" + execution.getVariable("DCVFM_contrailServiceInstanceFqdn") +
+ "</contrail-service-instance-fqdn>"
+ }
+
+ String updateAAIVfModuleRequest =
+ """<UpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ ${heatStackIdString}
+ ${orchestrationStatusString}
+ ${volumeGroupIdString}
+ ${contrailFqdnString}
+ </UpdateAAIVfModuleRequest>"""
+
+ utils.logAudit("updateAAIVfModule Request: " + updateAAIVfModuleRequest)
+ return updateAAIVfModuleRequest
+
+ }
+
+ public String buildSDNCParamsXml(Execution execution){
+
+ String params = ""
+ StringBuilder sb = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
+
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String key = entry.getKey();
+ if(key.endsWith("_network")){
+ String requestKey = key.substring(0, key.indexOf("_network"))
+ String requestValue = entry.getValue()
+ paramsXml =
+"""<vnf-networks>
+ <network-role>{ functx:substring-before-match(data($param/@name), '_network') }</network-role>
+ <network-name>{ $param/text() }</network-name>
+</vnf-networks>"""
+ }else{
+ paramsXml = ""
+ }
+ params = sb.append(paramsXml)
+ }
+ return params
+ }
+
+ public void queryCloudRegion (Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ utils.log("DEBUG", " ======== STARTED queryCloudRegion ======== ", isDebugLogEnabled)
+
+ try {
+ String cloudRegion = execution.getVariable("DCVFM_cloudSiteId")
+
+ // 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("CloudRegion Request: " + queryCloudRegionRequest)
+
+ execution.setVariable("DCVFM_queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", "DCVFM_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugLogEnabled)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+ if ((cloudRegion != "ERROR")) {
+ if(execution.getVariable("DCVFM_queryCloudRegionReturnCode") == "404"){
+ execution.setVariable("DCVFM_cloudRegionForVolume", "AAIAIC25")
+ }else{
+ execution.setVariable("DCVFM_cloudRegionForVolume", cloudRegion)
+ }
+ execution.setVariable("DCVFM_isCloudRegionGood", true)
+ } else {
+ String errorMessage = "AAI Query Cloud Region Unsuccessful. AAI Response Code: " + execution.getVariable("DCVFM_queryCloudRegionReturnCode")
+ utils.log("DEBUG", errorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ execution.setVariable("DCVFM_isCloudRegionGood", false)
+ }
+ utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("DCVFM_isCloudRegionGood"), isDebugLogEnabled)
+
+ } catch(BpmnError b){
+ utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugLogEnabled)
+ throw b
+ }catch (Exception ex) {
+ // try error
+ String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + ex.getMessage()
+ utils.log("ERROR", " AAI Query Cloud Region Failed. Exception - " + "\n" + errorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during queryCloudRegion method")
+ }
+ }
+
+ /**
+ *This method occurs when an MSOWorkflowException is caught. It logs the
+ *variables and ensures that the "WorkflowException" Variable is set.
+ *
+ */
+ public void processBPMNException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a BPMN Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processBPMNException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ if(execution.getVariable("WorkflowException") == null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during DoCreateVfModule Sub Process")
+ }
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processBPMNException Method: " + e, isDebugEnabled)
+ }
+ utils.log("DEBUG", "Completed processBPMNException Method", isDebugEnabled)
+ }
+
+ public void prepareCreateAAIVfModuleVolumeGroupRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepareCreateAAIVfModuleVolumeGroupRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED prepareCreateAAIVfModuleVolumeGroupRequest ======== ", isDebugLogEnabled)
+
+ try{
+
+ //Build CreateAAIVfModuleVolumeGroup Request
+
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ def volumeGroupId = execution.getVariable("DCVFM_volumeGroupId")
+ //def aicCloudRegion = execution.getVariable("DCVFM_cloudSiteId")
+ def aicCloudRegion = execution.getVariable("DCVFM_cloudRegionForVolume")
+ String createAAIVfModuleVolumeGroupRequest =
+ """<CreateAAIVfModuleVolumeGroupRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <volume-group-id>${volumeGroupId}</volume-group-id>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ </CreateAAIVfModuleVolumeGroupRequest>"""
+
+ createAAIVfModuleVolumeGroupRequest = utils.formatXml(createAAIVfModuleVolumeGroupRequest)
+ execution.setVariable("DCVFM_createAAIVfModuleVolumeGroupRequest", createAAIVfModuleVolumeGroupRequest)
+ logDebug("Outgoing CreateAAIVfModuleVolumeGroupRequest is: \n" + createAAIVfModuleVolumeGroupRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing CreateAAIVfModuleVolumeGroupRequest is: \n" + createAAIVfModuleVolumeGroupRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing prepareCreateAAIVfModuleVolumeGroupRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareCreateAAIVfModuleVolumeGroupRequest Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED prepareCreateAAIVfModuleVolumeGroupRequest ======== ", isDebugLogEnabled)
+
+ }
+
+
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy
new file mode 100644
index 0000000..76347d5
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy
@@ -0,0 +1,284 @@
+/*-
+ * ============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 DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
+
+ def Prefix="DCVFMR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ 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")
+
+ initProcessVariables(execution)
+
+ def rollbackData = execution.getVariable("RollbackData")
+ String vnfId = rollbackData.get("VFMODULE", "vnfid")
+ execution.setVariable("DCVFMR_vnfId", vnfId)
+ String vfModuleId = rollbackData.get("VFMODULE", "vfmoduleid")
+ execution.setVariable("DCVFMR_vfModuleId", vfModuleId)
+ String source = rollbackData.get("VFMODULE", "source")
+ execution.setVariable("DCVFMR_source", source)
+ String serviceInstanceId = rollbackData.get("VFMODULE", "serviceInstanceId")
+ execution.setVariable("DCVFMR_serviceInstanceId", serviceInstanceId)
+ String serviceId = rollbackData.get("VFMODULE", "service-id")
+ execution.setVariable("DCVFMR_serviceId", serviceId)
+ String vnfType = rollbackData.get("VFMODULE", "vnftype")
+ execution.setVariable("DCVFMR_vnfType", vnfType)
+ String vnfName = rollbackData.get("VFMODULE", "vnfname")
+ execution.setVariable("DCVFMR_vnfName", vnfName)
+ String tenantId = rollbackData.get("VFMODULE", "tenantid")
+ execution.setVariable("DCVFMR_tenantId", tenantId)
+ String vfModuleName = rollbackData.get("VFMODULE", "vfmodulename")
+ execution.setVariable("DCVFMR_vfModuleName", vfModuleName)
+ String vfModuleModelName = rollbackData.get("VFMODULE", "vfmodulemodelname")
+ execution.setVariable("DCVFMR_vfModuleModelName", vfModuleModelName)
+ String cloudSiteId = rollbackData.get("VFMODULE", "aiccloudregion")
+ execution.setVariable("DCVFMR_cloudSiteId", cloudSiteId)
+ String heatStackId = rollbackData.get("VFMODULE", "heatstackid")
+ execution.setVariable("DCVFMR_heatStackId", heatStackId)
+ String requestId = rollbackData.get("VFMODULE", "attmsorequestid")
+ execution.setVariable("DCVFMR_requestId", requestId)
+ //String serviceInstanceId = rollbackData.get("VFMODULE", "attmsoserviceinstanceid")
+ //execution.setVariable("DCVFMR_serviceInstanceId", serviceInstanceId)
+ execution.setVariable("DCVFMR_rollbackPrepareUpdateVfModule", rollbackData.get("VFMODULE", "rollbackPrepareUpdateVfModule"))
+ execution.setVariable("DCVFMR_rollbackUpdateAAIVfModule", rollbackData.get("VFMODULE", "rollbackUpdateAAIVfModule"))
+ execution.setVariable("DCVFMR_rollbackVnfAdapterCreate", rollbackData.get("VFMODULE", "rollbackVnfAdapterCreate"))
+ execution.setVariable("DCVFMR_rollbackSDNCRequestAssign", rollbackData.get("VFMODULE", "rollbackSDNCRequestAssign"))
+ execution.setVariable("DCVFMR_rollbackSDNCRequestActivate", rollbackData.get("VFMODULE", "rollbackSDNCRequestActivate"))
+ execution.setVariable("DCVFMR_rollbackCreateAAIVfModule", rollbackData.get("VFMODULE", "rollbackCreateAAIVfModule"))
+
+ // 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)
+ execution.setVariable("PrepareUpdateAAIVfModuleRequest", request)
+ }
+
+ // 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) {
+ 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")
+ String serviceId = execution.getVariable("DCVFMR_serviceId")
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vnfType = execution.getVariable("DCVFMR_vnfType")
+ String vnfName = execution.getVariable("DCVFMR_vnfName")
+ String tenantId = execution.getVariable("DCVFMR_tenantId")
+ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ String vfModuleName = execution.getVariable("DCVFMR_vfModuleName")
+ String vfModuleModelName = execution.getVariable("DCVFMR_vfModuleModelName")
+ String cloudSiteId = execution.getVariable("DCVFMR_cloudSiteId")
+ String requestId = execution.getVariable("DCVFMR_requestId")
+
+ String serviceInstanceIdToSdnc = ""
+ if (srvInstId != null && !srvInstId.isEmpty()) {
+ serviceInstanceIdToSdnc = srvInstId
+ } else {
+ serviceInstandIdToSdnc = vfModuleId
+ }
+
+ def doSDNCActivateRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestActivate")
+ def doSDNCAssignRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestAssign")
+
+ def action = ""
+ def requestAction = ""
+
+ if (doSDNCActivateRollback.equals("true")) {
+ action = "delete"
+ requestAction = "DisconnectVNFRequest"
+ }
+ else if (doSDNCAssignRollback.equals("true")) {
+ action = "rollback"
+ requestAction = "VNFActivateRequest"
+ }
+ else
+ return
+
+
+ String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://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>${requestAction}</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)
+ 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")
+ String requestId = UUID.randomUUID().toString()
+ String origRequestId = execution.getVariable("DCVFMR_requestId")
+ String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId")
+ String aicCloudRegion = execution.getVariable("DCVFMR_cloudSiteId")
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ String vfModuleStackId = execution.getVariable("DCVFMR_heatStackId")
+ String tenantId = execution.getVariable("DCVFMR_tenantId")
+ def messageId = execution.getVariable('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)
+ 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")
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vfModuleId = execution.getVariable("DCVFMR_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)
+ 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")
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vfModuleId = execution.getVariable("DCVFMR_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)
+ 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);
+ exceptionUtil.buildWorkflowException(execution, 5000, "Failure in DoDeleteVfModule")
+
+ }
+
+ 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/DoCreateVfModuleVolumeV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy
new file mode 100644
index 0000000..12a21c6
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy
@@ -0,0 +1,654 @@
+/*-
+ * ============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.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 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;
+
+class DoCreateVfModuleVolumeV1 extends VfModuleBase {
+
+ String prefix='DCVFMODVOLV1_'
+
+
+ /**
+ * 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)
+ execution.setVariable(prefix+'SuccessIndicator', false)
+
+
+ // INPUT: DoCreateVfModuleVolumeV1Request, att-mso-request-id, volume-group-id, vnf-id, is-vid-request
+ // OUTPUT: DCVFMODVOLV1_SuccessIndicator. WorkflowException
+
+ def volumeRequest = getVariable(execution, 'DoCreateVfModuleVolumeV1Request')
+ if (volumeRequest != null) {
+ execution.setVariable(prefix+'Request', volumeRequest)
+ } else {
+ volumeRequest = getVariable(execution, prefix+'Request')
+ if (volumeRequest == null) {
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'DoCreateVfModuleVolumeV1 received null request.')
+ }
+ }
+
+ def vnfId = execution.getVariable('vnf-id')
+ if (vnfId == null) {
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'DoCreateVfModuleVolumeV1 received null vnf-id.')
+ }
+
+ def volumeGroupId = execution.getVariable('volume-group-id')
+ if (volumeGroupId == null) {
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'DoCreateVfModuleVolumeV1 received null volume-group-id.')
+ }
+
+ def requestId = execution.getVariable("att-mso-request-id")
+ if (requestId == null || requestId == "") {
+ requestId = utils.getNodeText1(volumeRequest, "request-id")
+ }
+
+ //def serviceId = execution.getVariable("att-mso-service-instance-id")
+ //if (serviceId == null || serviceId == "") {
+ def serviceId = utils.getNodeText1(volumeRequest, "service-id")
+ //}
+
+ def source = utils.getNodeText1(volumeRequest, "source")
+
+ execution.setVariable(prefix+'requestId', requestId)
+ execution.setVariable(prefix+'serviceId', serviceId)
+ execution.setVariable(prefix+'source', source)
+
+ // @TODO: for better tracking of logs, should we strip all new lines in the log message?
+ utils.logAudit('Incoming request: ' + volumeRequest)
+
+ // Rollback settings
+ NetworkUtils networkUtils = new NetworkUtils()
+ def rollbackEnabled = networkUtils.isRollbackEnabled(execution,volumeRequest)
+ execution.setVariable(prefix+"rollbackEnabled", rollbackEnabled)
+ utils.log("DEBUG", 'rollbackEnabled: ' + rollbackEnabled, isDebugEnabled)
+
+ }
+
+
+ /**
+ * Get cloud region
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAICloudRegion (Execution execution, isDebugEnabled) {
+
+ def request = execution.getVariable(prefix+'Request')
+ def cloudRegion = utils.getNodeText1(request, "aic-cloud-region")
+ utils.log("DEBUG", 'Request cloud region is: ' + cloudRegion, isDebugEnabled)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryCloudRegionRequest = aaiEndpoint + '/' + cloudRegion
+
+ utils.logAudit(queryCloudRegionRequest)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+ if ((cloudRegion != "ERROR")) {
+ if(execution.getVariable(prefix+"queryCloudRegionReturnCode") == "404"){
+ cloudRegion = "AAIAIC25"
+ }
+ execution.setVariable(prefix+"aicCloudRegion", cloudRegion)
+ utils.log("DEBUG", "AIC Cloud Region: " + cloudRegion, isDebugEnabled)
+ } else {
+ String errorMessage = "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable(prefix+"queryCloudRegionReturnCode")
+ utils.log("DEBUG", errorMessage, isDebugEnabled)
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+ }
+
+
+ /**
+ * Query AAI volume group by name
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAIVolGrpName(Execution execution, isDebugEnabled) {
+
+ def volumeRequest = execution.getVariable(prefix+'Request')
+ def volumeGroupName = utils.getNodeText(volumeRequest, "volume-group-name")
+ def cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
+
+ // Save volume group name
+ execution.setVariable(prefix+'volumeGroupName', volumeGroupName)
+
+ // This is for stub testing
+ def testVolumeGroupName = execution.getVariable('test-volume-group-name')
+ if (testVolumeGroupName != null && testVolumeGroupName.length() > 0) {
+ volumeGroupName = testVolumeGroupName
+ //reset to null
+ execution.setVariable('test-volume-group-name', null)
+ }
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeNameRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups" + "?volume-group-name=" + UriUtils.encode(volumeGroupName, 'UTF-8')
+
+ utils.logAudit('Query AAI volume group by name: ' + queryAAIVolumeNameRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeNameRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query volume group by name return code: " + returnCode)
+ utils.logAudit("AAI query volume group by name response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ execution.setVariable(prefix+"queryAAIVolGrpNameResponse", aaiResponseAsString)
+ execution.setVariable(prefix+'AaiReturnCode', returnCode)
+
+ if (returnCode=='200') {
+ // @TODO: verify error code
+ // @TODO: create class of literals representing error codes
+ execution.setVariable(prefix+'queryAAIVolGrpNameResponse', aaiResponseAsString)
+ utils.log("DEBUG", "Volume Group Name $volumeGroupName exists in AAI.", isDebugEnabled)
+ } else {
+ if (returnCode=='404') {
+ utils.log("DEBUG", "Volume Group Name $volumeGroupName does not exist in AAI.", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $volumeGroupName not found in AAI. Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ /**
+ * Create a WorkflowException
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void buildWorkflowException(Execution execution, int errorCode, errorMessage, isDebugEnabled) {
+ utils.log("DEBUG", errorMessage, isDebugEnabled)
+ (new ExceptionUtil()).buildWorkflowException(execution, 2500, errorMessage)
+ }
+
+
+ /**
+ * Create a WorkflowException
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void handleError(Execution execution, isDebugEnabled) {
+ WorkflowException we = execution.getVariable('WorkflowException')
+ if (we == null) {
+ (new ExceptionUtil()).buildWorkflowException(execution, 2500, "Enexpected error encountered!")
+ }
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ /**
+ * Create volume group in AAI
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTCreateAAIVolGrpName(Execution execution, isDebugEnabled) {
+
+ def volumeRequest = execution.getVariable(prefix+'Request')
+ def vnfId = execution.getVariable('vnf-id')
+ def volumeName = utils.getNodeText(volumeRequest, "volume-group-name")
+
+ def cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
+ def groupId = execution.getVariable('volume-group-id')
+ utils.log("DEBUG", "volume group id: " + groupId, isDebugEnabled)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String createAAIVolumeGrpNameUrlRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group/" + UriUtils.encode(groupId, "UTF-8")
+
+ String namespace = aaiUtil.getNamespaceFromUri(aaiUtil.getCloudInfrastructureCloudRegionUri(execution))
+ utils.log("DEBUG", "AAI namespace is: " + namespace, isDebugEnabled)
+
+ utils.logAudit(createAAIVolumeGrpNameUrlRequest)
+
+ //Prepare payload (PUT)
+ def vnfType = utils.getNodeText(volumeRequest, "vnf-type")
+ def tenantId = utils.getNodeText(volumeRequest, "tenant-id")
+
+ NetworkUtils networkUtils = new NetworkUtils()
+ String payload = networkUtils.createCloudRegionVolumeRequest(groupId, volumeName, vnfType, vnfId, tenantId, cloudRegion, namespace)
+ String payloadXml = utils.formatXml(payload)
+ utils.logAudit(payloadXml)
+
+ APIResponse response = aaiUtil.executeAAIPutCall(execution, createAAIVolumeGrpNameUrlRequest, payloadXml)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI create volume group return code: " + returnCode)
+ utils.logAudit("AAI create volume group response: " + aaiResponseAsString)
+
+ execution.setVariable(prefix+"createAAIVolumeGrpNameReturnCode", returnCode)
+ execution.setVariable(prefix+"createAAIVolumeGrpNameResponse", aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode =='201') {
+ execution.setVariable(prefix+"isAAIRollbackNeeded", true)
+ } else {
+ execution.setVariable(prefix+"isErrorMessageException", true)
+ if (returnCode=='404') {
+ // @TODO: verify return code and make static LITERAL
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Unable to create volume group in AAI. Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ utils.log("DEBUG", " AAI Adapter Query Failed. WorkflowException - " + "\n" + aWorkflowException, isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ /**
+ * Prepare VNF adapter create request XML
+ * @param execution
+ */
+ public void prepareVnfAdapterCreateRequest(Execution execution, isDebugEnabled) {
+
+
+ def volumeRequest = execution.getVariable(prefix+'Request')
+ def requestId = execution.getVariable(prefix+'requestId')
+ def serviceId = execution.getVariable(prefix+'serviceId')
+
+ def aaiGenericVnfResponse = execution.getVariable(prefix+'AAIQueryGenericVfnResponse')
+ def vnfId = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-id')
+ def vnfName = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-name')
+
+ String messageId = UUID.randomUUID()
+ utils.log("DEBUG", "messageId to be used is generated: " + messageId, isDebugEnabled)
+
+ // prepare vnf request for vnfAdapterCreateV1
+ def cloudSiteId = utils.getNodeText1(volumeRequest, 'aic-cloud-region')
+ def tenantId = utils.getNodeText1(volumeRequest, "tenant-id")
+ def vnfType = utils.getNodeText1(volumeRequest, "vnf-type")
+ def vnfVersion = utils.getNodeText1(volumeRequest, "asdc-service-model-version")
+ def vnfModuleType = utils.getNodeText1(volumeRequest, "vf-module-model-name")
+ def volumeGroupnName = utils.getNodeText1(volumeRequest, "volume-group-name")
+
+ def volumeParamsXml = utils.getNodeXml(volumeRequest, 'volume-params')
+ def volumeGroupParams = transformVolumeParamsToEntries(volumeParamsXml)
+
+ utils.log("DEBUG", "volumeGroupParams: "+ volumeGroupParams, isDebugEnabled)
+
+ String volumeGroupId = execution.getVariable('volume-group-id')
+ 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)
+ }
+ utils.log("DEBUG", "CreateVfModuleVolume - notificationUrl: "+ notificationUrl, isDebugEnabled)
+
+ def backoutOnFailure = execution.getVariable("DCVFMODVOLV1_rollbackEnabled")
+ utils.log("DEBUG", "backoutOnFailure: "+ backoutOnFailure, isDebugEnabled)
+
+ // build request
+ String vnfSubCreateWorkflowRequest =
+ """
+ <createVolumeGroupRequest>
+ <cloudSiteId>${cloudSiteId}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vnfName>${vnfName}</vnfName>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupName>${volumeGroupnName}</volumeGroupName>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion>${vnfVersion}</vnfVersion>
+ <vfModuleType>${vnfModuleType}</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>${volumeGroupnName}</value>
+ </entry>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <backout>${backoutOnFailure}</backout>
+ <failIfExists>true</failIfExists>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </createVolumeGroupRequest>
+ """
+
+ String vnfSubCreateWorkflowRequestAsString = utils.formatXml(vnfSubCreateWorkflowRequest)
+ utils.logAudit(vnfSubCreateWorkflowRequestAsString)
+ execution.setVariable(prefix+"createVnfARequest", vnfSubCreateWorkflowRequestAsString)
+
+ // build rollback request for use later if needed
+
+ String vnfSubRollbackWorkflowRequest =
+ """<rollbackVolumeGroupRequest>
+ <cloudSiteId>${cloudSiteId}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <skipAAI>true</skipAAI>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </rollbackVolumeGroupRequest>"""
+
+ utils.log("DEBUG", "Sub Vnf flow rollback request: vnfSubRollbackWorkflowRequest " + "\n" + vnfSubRollbackWorkflowRequest, isDebugEnabled)
+
+ String vnfSubRollbackWorkflowRequestAsString = utils.formatXml(vnfSubRollbackWorkflowRequest)
+ execution.setVariable(prefix+"rollbackVnfARequest", vnfSubRollbackWorkflowRequestAsString)
+ }
+
+
+
+ /**
+ * Update voulume group in AAI
+ * @TODO: Can we re-use the create method??
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTUpdateCreatedVolGrpName(Execution execution, isDebugEnabled) {
+
+ // get variables
+ String requeryAAIVolGrpNameResponse = execution.getVariable(prefix+"queryAAIVolGrpNameResponse")
+ String volumeGroupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
+ String cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String updateAAIVolumeGroupUrlRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, 'UTF-8')
+
+ String namespace = aaiUtil.getNamespaceFromUri(aaiUtil.getCloudInfrastructureCloudRegionUri(execution))
+
+ utils.logAudit(updateAAIVolumeGroupUrlRequest)
+
+ //Prepare payload (PUT)
+ String createVnfAResponse = execution.getVariable(prefix+"createVnfAResponse")
+
+ // @TODO: revisit
+ // if VID request createVnfresponse will be null, use vnf from JSON request
+ def vnfId = ""
+ if(createVnfAResponse == null || createVnfAResponse == "") {
+ vnfId = execution.getVariable(prefix+'vnfId')
+ }
+ else {
+ vnfId = utils.getNodeText(createVnfAResponse, "volumeGroupStackId")
+ }
+
+ NetworkUtils networkUtils = new NetworkUtils()
+ String payload = networkUtils.updateCloudRegionVolumeRequest(requeryAAIVolGrpNameResponse, vnfId, namespace)
+ String payloadXml = utils.formatXml(payload)
+
+ //execution.setVariable(prefix+"updateCreatedAAIVolumeGrpNamePayloadRequest", payloadXml)
+ utils.logAudit(payload)
+ //utils.log("DEBUG", " 'payload' to Update Created VolumeGroupName - " + "\n" + payloadXml, isDebugEnabled)
+
+ APIResponse response = aaiUtil.executeAAIPutCall(execution, updateAAIVolumeGroupUrlRequest, payloadXml)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI create volume group return code: " + returnCode)
+ utils.logAudit("AAI create volume group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode =='200') {
+ execution.setVariable(prefix+"updateCreatedAAIVolumeGrpNameResponse", aaiResponseAsString)
+ execution.setVariable(prefix+"isPONR", true)
+ } else {
+ execution.setVariable(prefix+"isErrorMessageException", true)
+ if (returnCode=='404') {
+ // @TODO: verify return code and make static LITERAL
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Unable to update volume group in AAI. Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ utils.log("DEBUG", " AAI Adapter Query Failed. WorkflowException - " + "\n" + aWorkflowException, isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ /**
+ * Query AAI service instance
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAIGenericVnf(Execution execution, isDebugEnabled) {
+
+ def request = execution.getVariable(prefix+"Request")
+ def vnfId = execution.getVariable('vnf-id')
+
+ 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(prefix+'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")
+ }
+ }
+ }
+
+ public void callRESTDeleteAAIVolumeGroup(Execution execution, isDebugEnabled) {
+
+ callRESTQueryAAIVolGrpName(execution, isDebugEnabled)
+
+ def queryAaiVolumeGroupResponse = execution.getVariable(prefix+'queryAAIVolGrpNameResponse')
+
+ def volumeGroupId = utils.getNodeText(queryAaiVolumeGroupResponse, "volume-group-id")
+ def resourceVersion = utils.getNodeText(queryAaiVolumeGroupResponse, "resource-version")
+
+ def cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String deleteAAIVolumeGrpIdRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group" + '/' + volumeGroupId + "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+
+ utils.logAudit('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
+
+ 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()
+
+ def volumeGroupNameFound = prefix+'volumeGroupNameFound'
+ if (returnCode=='200' || returnCode=='204' ) {
+ utils.log("DEBUG", "Volume group $volumeGroupId deleted.", isDebugEnabled)
+ } else {
+ if (returnCode=='404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $volumeGroupId not found for delete in AAI Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+
+
+
+ public void prepareSuccessDBRequest(Execution execution, isDebugEnabled) {
+ String requestId = execution.getVariable(prefix+'requestId')
+ String dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
+ prepareDBRequest(execution, requestId, "VolumeGroup successfully created.", "COMPLETED", "100", dbVnfOutputs, isDebugEnabled)
+ }
+
+ public void prepareFailDbRequest(Execution execution, isDebugEnabled) {
+
+ WorkflowException we = execution.getVariable("WorkflowException")
+
+ String requestId = execution.getVariable(prefix+'requestId')
+ String dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
+ prepareDBRequest(execution, requestId, we.getErrorMessage(), "FAILURE", "", dbVnfOutputs, isDebugEnabled)
+
+ }
+
+
+ /**
+ * Prepare Infra DB XML Request
+ * @param execution
+ */
+ public void prepareDBRequest (Execution execution, String requestId, String statusMessage, String requestStatus, String progress, String dbVnfOutputs, 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>${requestStatus}</requestStatus>
+ <progress>${progress}</progress>
+ <vnfOutputs>${dbVnfOutputs}</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+ String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+
+ execution.setVariable(prefix+"createDBRequest", buildDeleteDBRequestAsString)
+
+ utils.logAudit(buildDeleteDBRequestAsString)
+ }
+
+
+
+
+ public void postProcessResponse (Execution execution, isDebugEnabled) {
+
+ String dbReturnCode = execution.getVariable(prefix+"dbReturnCode")
+ utils.log("DEBUG", "DB Update Response Code : " + dbReturnCode, isDebugEnabled)
+
+ String createDBResponse = execution.getVariable(prefix+"createDBResponse")
+ utils.logAudit(createDBResponse)
+
+ String source = execution.getVariable(prefix+"source")
+ 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">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:mso-bpel-name>BPEL Volume Group action: CREATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+ utils.logAudit(xmlMsoCompletionRequest)
+
+ // normal path
+ if (dbReturnCode == "200") {
+ execution.setVariable(prefix+"Success", true)
+ execution.setVariable(prefix+"CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ } else {
+ execution.setVariable(prefix+"isErrorMessageException", true)
+ utils.log("DEBUG", " DB Update failed, code: " + dbReturnCode + ", going to Unexpected Error.", 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
new file mode 100644
index 0000000..5b726a0
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoDeleteVfModule.groovy
@@ -0,0 +1,264 @@
+/*-
+ * ============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/DoUpdateVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoUpdateVfModule.groovy
new file mode 100644
index 0000000..35600bc
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoUpdateVfModule.groovy
@@ -0,0 +1,793 @@
+/*-
+ * ============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())
+ }
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy
new file mode 100644
index 0000000..2f32367
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy
@@ -0,0 +1,509 @@
+/*-
+ * ============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
+
+ }
+
+
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy
new file mode 100644
index 0000000..eefcf47
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy
@@ -0,0 +1,402 @@
+/*-
+ * ============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)
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy
new file mode 100644
index 0000000..53cd254
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy
@@ -0,0 +1,303 @@
+/*-
+ * ============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)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy
new file mode 100644
index 0000000..c68ea47
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy
@@ -0,0 +1,276 @@
+/*-
+ * ============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)
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy
new file mode 100644
index 0000000..89728bf
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy
@@ -0,0 +1,379 @@
+/*-
+ * ============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)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy
new file mode 100644
index 0000000..81c8c01
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy
@@ -0,0 +1,276 @@
+/*-
+ * ============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)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy
new file mode 100644
index 0000000..40948dc
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy
@@ -0,0 +1,178 @@
+/*-
+ * ============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)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy
new file mode 100644
index 0000000..9f21faa
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy
@@ -0,0 +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.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)
+ }
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy
new file mode 100644
index 0000000..2721a20
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy
@@ -0,0 +1,864 @@
+/*-
+ * ============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
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy
new file mode 100644
index 0000000..7d2c53d
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy
@@ -0,0 +1,1325 @@
+/*-
+ * ============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
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy
new file mode 100644
index 0000000..b34467e
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy
@@ -0,0 +1,363 @@
+/*-
+ * ============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)
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy
new file mode 100644
index 0000000..8bd6983
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy
@@ -0,0 +1,368 @@
+/*-
+ * ============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)
+
+ 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)
+ }
+
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy
new file mode 100644
index 0000000..0a280b2
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy
@@ -0,0 +1,837 @@
+/*-
+ * ============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;", ">")
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy
new file mode 100644
index 0000000..27699ca
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy
@@ -0,0 +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);
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy
new file mode 100644
index 0000000..16edaf1
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy
@@ -0,0 +1,330 @@
+/*-
+ * ============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)
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy
new file mode 100644
index 0000000..b8b8b8b
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy
@@ -0,0 +1,416 @@
+/*-
+ * ============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)
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy
new file mode 100644
index 0000000..77f4768
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy
@@ -0,0 +1,1664 @@
+/*-
+ * ============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>UpdateNetworkInstanceInfra.bpmn</class> process.
+ */
+public class UpdateNetworkInstanceInfra 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>UpdateNetworkInstanceInfra.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("UPDNETI_messageId", "")
+ execution.setVariable("BasicAuthHeaderValuePO", "")
+ execution.setVariable("BasicAuthHeaderValueSDNC", "")
+ execution.setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", "")
+ execution.setVariable("UPDNETI_networkRequest", "")
+ execution.setVariable("UPDNETI_networkInputs", "")
+ execution.setVariable("UPDNETI_networkOutputs", "")
+ execution.setVariable("UPDNETI_requestId", "")
+ execution.setVariable("UPDNETI_source", "")
+ execution.setVariable("UPDNETI_networkId", "")
+
+ execution.setVariable("UPDNETI_CompleteMsoProcessRequest", "")
+ execution.setVariable("UPDNETI_FalloutHandlerRequest", "")
+ execution.setVariable("UPDNETI_isSilentSuccess", false)
+ execution.setVariable("UPDNETI_isPONR", false) // Point-of-no-return, means, rollback is not needed
+
+ // AAI query Cloud Region
+ execution.setVariable("UPDNETI_queryCloudRegionRequest","")
+ execution.setVariable("UPDNETI_queryCloudRegionReturnCode","")
+ execution.setVariable("UPDNETI_queryCloudRegionResponse","")
+ execution.setVariable("UPDNETI_cloudRegionPo","")
+ execution.setVariable("UPDNETI_cloudRegionSdnc","")
+ execution.setVariable("UPDNETI_isCloudRegionGood", false)
+
+ // AAI query Id
+ execution.setVariable("UPDNETI_queryIdAAIRequest","")
+ execution.setVariable("UPDNETI_queryIdAAIResponse", "")
+ execution.setVariable("UPDNETI_aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ execution.setVariable("UPDNETI_queryVpnBindingAAIRequest","")
+ execution.setVariable("UPDNETI_queryVpnBindingAAIResponse", "")
+ execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "")
+ execution.setVariable("UPDNETI_vpnBindings", null)
+ execution.setVariable("UPDNETI_vpnCount", 0)
+ execution.setVariable("UPDNETI_routeCollection", "")
+
+ // AAI query network policy
+ execution.setVariable("UPDNETI_queryNetworkPolicyAAIRequest","")
+ execution.setVariable("UPDNETI_queryNetworkPolicyAAIResponse", "")
+ execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "")
+ execution.setVariable("UPDNETI_networkPolicyUriList", null)
+ execution.setVariable("UPDNETI_networkPolicyCount", 0)
+ execution.setVariable("UPDNETI_networkCollection", "")
+
+ // AAI query route table reference
+ execution.setVariable("UPDNETI_queryNetworkTableRefAAIRequest","")
+ execution.setVariable("UPDNETI_queryNetworkTableRefAAIResponse", "")
+ execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "")
+ execution.setVariable("UPDNETI_networkTableRefUriList", null)
+ execution.setVariable("UPDNETI_networkTableRefCount", 0)
+ execution.setVariable("UPDNETI_tableRefCollection", "")
+
+ // AAI requery Id
+ execution.setVariable("UPDNETI_requeryIdAAIRequest","")
+ execution.setVariable("UPDNETI_requeryIdAAIResponse", "")
+ execution.setVariable("UPDNETI_aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ execution.setVariable("UPDNETI_updateContrailAAIUrlRequest","")
+ execution.setVariable("UPDNETI_updateContrailAAIPayloadRequest","")
+ execution.setVariable("UPDNETI_updateContrailAAIResponse", "")
+ execution.setVariable("UPDNETI_aaiUpdateContrailReturnCode", "")
+
+ execution.setVariable("UPDNETI_updateNetworkRequest", "")
+ execution.setVariable("UPDNETI_updateNetworkResponse", "")
+ execution.setVariable("UPDNETI_rollbackNetworkRequest", "")
+ execution.setVariable("UPDNETI_rollbackNetworkResponse", "")
+ execution.setVariable("UPDNETI_networkReturnCode", "")
+ execution.setVariable("UPDNETI_rollbackNetworkReturnCode", "")
+ execution.setVariable("UPDNETI_isNetworkRollbackNeeded", false)
+
+ execution.setVariable("UPDNETI_changeAssignSDNCRequest", "")
+ execution.setVariable("UPDNETI_changeAssignSDNCResponse", "")
+ execution.setVariable("UPDNETI_rollbackSDNCRequest", "")
+ execution.setVariable("UPDNETI_rollbackSDNCResponse", "")
+ execution.setVariable("UPDNETI_sdncReturnCode", "")
+ execution.setVariable("UPDNETI_rollbackSDNCReturnCode", "")
+ execution.setVariable("UPDNETI_isSdncRollbackNeeded", false)
+ execution.setVariable("UPDNETI_sdncResponseSuccess", false)
+
+ execution.setVariable("UPDNETI_updateDBRequest", "")
+ execution.setVariable("UPDNETI_updateDBResponse", "")
+ execution.setVariable("UPDNETI_dbReturnCode", "")
+
+ execution.setVariable("UPDNETI_isVnfBindingPresent", false)
+ execution.setVariable("UPDNETI_Success", false)
+ execution.setVariable("UPDNETI_serviceInstanceId", "")
+ 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>UpdateNetworkInstanceInfra.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest UpdateNetworkInstanceInfra Request ***** ", isDebugEnabled)
+
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // get Incoming request & validate json format
+ String updateNetworkJsonIncoming = execution.getVariable("bpmnRequest")
+ utils.logAudit(updateNetworkJsonIncoming)
+ try {
+ def prettyJson = JsonOutput.prettyPrint(updateNetworkJsonIncoming.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("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", updateNetworkJsonIncoming)
+
+ // recreate the xml network-request
+ String networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, updateNetworkJsonIncoming)
+ execution.setVariable("UPDNETI_networkRequest", networkRequest)
+ utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled)
+
+ String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+ execution.setVariable("UPDNETI_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("UPDNETI_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("UPDNETI_requestId", requestId)
+ execution.setVariable("UPDNETI_source", utils.getNodeText1(networkRequest, "source"))
+
+ // prepare messageId
+ String messageId = execution.getVariable("UPDNETI_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("UPDNETI_messageId", messageId)
+
+ // validate 'backout-on-failure' to override 'URN_mso_rollback'
+ boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
+ execution.setVariable("UPDNETI_rollbackEnabled", rollbackEnabled)
+
+ 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)
+ }
+ }
+
+ execution.setVariable("UPDNETI_serviceInstanceId", serviceInstanceId)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ sendSyncError(execution)
+ // caught exception
+ String exceptionMessage = "Exception Encountered in UpdateNetworkInstanceInfra, 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 UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ String serviceInstanceId = execution.getVariable("UPDNETI_serviceInstanceId")
+ String requestId = execution.getVariable("att-mso-request-id")
+
+ // 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 UpdateNetworkInstanceInfra flow. sendSyncResponse() - " + 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 UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+ try {
+ String networkInputs = execution.getVariable("UPDNETI_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("UPDNETI_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("UPDNETI_cloudRegionPo", cloudRegionPo)
+ execution.setVariable("UPDNETI_cloudRegionSdnc", cloudRegionSdnc)
+ execution.setVariable("UPDNETI_isCloudRegionGood", true)
+
+ } else {
+ String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable("UPDNETI_queryCloudRegionReturnCode")
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("UPDNETI_isCloudRegionGood"), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkRequest = execution.getVariable("UPDNETI_networkRequest")
+ String networkId = utils.getNodeText1(networkRequest, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ execution.setVariable("UPDNETI_networkId", networkId)
+ String messageId = execution.getVariable("UPDNETI_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("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()
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_aaiIdReturnCode", returnCode)
+
+ utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable("UPDNETI_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 UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkId = utils.getNodeText1(execution.getVariable("UPDNETI_changeAssignSDNCResponse"), "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String messageId = execution.getVariable("UPDNETI_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("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()
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_aaiRequeryIdReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable("UPDNETI_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("UPDNETI_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 UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+ try {
+
+ // get variables
+ String messageId = execution.getVariable("UPDNETI_messageId")
+ String queryIdAAIResponse = execution.getVariable("UPDNETI_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("UPDNETI_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("UPDNETI_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("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()
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_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("UPDNETI_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("UPDNETI_routeCollection", routeTargets)
+ utils.log("DEBUG", " UPDNETI_routeCollection - " + '\n' + routeTargets, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable("UPDNETI_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("UPDNETI_queryVpnBindingAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable("UPDNETI_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 UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String messageId = execution.getVariable("UPDNETI_messageId")
+ String queryIdAAIResponse = execution.getVariable("UPDNETI_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("UPDNETI_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("UPDNETI_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("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()
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_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("UPDNETI_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("UPDNETI_networkCollection", networkPolicies)
+ utils.log("DEBUG", " UPDNETI_networkCollection - " + '\n' + networkPolicies, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable("UPDNETI_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("UPDNETI_queryNetworkPolicyAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable("UPDNETI_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 UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String messageId = execution.getVariable("UPDNETI_messageId")
+ String queryIdAAIResponse = execution.getVariable("UPDNETI_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("UPDNETI_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("UPDNETI_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("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()
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_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("UPDNETI_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("UPDNETI_tableRefCollection", networkTableRefs)
+ utils.log("DEBUG", " UPDNETI_tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable("UPDNETI_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("UPDNETI_queryNetworkTableRefAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable("UPDNETI_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 UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkId = utils.getNodeText1(execution.getVariable("UPDNETI_changeAssignSDNCResponse"), "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String requeryIdAAIResponse = execution.getVariable("UPDNETI_requeryIdAAIResponse")
+ String updateNetworkResponse = execution.getVariable("UPDNETI_updateNetworkResponse")
+ String messageId = execution.getVariable("UPDNETI_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("UPDNETI_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("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)
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_aaiUpdateContrailReturnCode", returnCode)
+
+ utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiUpdateContrailResponseAsString)
+ execution.setVariable("UPDNETI_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("UPDNETI_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 UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String requestId = execution.getVariable("UPDNETI_requestId")
+ String messageId = execution.getVariable("UPDNETI_messageId")
+ String source = execution.getVariable("UPDNETI_source")
+
+ String requestInput = execution.getVariable("UPDNETI_networkRequest")
+ String queryIdResponse = execution.getVariable("UPDNETI_requeryIdAAIResponse")
+ String cloudRegionId = execution.getVariable("UPDNETI_cloudRegionPo")
+ String backoutOnFailure = execution.getVariable("UPDNETI_rollbackEnabled")
+
+ // Prepare Network request
+ String routeCollection = execution.getVariable("UPDNETI_routeCollection")
+ String policyCollection = execution.getVariable("UPDNETI_networkCollection")
+ String tableCollection = execution.getVariable("UPDNETI_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("UPDNETI_updateNetworkRequest", buildUpdateNetworkRequestAsString)
+ utils.log("DEBUG", " UPDNETI_updateNetworkRequest - " + "\n" + buildUpdateNetworkRequestAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String updateNetworkInput = execution.getVariable("UPDNETI_networkRequest")
+ String cloudRegionId = execution.getVariable("UPDNETI_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)
+
+ String sndcTopologyUpdateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ utils.logAudit(sndcTopologyUpdateRequesAsString)
+ execution.setVariable("UPDNETI_changeAssignSDNCRequest", sndcTopologyUpdateRequesAsString)
+ utils.log("DEBUG", " UPDNETI_changeAssignSDNCRequest - " + "\n" + sndcTopologyUpdateRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+ String networkOutputs = execution.getVariable("UPDNETI_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("UPDNETI_requestId")
+
+ String statusMessage = "Network successfully updated."
+
+ 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("UPDNETI_updateDBRequest", buildDeleteDBRequestAsString)
+ utils.log("DEBUG", " DB Adapter Request - " + "\n" + buildDeleteDBRequestAsString, isDebugEnabled)
+ utils.logAudit(buildDeleteDBRequestAsString)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** ", 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("UPDNETI_networkOutputs")
+ String requestId = execution.getVariable("UPDNETI_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("UPDNETI_updateDBRequest", dbRequest)
+ utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+ utils.logAudit(dbRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareDBRequestError() - " + 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 UpdateNetworkInstanceInfra *****", isDebugEnabled)
+
+ try {
+ String returnCode = execution.getVariable("UPDNETI_networkReturnCode")
+ String networkResponse = execution.getVariable("UPDNETI_updateNetworkResponse")
+ if (networkResponse==null) {
+ networkResponse="" // reset
+ }
+
+ utils.log("DEBUG", " Network Adapter update responseCode: " + returnCode, isDebugEnabled)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ execution.setVariable("UPDNETI_isNetworkRollbackNeeded", true)
+ utils.logAudit(networkResponse)
+ execution.setVariable("UPDNETI_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","")
+ String rollbackNetwork =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://com.att.mso/network">
+ ${rollbackData}
+ </NetworkAdapter:rollbackNetwork>"""
+ String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+ execution.setVariable("UPDNETI_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 UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+ String response = execution.getVariable("UPDNETI_changeAssignSDNCResponse")
+ WorkflowException workflowException = null
+ try {
+ workflowException = execution.getVariable("UPDNETI_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("UPDNETI_changeAssignSDNCResponse"))
+ changeAssignSDNCResponseDecodeXml = changeAssignSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable("UPDNETI_changeAssignSDNCResponse", changeAssignSDNCResponseDecodeXml)
+
+ if (execution.getVariable("UPDNETI_sdncResponseSuccess") == true) { // from sdnc util, prefix+'sdncResponseSuccess'
+ execution.setVariable("UPDNETI_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 UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ // Display DB response: UPDNETI_updateDBResponse / UPDNETI_dbReturnCode
+ String dbReturnCode = execution.getVariable("UPDNETI_dbReturnCode")
+ utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled)
+ String updateDBResponse = execution.getVariable("UPDNETI_updateDBResponse")
+ utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + updateDBResponse, isDebugEnabled)
+ utils.logAudit(updateDBResponse)
+
+ String source = execution.getVariable("UPDNETI_source")
+ 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">
+ <request-id>${requestId}</request-id>
+ <action>UPDATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ if (dbReturnCode == "200") {
+ utils.logAudit(updateDBResponse)
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable("UPDNETI_Success", true)
+ execution.setVariable("UPDNETI_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)
+
+ }
+
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra 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 UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException.
+ execution.setVariable("UPDNETI_WorkflowException", execution.getVariable("WorkflowException"))
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String updateNetworkInput = execution.getVariable("UPDNETI_networkRequest")
+ String cloudRegionId = execution.getVariable("UPDNETI_cloudRegionSdnc")
+ String changeAssignSDNCResponse = execution.getVariable("UPDNETI_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)
+ 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)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra 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 {
+ // Note: Updates do not support rollback. To restore a previous state, another Update would be needed to revert to the original settings.
+ // This would need to be managed by the client.
+ String rollbackNetworkErrorMessages = ""
+ Boolean isNetworkRollbackNeeded = execution.getVariable("UPDNETI_isNetworkRollbackNeeded")
+ if (isNetworkRollbackNeeded == true) {
+ rollbackNetworkErrorMessages = " + PO Network rollback is not supported for Update. Submit another Update to restore/rollback."
+ }
+
+ // validate SDNC rollback response
+ String rollbackSdncErrorMessages = ""
+ Boolean isSdncRollbackNeeded = execution.getVariable("UPDNETI_isSdncRollbackNeeded")
+ if (isSdncRollbackNeeded == true) {
+ String rollbackSDNCReturnCode = execution.getVariable("UPDNETI_rollbackSDNCReturnCode")
+ String rollbackSDNCReturnInnerCode = ""
+ String rollbackSDNCResponse = execution.getVariable("UPDNETI_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("UPDNETI_WorkflowException") instanceof WorkflowException) {
+ // get saved WorkflowException
+ WorkflowException swfe = execution.getVariable("UPDNETI_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 UpdateNetworkInstanceInfra 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("UPDNETI_dbReturnCode")
+ utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled)
+ String updateDBResponse = execution.getVariable("UPDNETI_updateDBResponse")
+ utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + updateDBResponse, isDebugEnabled)
+ utils.logAudit(updateDBResponse)
+
+ String falloutHandlerRequest = ""
+ String requestId = execution.getVariable("UPDNETI_requestId")
+ String source = execution.getVariable("UPDNETI_source")
+ try {
+ execution.setVariable("UPDNETI_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>UPDATE</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("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ 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">
+ <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:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("UPDNETI_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 UpdateNetworkInstanceInfra 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/UpdateVfModuleInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy
new file mode 100644
index 0000000..57c5269
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy
@@ -0,0 +1,426 @@
+/*-
+ * ============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 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 UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'UPDVfModI_')
+ execution.setVariable('UPDVfModI_Request', null)
+ execution.setVariable('UPDVfModI_requestInfo', null)
+ execution.setVariable('UPDVfModI_requestId', null)
+ execution.setVariable('UPDVfModI_source', null)
+ execution.setVariable('UPDVfModI_vnfInputs', null)
+ execution.setVariable('UPDVfModI_vnfId', null)
+ execution.setVariable('UPDVfModI_vfModuleId', null)
+ execution.setVariable('UPDVfModI_tenantId', null)
+ execution.setVariable('UPDVfModI_volumeGroupId', null)
+ execution.setVariable('UPDVfModI_vnfParams', null)
+ execution.setVariable('UPDVfModI_updateInfraRequest', null)
+ execution.setVariable('UpdateVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ 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")
+
+ }
+ catch(groovy.json.JsonException je) {
+ utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
+ workflowException(execution, "Invalid request format", 400)
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
+ workflowException(execution, restFaultMessage, 400)
+ }
+
+
+ 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'))
+ execution.setVariable('UPDVfModI_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('UPDVfModI_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ execution.setVariable('UPDVfModI_volumeGroupId', getNodeTextForce(vnfInputs, 'volume-group-id'))
+
+ def vnfParams = utils.getNodeXml(request, 'vnf-params')
+ execution.setVariable('UPDVfModI_vnfParams', vnfParams)
+
+ 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 and send the sychronous 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('UPDVfModI_requestInfo')
+ def requestId = execution.getVariable('UPDVfModI_requestId')
+ def source = execution.getVariable('UPDVfModI_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vfModuleId = execution.getVariable("vfModuleId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ 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())
+ }
+ }
+
+ /**
+ * 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)
+ createWorkflowException(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('UPDVfModI_requestId')
+ def vnfId = execution.getVariable('UPDVfModI_vnfId')
+ def vfModuleId = execution.getVariable('UPDVfModI_vfModuleId')
+ def tenantId = execution.getVariable('UPDVfModI_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfModI_volumeGroupId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://com.att.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('UPDVfModI_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(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, '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">
+ ${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)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(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-info', 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://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">
+ ${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)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ /**
+ * Validates the request, request id and service instance id. If a problem is found,
+ * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+ * method also sets up the log context for the workflow.
+ * @param execution the execution
+ * @return the validated request
+ */
+ public String validateInfraRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String processKey = getProcessKey(execution);
+ def prefix = execution.getVariable("prefix")
+
+ if (prefix == null) {
+ createWorkflowException(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) {
+ createWorkflowException(execution, 1002, processKey + " request is null")
+ }
+
+ /*
+
+ def requestId = execution.getVariable("att-mso-request-id")
+
+ if (requestId == null) {
+ createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+ }
+
+ setVariable(execution, prefix + 'requestId', requestId)
+
+ def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ createWorkflowException(execution, 1002, processKey + " request message has no 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)
+ createWorkflowException(execution, 1002, "Invalid Message")
+ }
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000..b048df5
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy
@@ -0,0 +1,530 @@
+/*-
+ * ============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)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy
new file mode 100644
index 0000000..9845281
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy
@@ -0,0 +1,95 @@
+/*-
+ * ============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
+ }
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy
new file mode 100644
index 0000000..ba920ce
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy
@@ -0,0 +1,586 @@
+/*-
+ * ============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
+
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy
new file mode 100644
index 0000000..364c586
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy
@@ -0,0 +1,362 @@
+/*-
+ * ============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]*)?", "")
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy
new file mode 100644
index 0000000..f952bee
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.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 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()
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy
new file mode 100644
index 0000000..e92af96
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy
@@ -0,0 +1,67 @@
+/*-
+ * ============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)
+ }
+ }
+
+}
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
new file mode 100644
index 0000000..3963c26
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy
@@ -0,0 +1,46 @@
+/*-
+ * ============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/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy
new file mode 100644
index 0000000..9c60bb9
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy
@@ -0,0 +1,34 @@
+/*-
+ * ============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
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java
new file mode 100644
index 0000000..f035b02
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java
@@ -0,0 +1,56 @@
+/*-
+ * ============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.callback.wsdl.v1;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+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.
+ * JAX-WS RI 2.2.4-b01
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "SDNCCallbackAdapterPortType", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface SDNCCallbackAdapterPortType {
+
+
+ /**
+ *
+ * @param sdncAdapterCallbackRequest
+ * @return
+ * returns com.att.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")
+ public SDNCAdapterResponse sdncAdapterCallback(
+ @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://domain2.att.com/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/CallbackHeader.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.java
new file mode 100644
index 0000000..38f7bc5
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.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 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="ResponseCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="ResponseMessage" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "requestId",
+ "responseCode",
+ "responseMessage"
+}, namespace="http://domain2.att.com/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")
+ protected String requestId;
+ @XmlElement(name = "ResponseCode", required = true,namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ protected String responseCode;
+ @XmlElement(name = "ResponseMessage", required = true,namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ protected String responseMessage;
+
+ /**
+ * 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 responseCode property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResponseCode() {
+ return responseCode;
+ }
+
+ /**
+ * Sets the value of the responseCode property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResponseCode(String value) {
+ this.responseCode = value;
+ }
+
+ /**
+ * Gets the value of the responseMessage property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResponseMessage() {
+ return responseMessage;
+ }
+
+ /**
+ * Sets the value of the responseMessage property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResponseMessage(String value) {
+ this.responseMessage = value;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java
new file mode 100644
index 0000000..adb0a23
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java
@@ -0,0 +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();
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java
new file mode 100644
index 0000000..40eeb11
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java
@@ -0,0 +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;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java
new file mode 100644
index 0000000..663983a
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java
@@ -0,0 +1,129 @@
+/*-
+ * ============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 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.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 ref="{http://domain2.att.com/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
+ * &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1", propOrder = {
+ "callbackHeader",
+ "requestData"
+})
+@XmlRootElement(name = "SDNCAdapterCallbackRequest", namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+public class SDNCAdapterCallbackRequest {
+
+ @XmlElement(name = "CallbackHeader", required = true, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ protected CallbackHeader callbackHeader;
+ @XmlElement(name = "RequestData", required=false, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ protected Object requestData;
+
+ /**
+ * Gets the value of the callbackHeader property.
+ *
+ * @return
+ * possible object is
+ * {@link CallbackHeader }
+ *
+ */
+ public CallbackHeader getCallbackHeader() {
+ return callbackHeader;
+ }
+
+ /**
+ * Sets the value of the callbackHeader property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CallbackHeader }
+ *
+ */
+ public void setCallbackHeader(CallbackHeader value) {
+ this.callbackHeader = value;
+ }
+
+ /**
+ * Gets the value of the requestData property.
+ *
+ * @return
+ * possible object is
+ * {@link Object }
+ *
+ */
+ public Object getRequestData() {
+ return requestData;
+ }
+
+ /**
+ * Sets the value of the requestData property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Object }
+ *
+ */
+ public void setRequestData(Object value) {
+ this.requestData = value;
+ }
+
+ public String toString() {
+ StringWriter writer = new StringWriter();
+ try {
+ JAXBContext context = JAXBContext
+ .newInstance(SDNCAdapterCallbackRequest.class);
+ Marshaller m = context.createMarshaller();
+ m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+ m.marshal(this, writer);
+ return writer.getBuffer().toString();
+ } catch (JAXBException e) {
+ return "";
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java
new file mode 100644
index 0000000..4de6309
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java
@@ -0,0 +1,111 @@
+/*-
+ * ============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 ref="{http://domain2.att.com/workflow/sdnc/adapter/schema/v1}RequestHeader"/>
+ * &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "requestHeader",
+ "requestData"
+})
+@XmlRootElement(name = "SDNCAdapterRequest")
+public class SDNCAdapterRequest {
+
+ @XmlElement(name = "RequestHeader", required = true)
+ protected RequestHeader requestHeader;
+ @XmlElement(name = "RequestData", required = true)
+ protected Object requestData;
+
+ /**
+ * Gets the value of the requestHeader property.
+ *
+ * @return
+ * possible object is
+ * {@link RequestHeader }
+ *
+ */
+ public RequestHeader getRequestHeader() {
+ return requestHeader;
+ }
+
+ /**
+ * Sets the value of the requestHeader property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RequestHeader }
+ *
+ */
+ public void setRequestHeader(RequestHeader value) {
+ this.requestHeader = value;
+ }
+
+ /**
+ * Gets the value of the requestData property.
+ *
+ * @return
+ * possible object is
+ * {@link Object }
+ *
+ */
+ public Object getRequestData() {
+ return requestData;
+ }
+
+ /**
+ * Sets the value of the requestData property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Object }
+ *
+ */
+ public void setRequestData(Object value) {
+ this.requestData = value;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java
new file mode 100644
index 0000000..88fbd8f
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java
@@ -0,0 +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 {
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java
new file mode 100644
index 0000000..002e655
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java
@@ -0,0 +1,22 @@
+/*-
+ * ============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=========================================================
+ */
+
+@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;
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java
new file mode 100644
index 0000000..220441a
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java
@@ -0,0 +1,459 @@
+/*-
+ * ============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;
+
+
+/**
+ * <p>Java class for createVnfNotification complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="createVnfNotification">
+ * &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="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" 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;element name="rollback" type="{http://com.att.mso/vnfNotify}vnfRollback" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "createVnfNotification1", propOrder = {
+ "messageId",
+ "completed",
+ "exception",
+ "errorMessage",
+ "vnfId",
+ "outputs",
+ "rollback"
+})
+public class CreateVnfNotification {
+
+ @XmlElement(required = true)
+ protected String messageId;
+ protected boolean completed;
+ protected MsoExceptionCategory exception;
+ protected String errorMessage;
+ protected String vnfId;
+ protected CreateVnfNotification.Outputs outputs;
+ protected VnfRollback rollback;
+
+ /**
+ * 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 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 outputs property.
+ *
+ * @return
+ * possible object is
+ * {@link CreateVnfNotification.Outputs }
+ *
+ */
+ public CreateVnfNotification.Outputs getOutputs() {
+ return outputs;
+ }
+
+ /**
+ * Sets the value of the outputs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CreateVnfNotification.Outputs }
+ *
+ */
+ public void setOutputs(CreateVnfNotification.Outputs value) {
+ this.outputs = value;
+ }
+
+ /**
+ * Gets the value of the rollback property.
+ *
+ * @return
+ * possible object is
+ * {@link VnfRollback }
+ *
+ */
+ public VnfRollback getRollback() {
+ return rollback;
+ }
+
+ /**
+ * Sets the value of the rollback property.
+ *
+ * @param value
+ * allowed object is
+ * {@link VnfRollback }
+ *
+ */
+ public void setRollback(VnfRollback value) {
+ this.rollback = 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<CreateVnfNotification.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 CreateVnfNotification.Outputs.Entry }
+ *
+ *
+ */
+ public List<CreateVnfNotification.Outputs.Entry> getEntry() {
+ if (entry == null) {
+ entry = new ArrayList<CreateVnfNotification.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 createVnfNotification = "";
+ if (exception==null) {
+ createVnfNotification = "<ns2:createVnfNotification 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' +
+ " <vnfId>"+vnfId+"</vnfId>" + '\n' +
+ (outputs == null ? "" : outputs.toString() + '\n') +
+ " <rollback>"+rollback+"</rollback>" + '\n' +
+ "</ns2:createVnfNotification>";
+ } else {
+ createVnfNotification = "<ns2:createVnfNotification 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:createVnfNotification>";
+ }
+ return createVnfNotification;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java
new file mode 100644
index 0000000..9ca53a8
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java
@@ -0,0 +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.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 "";
+ }
+ }
+*/
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java
new file mode 100644
index 0000000..9d430ce
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java
@@ -0,0 +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);
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java
new file mode 100644
index 0000000..9810306
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java
@@ -0,0 +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;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java
new file mode 100644
index 0000000..3c42f35
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java
@@ -0,0 +1,208 @@
+/*-
+ * ============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.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.openecomp.mso.adapters.vnf.async.client 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 {
+
+ 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");
+
+ /**
+ * 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
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link UpdateVnfNotification }
+ *
+ */
+ public UpdateVnfNotification createUpdateVnfNotification() {
+ return new UpdateVnfNotification();
+ }
+
+ /**
+ * Create an instance of {@link UpdateVnfNotification.Outputs }
+ *
+ */
+ public UpdateVnfNotification.Outputs createUpdateVnfNotificationOutputs() {
+ return new UpdateVnfNotification.Outputs();
+ }
+
+ /**
+ * Create an instance of {@link QueryVnfNotification }
+ *
+ */
+ public QueryVnfNotification createQueryVnfNotification() {
+ return new QueryVnfNotification();
+ }
+
+ /**
+ * Create an instance of {@link QueryVnfNotification.Outputs }
+ *
+ */
+ public QueryVnfNotification.Outputs createQueryVnfNotificationOutputs() {
+ return new QueryVnfNotification.Outputs();
+ }
+
+ /**
+ * Create an instance of {@link CreateVnfNotification }
+ *
+ */
+ public CreateVnfNotification createCreateVnfNotification() {
+ return new CreateVnfNotification();
+ }
+
+ /**
+ * Create an instance of {@link CreateVnfNotification.Outputs }
+ *
+ */
+ public CreateVnfNotification.Outputs createCreateVnfNotificationOutputs() {
+ return new CreateVnfNotification.Outputs();
+ }
+
+ /**
+ * Create an instance of {@link DeleteVnfNotification }
+ *
+ */
+ public DeleteVnfNotification createDeleteVnfNotification() {
+ return new DeleteVnfNotification();
+ }
+
+ /**
+ * Create an instance of {@link RollbackVnfNotification }
+ *
+ */
+ public RollbackVnfNotification createRollbackVnfNotification() {
+ return new RollbackVnfNotification();
+ }
+
+ /**
+ * Create an instance of {@link MsoRequest }
+ *
+ */
+ public MsoRequest createMsoRequest() {
+ return new MsoRequest();
+ }
+
+ /**
+ * Create an instance of {@link VnfRollback }
+ *
+ */
+ public VnfRollback createVnfRollback() {
+ return new VnfRollback();
+ }
+
+ /**
+ * Create an instance of {@link UpdateVnfNotification.Outputs.Entry }
+ *
+ */
+ public UpdateVnfNotification.Outputs.Entry createUpdateVnfNotificationOutputsEntry() {
+ return new UpdateVnfNotification.Outputs.Entry();
+ }
+
+ /**
+ * Create an instance of {@link QueryVnfNotification.Outputs.Entry }
+ *
+ */
+ public QueryVnfNotification.Outputs.Entry createQueryVnfNotificationOutputsEntry() {
+ return new QueryVnfNotification.Outputs.Entry();
+ }
+
+ /**
+ * Create an instance of {@link CreateVnfNotification.Outputs.Entry }
+ *
+ */
+ public CreateVnfNotification.Outputs.Entry createCreateVnfNotificationOutputsEntry() {
+ return new CreateVnfNotification.Outputs.Entry();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RollbackVnfNotification }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "rollbackVnfNotification")
+ public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) {
+ return new JAXBElement<RollbackVnfNotification>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link DeleteVnfNotification }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "deleteVnfNotification")
+ public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) {
+ return new JAXBElement<DeleteVnfNotification>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link CreateVnfNotification }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "createVnfNotification")
+ public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) {
+ return new JAXBElement<CreateVnfNotification>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link UpdateVnfNotification }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "updateVnfNotification")
+ public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) {
+ return new JAXBElement<UpdateVnfNotification>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link QueryVnfNotification }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://com.att.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/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java
new file mode 100644
index 0000000..ebbf867
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java
@@ -0,0 +1,490 @@
+/*-
+ * ============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;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java
new file mode 100644
index 0000000..67c544d
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java
@@ -0,0 +1,175 @@
+/*-
+ * ============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.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for rollbackVnfNotification complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="rollbackVnfNotification">
+ * &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 = "rollbackVnfNotification1", propOrder = {
+ "messageId",
+ "completed",
+ "exception",
+ "errorMessage"
+})
+public class RollbackVnfNotification {
+
+ @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;
+ }
+
+ public String toString() {
+ String rollbackVnfNotification = "";
+ if (exception==null) {
+ rollbackVnfNotification = "<ns2:rollbackVnfNotification 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:rollbackVnfNotification>";
+ } else {
+ rollbackVnfNotification = "<ns2:rollbackVnfNotification 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:rollbackVnfNotification>";
+ }
+ return rollbackVnfNotification;
+
+ }
+
+ }
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java
new file mode 100644
index 0000000..61ba439
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java
@@ -0,0 +1,412 @@
+/*-
+ * ============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;
+
+
+/**
+ * <p>Java class for updateVnfNotification complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="updateVnfNotification">
+ * &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="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;element name="rollback" type="{http://com.att.mso/vnfNotify}vnfRollback" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "updateVnfNotification1", propOrder = {
+ "messageId",
+ "completed",
+ "exception",
+ "errorMessage",
+ "outputs",
+ "rollback"
+})
+public class UpdateVnfNotification {
+
+ @XmlElement(required = true)
+ protected String messageId;
+ protected boolean completed;
+ protected MsoExceptionCategory exception;
+ protected String errorMessage;
+ protected UpdateVnfNotification.Outputs outputs;
+ protected VnfRollback rollback;
+
+ /**
+ * 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 outputs property.
+ *
+ * @return
+ * possible object is
+ * {@link UpdateVnfNotification.Outputs }
+ *
+ */
+ public UpdateVnfNotification.Outputs getOutputs() {
+ return outputs;
+ }
+
+ /**
+ * Sets the value of the outputs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link UpdateVnfNotification.Outputs }
+ *
+ */
+ public void setOutputs(UpdateVnfNotification.Outputs value) {
+ this.outputs = value;
+ }
+
+ /**
+ * Gets the value of the rollback property.
+ *
+ * @return
+ * possible object is
+ * {@link VnfRollback }
+ *
+ */
+ public VnfRollback getRollback() {
+ return rollback;
+ }
+
+ /**
+ * Sets the value of the rollback property.
+ *
+ * @param value
+ * allowed object is
+ * {@link VnfRollback }
+ *
+ */
+ public void setRollback(VnfRollback value) {
+ this.rollback = 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<UpdateVnfNotification.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 UpdateVnfNotification.Outputs.Entry }
+ *
+ *
+ */
+ public List<UpdateVnfNotification.Outputs.Entry> getEntry() {
+ if (entry == null) {
+ entry = new ArrayList<UpdateVnfNotification.Outputs.Entry>();
+ }
+ return this.entry;
+ }
+
+
+ /**
+ * <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;
+ }
+
+ public String toString() {
+ String entry = "";
+ entry =
+ " <key>"+key+"</key>" + '\n' +
+ " <value>"+value+"</value>";
+ return entry;
+ }
+ }
+
+ }
+
+ public String toString(){
+ String updateVnfNotification = "";
+ if (exception==null) {
+ updateVnfNotification = "<ns2:updateVnfNotification 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' +
+ " <rollback>"+rollback+"</rollback>" + '\n' +
+ "</ns2:updateVnfNotification>";
+ } else {
+ updateVnfNotification = "<ns2:updateVnfNotification 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:updateVnfNotification>";
+ }
+
+ return updateVnfNotification;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java
new file mode 100644
index 0000000..8aaed54
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java
@@ -0,0 +1,177 @@
+/*-
+ * ============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.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Action;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.8
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "vnfAdapterNotify", targetNamespace = "http://com.att.mso/vnfNotify")
+@XmlSeeAlso({
+ ObjectFactory.class
+})
+public interface VnfAdapterNotify {
+
+
+ /**
+ *
+ * @param errorMessage
+ * @param exception
+ * @param messageId
+ * @param completed
+ */
+ @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")
+ public void rollbackVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage);
+
+ /**
+ *
+ * @param errorMessage
+ * @param vnfExists
+ * @param status
+ * @param exception
+ * @param outputs
+ * @param messageId
+ * @param vnfId
+ * @param completed
+ */
+ @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")
+ public void queryVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage,
+ @WebParam(name = "vnfExists", targetNamespace = "")
+ Boolean vnfExists,
+ @WebParam(name = "vnfId", targetNamespace = "")
+ String vnfId,
+ @WebParam(name = "status", targetNamespace = "")
+ VnfStatus status,
+ @WebParam(name = "outputs", targetNamespace = "")
+ com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.QueryVnfNotification.Outputs outputs);
+
+ /**
+ *
+ * @param errorMessage
+ * @param exception
+ * @param rollback
+ * @param outputs
+ * @param messageId
+ * @param vnfId
+ * @param completed
+ */
+ @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")
+ public void createVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage,
+ @WebParam(name = "vnfId", targetNamespace = "")
+ String vnfId,
+ @WebParam(name = "outputs", targetNamespace = "")
+ com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification.Outputs outputs,
+ @WebParam(name = "rollback", targetNamespace = "")
+ VnfRollback rollback);
+
+ /**
+ *
+ * @param errorMessage
+ * @param exception
+ * @param rollback
+ * @param outputs
+ * @param messageId
+ * @param completed
+ */
+ @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")
+ public void updateVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage,
+ @WebParam(name = "outputs", targetNamespace = "")
+ com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.UpdateVnfNotification.Outputs outputs,
+ @WebParam(name = "rollback", targetNamespace = "")
+ VnfRollback rollback);
+
+ /**
+ *
+ * @param errorMessage
+ * @param exception
+ * @param messageId
+ * @param completed
+ */
+ @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")
+ public void deleteVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage);
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java
new file mode 100644
index 0000000..ba3bca1
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java
@@ -0,0 +1,108 @@
+/*-
+ * ============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.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.8
+ * Generated source version: 2.2
+ *
+ */
+@WebServiceClient(name = "vnfAdapterNotify", targetNamespace = "http://com.att.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");
+
+ static {
+ VNFADAPTERNOTIFY_WSDL_LOCATION = com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.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.");
+ }
+ VNFADAPTERNOTIFY_EXCEPTION = e;
+ }
+
+ public VnfAdapterNotify_Service() {
+ super(__getWsdlLocation(), VNFADAPTERNOTIFY_QNAME);
+ }
+
+ public VnfAdapterNotify_Service(WebServiceFeature... features) {
+ super(__getWsdlLocation(), VNFADAPTERNOTIFY_QNAME, features);
+ }
+
+ public VnfAdapterNotify_Service(URL wsdlLocation) {
+ super(wsdlLocation, VNFADAPTERNOTIFY_QNAME);
+ }
+
+ public VnfAdapterNotify_Service(URL wsdlLocation, WebServiceFeature... features) {
+ super(wsdlLocation, VNFADAPTERNOTIFY_QNAME, features);
+ }
+
+ public VnfAdapterNotify_Service(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public VnfAdapterNotify_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns VnfAdapterNotify
+ */
+ @WebEndpoint(name = "MsoVnfAdapterAsyncImplPort")
+ public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort() {
+ return super.getPort(new QName("http://com.att.mso/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns VnfAdapterNotify
+ */
+ @WebEndpoint(name = "MsoVnfAdapterAsyncImplPort")
+ public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort(WebServiceFeature... features) {
+ return super.getPort(new QName("http://com.att.mso/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (VNFADAPTERNOTIFY_EXCEPTION!= null) {
+ throw VNFADAPTERNOTIFY_EXCEPTION;
+ }
+ return VNFADAPTERNOTIFY_WSDL_LOCATION;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java
new file mode 100644
index 0000000..4863023
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java
@@ -0,0 +1,212 @@
+/*-
+ * ============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 vnfRollback complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="vnfRollback">
+ * &lt;complexContent>
+ * &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="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"/>
+ * &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "vnfRollback", propOrder = {
+ "cloudSiteId",
+ "msoRequest",
+ "tenantCreated",
+ "tenantId",
+ "vnfCreated",
+ "vnfId"
+})
+public class VnfRollback {
+
+ protected String cloudSiteId;
+ protected MsoRequest msoRequest;
+ protected boolean tenantCreated;
+ protected String tenantId;
+ protected boolean vnfCreated;
+ protected String vnfId;
+
+ /**
+ * Gets the value of the cloudSiteId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCloudSiteId() {
+ return cloudSiteId;
+ }
+
+ /**
+ * Sets the value of the cloudSiteId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCloudSiteId(String value) {
+ this.cloudSiteId = value;
+ }
+
+ /**
+ * Gets the value of the msoRequest property.
+ *
+ * @return
+ * possible object is
+ * {@link MsoRequest }
+ *
+ */
+ public MsoRequest getMsoRequest() {
+ return msoRequest;
+ }
+
+ /**
+ * Sets the value of the msoRequest property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MsoRequest }
+ *
+ */
+ public void setMsoRequest(MsoRequest value) {
+ this.msoRequest = value;
+ }
+
+ /**
+ * Gets the value of the tenantCreated property.
+ *
+ */
+ public boolean isTenantCreated() {
+ return tenantCreated;
+ }
+
+ /**
+ * Sets the value of the tenantCreated property.
+ *
+ */
+ public void setTenantCreated(boolean value) {
+ this.tenantCreated = value;
+ }
+
+ /**
+ * Gets the value of the tenantId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ /**
+ * Sets the value of the tenantId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTenantId(String value) {
+ this.tenantId = value;
+ }
+
+ /**
+ * Gets the value of the vnfCreated property.
+ *
+ */
+ public boolean isVnfCreated() {
+ return vnfCreated;
+ }
+
+ /**
+ * Sets the value of the vnfCreated property.
+ *
+ */
+ public void setVnfCreated(boolean value) {
+ this.vnfCreated = 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;
+ }
+
+ 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;
+ }
+
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java
new file mode 100644
index 0000000..b61a4b2
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java
@@ -0,0 +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);
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java
new file mode 100644
index 0000000..f3038a3
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java
@@ -0,0 +1,22 @@
+/*-
+ * ============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=========================================================
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://com.att.mso/vnfNotify")
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java
new file mode 100644
index 0000000..4dadd8c
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java
@@ -0,0 +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...");
+
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java
new file mode 100644
index 0000000..4b3b8eb
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java
@@ -0,0 +1,255 @@
+/*-
+ * ============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;
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java
new file mode 100644
index 0000000..509f9c6
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java
@@ -0,0 +1,537 @@
+/*-
+ * ============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.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.ws.rs.core.Context;
+import javax.xml.ws.Action;
+import javax.xml.ws.RequestWrapper;
+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.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.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * This is the service class for VnfAdapterNotify
+ * TODO: Add addition VnfAdapterNotify Methods for remaining VnfAdapterNotify operations.
+ */
+
+@WebService(serviceName = "vnfAdapterNotify", targetNamespace = "http://com.att.mso/vnfNotify")
+public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ private final String logMarker = "[VNF-NOTIFY]";
+
+ @Context WebServiceContext wsContext;
+
+ private volatile ProcessEngineServices pes4junit = null;
+
+ /**
+ *
+ * @param errorMessage
+ * @param exception
+ * @param messageId
+ * @param completed
+ */
+ @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")
+ public void rollbackVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage) {
+
+
+
+ RollbackVnfNotification rollbackVnfNotification = new RollbackVnfNotification();
+
+ rollbackVnfNotification.setMessageId(messageId);
+ rollbackVnfNotification.setCompleted(completed);
+ rollbackVnfNotification.setException(exception);
+ rollbackVnfNotification.setErrorMessage(errorMessage);
+
+ ProcessEngineServices pes = getProcessEngineServices();
+ RuntimeService runtimeService = pes.getRuntimeService();
+
+ MsoLogger.setServiceName("MSO." + "vnfAdapterRollback");
+ MsoLogger.setLogContext(messageId, "N/A");
+ msoLogger.debug(logMarker + "Received RollbackVnfNotification" + rollbackVnfNotification.toString());
+
+ long startTime = System.currentTimeMillis();
+ try {
+
+ /* Check to make sure the process instance is ready for correlation*/
+ isReadyforCorrelation(runtimeService, messageId, "rollbackVnfNotificationCallback", "VNFRB_messageId");
+
+ msoLogger.debug(logMarker + "*** Received MSO rollbackVnfNotification Callback ******");
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
+ msoLogger.debug(logMarker + "Rollback VNF Notification string:\n" + rollbackVnfNotification.toString());
+
+ System.out.println("testing ROllbackVnfNotification : " + rollbackVnfNotification.toString());
+
+ Map<String,Object> variables = new HashMap<String,Object>();
+ variables.put("VNFRB_messageId", messageId );
+ variables.put("rollbackVnfNotificationCallback", rollbackVnfNotification.toString());
+
+ /*Correlating the response with the running instance*/
+
+ runtimeService.createMessageCorrelation("rollbackVnfNotificationCallback").setVariables(variables)
+ .processInstanceVariableEquals("VNFRB_messageId", messageId).correlate();
+
+ msoLogger.debug(logMarker + "***** Completed processing of MSO VnfAdapterNotifyService ******");
+ } catch(MismatchingMessageCorrelationException e) {
+ msoLogger.debug(logMarker + "[CORM]correlation id mismatch");
+ String msg =
+ "VNF Adapter Notify Service received a Create VNF Notification request with RequestId '"
+ + messageId
+ + "' but that RequestId could not be correlated to any active process - ignoring the request";
+
+ msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg);
+
+ }
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO Vnf Adapter Notify for Rollback VNF Notification.");
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO Vnf Adapter Notify for Rollback VNF Notification.", "BPMN",
+ MsoLogger.getServiceName(), "rollbackVnfNotification");
+
+ return;
+ }
+
+
+
+ /**
+ *
+ * @param errorMessage
+ * @param vnfExists
+ * @param status
+ * @param exception
+ * @param outputs
+ * @param messageId
+ * @param vnfId
+ * @param completed
+ */
+ @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")
+ public void queryVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage,
+ @WebParam(name = "vnfExists", targetNamespace = "")
+ Boolean vnfExists,
+ @WebParam(name = "vnfId", targetNamespace = "")
+ String vnfId,
+ @WebParam(name = "status", targetNamespace = "")
+ VnfStatus status,
+ @WebParam(name = "outputs", targetNamespace = "")
+ com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.QueryVnfNotification.Outputs outputs){
+
+ QueryVnfNotification queryVnfNotification = new QueryVnfNotification();
+
+ queryVnfNotification.setMessageId(messageId);
+ queryVnfNotification.setCompleted(completed);
+ queryVnfNotification.setException(exception);
+ queryVnfNotification.setErrorMessage(errorMessage);
+ queryVnfNotification.setVnfExists(vnfExists);
+ queryVnfNotification.setVnfId(vnfId);
+ queryVnfNotification.setStatus(status);
+ queryVnfNotification.setOutputs(outputs);
+
+
+ ProcessEngineServices pes = getProcessEngineServices();
+ RuntimeService runtimeService = pes.getRuntimeService();
+
+ 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());
+
+ long startTime = System.currentTimeMillis();
+ try {
+
+ /* Check to make sure the process instance is ready for correlation*/
+ isReadyforCorrelation(runtimeService, messageId, "queryVnfNotificationCallback", "VNFQ_messageId");
+
+ msoLogger.debug(logMarker + "*** Received MSO queryVnfNotification Callback ******");
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
+ msoLogger.debug(logMarker + "Query VNF Notification string:\n" + queryVnfNotification.toString());
+
+ Map<String,Object> variables = new HashMap<String,Object>();
+ variables.put("VNFQ_messageId", messageId );
+ variables.put("queryVnfNotificationCallback", queryVnfNotification.toString());
+
+ /*Correlating the response with the running instance*/
+
+ runtimeService.createMessageCorrelation("queryVnfNotificationCallback").setVariables(variables)
+ .processInstanceVariableEquals("VNFQ_messageId", messageId).correlate();
+
+ msoLogger.debug(logMarker + "***** Completed processing of MSO VnfAdapterNotifyService ******");
+ } catch(MismatchingMessageCorrelationException e) {
+ msoLogger.debug(logMarker + "[CORM]correlation id mismatch");
+ String msg =
+ "VNF Adapter Notify Service received a Query VNF Notification request with RequestId '"
+ + messageId
+ + "' but that RequestId could not be correlated to any active process - ignoring the request";
+
+ msoLogger.error(MessageEnum.BPMN_GENERAL_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 Vnf Adapter Notify for Query VNF Notification.");
+
+ return;
+ }
+
+
+
+
+ /**
+ *
+ * @param errorMessage
+ * @param exception
+ * @param rollback
+ * @param outputs
+ * @param messageId
+ * @param vnfId
+ * @param completed
+ */
+ @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")
+ public void createVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage,
+ @WebParam(name = "vnfId", targetNamespace = "")
+ String vnfId,
+ @WebParam(name = "outputs", targetNamespace = "")
+ com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification.Outputs outputs,
+ @WebParam(name = "rollback", targetNamespace = "")
+ VnfRollback rollback){
+
+ CreateVnfNotification createVnfNotification = new CreateVnfNotification();
+
+ createVnfNotification.setMessageId(messageId);
+ createVnfNotification.setCompleted(completed);
+ createVnfNotification.setException(exception);
+ createVnfNotification.setErrorMessage(errorMessage);
+ createVnfNotification.setVnfId(vnfId);
+ createVnfNotification.setOutputs(outputs);
+ createVnfNotification.setRollback(rollback);
+
+ ProcessEngineServices pes = getProcessEngineServices();
+ RuntimeService runtimeService = pes.getRuntimeService();
+
+ msoLogger.setServiceName("MSO." + "vnf Adapter Create");
+ msoLogger.setLogContext(messageId, "N/A");
+ msoLogger.debug(logMarker + "Received CreateVnfNotification - " + createVnfNotification.toString());
+
+ long startTime = System.currentTimeMillis();
+ try {
+
+ /* Check to make sure the process instance is ready for correlation*/
+ isReadyforCorrelation(runtimeService, messageId, "createVnfNotificationCallback", "VNFC_messageId");
+
+ msoLogger.debug(logMarker + "*** Received MSO createVnfNotification Callback ******");
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
+
+ msoLogger.debug(logMarker + "Create VNF Notification string:\n" + createVnfNotification.toString());
+
+ Map<String,Object> variables = new HashMap<String,Object>();
+ variables.put("VNFC_messageId", messageId );
+ variables.put("createVnfNotificationCallback", createVnfNotification.toString());
+
+ /*Correlating the response with the running instance*/
+
+ runtimeService.createMessageCorrelation("createVnfNotificationCallback").setVariables(variables)
+ .processInstanceVariableEquals("VNFC_messageId", messageId).correlate();
+
+ msoLogger.debug(logMarker + "***** Completed processing of MSO VnfAdapterNotifyService ******");
+ } catch(MismatchingMessageCorrelationException e) {
+ msoLogger.debug(logMarker + "[CORM]correlation id mismatch");
+ String msg =
+ "VNF Adapter Notify Service received a Create VNF Notification request with RequestId '"
+ + messageId
+ + "' but that RequestId could not be correlated to any active process - ignoring the request";
+
+ msoLogger.error(MessageEnum.BPMN_GENERAL_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 Vnf Adapter Notify for Query VNF Notification.");
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO Vnf Adapter Notify for Query VNF Notification.", "BPMN",
+ MsoLogger.getServiceName(), "createVnfNotification");
+
+ return;
+ }
+
+ /**
+ *
+ * @param errorMessage
+ * @param exception
+ * @param rollback
+ * @param outputs
+ * @param messageId
+ * @param completed
+ */
+ @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")
+ public void updateVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage,
+ @WebParam(name = "outputs", targetNamespace = "")
+ com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.UpdateVnfNotification.Outputs outputs,
+ @WebParam(name = "rollback", targetNamespace = "")
+ VnfRollback rollback){
+
+ UpdateVnfNotification updateVnfNotification = new UpdateVnfNotification();
+
+ updateVnfNotification.setMessageId(messageId);
+ updateVnfNotification.setCompleted(completed);
+ updateVnfNotification.setException(exception);
+ updateVnfNotification.setErrorMessage(errorMessage);
+ updateVnfNotification.setOutputs(outputs);
+ updateVnfNotification.setRollback(rollback);
+
+ ProcessEngineServices pes = getProcessEngineServices();
+ RuntimeService runtimeService = pes.getRuntimeService();
+
+ msoLogger.setServiceName("MSO." + "vnf Adapter Update");
+ msoLogger.setLogContext(messageId, "N/A");
+ msoLogger.debug(logMarker + "Received UpdateVnfNotification - " + updateVnfNotification.toString());
+
+ long startTime = System.currentTimeMillis();
+ try {
+
+ // Check to make sure the process instance is ready for correlation
+ isReadyforCorrelation(runtimeService, messageId, "updateVnfNotificationCallback", "VNFU_messageId");
+
+ msoLogger.debug(logMarker + "*** Received MSO updateVnfNotification Callback ******");
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
+
+ msoLogger.debug(logMarker + "Update VNF Notification string:\n" + updateVnfNotification.toString());
+
+ Map<String,Object> variables = new HashMap<String,Object>();
+ variables.put("VNFU_messageId", messageId );
+ variables.put("updateVnfNotificationCallback", updateVnfNotification.toString());
+
+ //Correlating the response with the running instance
+ runtimeService.createMessageCorrelation("updateVnfNotificationCallback").setVariables(variables)
+ .processInstanceVariableEquals("VNFU_messageId", messageId).correlate();
+
+ msoLogger.debug(logMarker + "***** Completed processing of MSO VnfAdapterNotifyService ******");
+
+ } catch(MismatchingMessageCorrelationException e) {
+ msoLogger.debug(logMarker + "[CORM]correlation id mismatch");
+ String msg =
+ "VNF Adapter Notify Service received a Update VNF Notification request with RequestId '"
+ + messageId
+ + "' but that RequestId could not be correlated to any active process - ignoring the request";
+
+ msoLogger.error(MessageEnum.BPMN_GENERAL_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 Vnf Adapter Notify for Update VNF Notification.");
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO Vnf Adapter Notify for Update VNF Notification.", "BPMN",
+ MsoLogger.getServiceName(), "updateVnfNotification");
+
+ return;
+ }
+
+ /**
+ *
+ * @param errorMessage
+ * @param exception
+ * @param messageId
+ * @param completed
+ */
+
+ //@WebService(serviceName="VNFAdapterDeleteCallbackV1", targetNamespace="http://com.att.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")
+ public void deleteVnfNotification(
+ @WebParam(name = "messageId", targetNamespace = "")
+ String messageId,
+ @WebParam(name = "completed", targetNamespace = "")
+ boolean completed,
+ @WebParam(name = "exception", targetNamespace = "")
+ MsoExceptionCategory exception,
+ @WebParam(name = "errorMessage", targetNamespace = "")
+ String errorMessage) {
+
+ //Callback URL to use http://localhost:8080/mso/services/VNFAdapterDeleteCallbackV1
+
+ //DeleteVnfNotification Class
+ DeleteVnfNotification deleteVnfNotification = new DeleteVnfNotification();
+ deleteVnfNotification.setMessageId(messageId);
+ deleteVnfNotification.setCompleted(completed);
+ deleteVnfNotification.setException(exception);
+ deleteVnfNotification.setErrorMessage(errorMessage);
+
+ ProcessEngineServices pes = getProcessEngineServices();
+ RuntimeService runtimeService = pes.getRuntimeService();
+
+ MsoLogger.setServiceName("MSO." + "vnfAdapterDelete");
+ MsoLogger.setLogContext(messageId, "N/A");
+ msoLogger.debug(logMarker + "Received DeleteVnfNotification callback: " + deleteVnfNotification.toString());
+
+ long startTime = System.currentTimeMillis();
+ try {
+
+ /* Check to make sure the process instance is ready for correlation*/
+ //isReadyforCorrelation(runtimeService, messageId, "deleteVnfACallback", "VNFDEL_uuid");
+
+ msoLogger.debug(logMarker + " *** Received MSO deleteVnfACallback ******");
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO deleteVnfACallback ");
+ msoLogger.debug(logMarker + " Callback response string:\n" + deleteVnfNotification.toString());
+
+ Map<String,Object> variables = new HashMap<String,Object>();
+ variables.put("VNFDEL_uuid", messageId);
+ variables.put("deleteVnfACallback", deleteVnfNotification.toString());
+
+ /*Correlating the response with the running instance*/
+
+ runtimeService.createMessageCorrelation("deleteVnfACallback")
+ .setVariables(variables)
+ .processInstanceVariableEquals("VNFDEL_uuid", messageId).correlate();
+
+ msoLogger.debug(logMarker + "***** Completed processing of MSO deleteVnfACallback ******");
+
+ } catch(MismatchingMessageCorrelationException e) {
+
+ msoLogger.debug(logMarker + " [CORM]correlation id mismatch");
+ // Couldn't correlate requestId to any active flow
+ //MsoLogger logger = MsoLogger.getMsoLogger("SDNCAdapterCallbackService");
+
+ String msg =
+ "Vnf Adapter Callback Service received a Vnf Adapter Callback with messageId '"
+ + messageId
+ + "' but that messageId could not be correlated to any active process - ignoring the Request";
+
+ 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 VNFAdapterDeleteCallbackV1.");
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO VNFAdapterDeleteCallbackV1.", "BPMN",
+ MsoLogger.getServiceName(), "deleteVnfNotification");
+
+ return;
+ }
+
+ private void isReadyforCorrelation(RuntimeService runtimeService, String requestId, String responseName, String correlationValue) {
+
+ long waitingInstances = runtimeService.createExecutionQuery().messageEventSubscriptionName(responseName).processVariableValueEquals(correlationValue, requestId).count();
+ int retries = 50;
+ while (waitingInstances==0 && retries > 0) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ // should I add new exception Message to MessageEnum???
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logMarker, e);
+
+ } // you can still play with the numbers
+ waitingInstances = runtimeService.createExecutionQuery() //
+ .messageEventSubscriptionName(responseName)
+ .processVariableValueEquals(correlationValue, requestId).count();
+ retries--;
+ }
+ }
+
+
+ private ProcessEngineServices getProcessEngineServices() {
+ if (pes4junit == null) {
+ return BpmPlatform.getDefaultProcessEngine();
+ } else {
+ return pes4junit;
+ }
+ }
+
+ @WebMethod(exclude=true)
+ public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+ pes4junit = pes;
+ }
+}
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
new file mode 100644
index 0000000..5199322
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java
@@ -0,0 +1,206 @@
+/*-
+ * ============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/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java
new file mode 100644
index 0000000..2302b76
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java
@@ -0,0 +1,302 @@
+/*-
+ * ============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;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java
new file mode 100644
index 0000000..425f0b2
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.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.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;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java
new file mode 100644
index 0000000..f44dfa9
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.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.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;
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java
new file mode 100644
index 0000000..a42a6d6
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java
@@ -0,0 +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());
+
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java
new file mode 100644
index 0000000..1d90ac4
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java
@@ -0,0 +1,627 @@
+/*-
+ * ============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;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java
new file mode 100644
index 0000000..1e1a20c
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java
@@ -0,0 +1,55 @@
+/*-
+ * ============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;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java
new file mode 100644
index 0000000..37cc676
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java
@@ -0,0 +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;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java
new file mode 100644
index 0000000..66b170e
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.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.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/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java
new file mode 100644
index 0000000..e8b91bc
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java
@@ -0,0 +1,120 @@
+/*-
+ * ============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);
+ }
+ }
+ */
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java
new file mode 100644
index 0000000..1ef96b6
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java
@@ -0,0 +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);
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml b/bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..605d6f3
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/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="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>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml b/bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml
new file mode 100644
index 0000000..641e674
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/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="default">
+ <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="MSOGammaBPMN">
+<!-- <process-engine>default</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/MSOGammaBPMN/src/main/resources/logback.xml
new file mode 100644
index 0000000..133fa54
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/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/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn
new file mode 100644
index 0000000..8ce38e4
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn
@@ -0,0 +1,1297 @@
+<?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
new file mode 100644
index 0000000..46faf80
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateServiceInstanceInfra.bpmn
@@ -0,0 +1,466 @@
+<?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/CreateVfModuleInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleInfra.bpmn
new file mode 100644
index 0000000..0d08da3
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleInfra.bpmn
@@ -0,0 +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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000..9beaad9
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn
@@ -0,0 +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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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>
+</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
new file mode 100644
index 0000000..79d39ca
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVnfInfra.bpmn
@@ -0,0 +1,463 @@
+<?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
new file mode 100644
index 0000000..fc6d7f5
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteNetworkInstanceInfra.bpmn
@@ -0,0 +1,1007 @@
+<?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
new file mode 100644
index 0000000..7a5c30a
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteServiceInstanceInfra.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://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/DeleteVfModuleInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleInfra.bpmn
new file mode 100644
index 0000000..d30042c
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleInfra.bpmn
@@ -0,0 +1,324 @@
+<?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
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000..4939255
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn
@@ -0,0 +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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareCompletionHandlerRequest', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Set Success" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("DELVfModVol_TransactionSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ScriptTask_3" targetRef="EndEvent_2"/>
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all"/>
+ <camunda:out variables="all"/>
+ <camunda:in source="DELVfModVol_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
+ <camunda:in source="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.*
+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>
+</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
new file mode 100644
index 0000000..28d005c
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn
@@ -0,0 +1,458 @@
+<?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/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn
new file mode 100644
index 0000000..8a203d1
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn
@@ -0,0 +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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn
new file mode 100644
index 0000000..fdd2b65
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://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.*
+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.*
+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.*
+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>
+ <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.*
+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.*
+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:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000..b98a4de
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn
@@ -0,0 +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.*
+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.*
+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.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepDbInfraDbRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_prepDbInfraRequest" targetRef="ServiceTask_callUpdateInfraDb"/>
+ <bpmn2:scriptTask id="ScriptTask_postProcessTemp" name="Set Success" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleVolumeSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ScriptTask_postProcessTemp" targetRef="EndEvent_4"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
+ <bpmn2:incoming>SequenceFlow_noVfModuleRelation</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_personaModelIdMatchYes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:subProcess id="SubProcess_errorHandler" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_catchAllErrors" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_77"/>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_catchAllErrors" targetRef="ScriptTask_preFalloutHandler"/>
+ <bpmn2:scriptTask id="ScriptTask_preFalloutHandler" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import com.att.bpm.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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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>
+</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
new file mode 100644
index 0000000..158c4b7
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
@@ -0,0 +1,1024 @@
+<?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
new file mode 100644
index 0000000..46b4e1f
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn
@@ -0,0 +1,830 @@
+<?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/DoCreateVfModuleRollback.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
new file mode 100644
index 0000000..49e612f
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
@@ -0,0 +1,520 @@
+<?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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn
new file mode 100644
index 0000000..9477aac
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn
@@ -0,0 +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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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>
+</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
new file mode 100644
index 0000000..e5856bb
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
@@ -0,0 +1,1102 @@
+<?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/GenericDeleteService.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn
new file mode 100644
index 0000000..52364a0
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://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: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.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsBPMNException(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <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:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:subProcess id="javaExceptionSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <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>
+ </bpmn2:scriptTask>
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <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: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: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.*
+GenericDeleteService deleteService = new GenericDeleteService()
+deleteService.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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>
+ <bpmn2:outgoing>yes</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <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: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.*
+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: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:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_24"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="deleteServiceInstance" name="DELETE&#xD;&#xA;Service Instance" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericDeleteService deleteService = new GenericDeleteService()
+deleteService.deleteServiceObject(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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.*
+GenericDeleteService deleteService = new GenericDeleteService()
+deleteService.getServiceResourceVersion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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>
+ <bpmn2:outgoing>siExistNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <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:endEvent id="EndEvent_4">
+ <bpmn2:incoming>siExistNo</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_38"/>
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="102.0" y="262.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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="169.0" x="401.0" y="243.0"/>
+ </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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="625.0" y="268.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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1024.0" y="262.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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="147.0" y="239.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="217.0" y="238.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="392.0" y="179.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="492.0" y="140.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="556.0" y="239.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="778.0" y="239.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="389.0" y="278.0"/>
+ </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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="198.0" y="492.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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="210.0" y="678.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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="426.0" y="678.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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="438.0" y="492.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"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_271" bpmnElement="processJavaError">
+ <dc:Bounds height="80.0" width="100.0" x="267.0" y="615.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="232.0" y="469.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="384.0" y="469.0"/>
+ </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"/>
+ </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"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_272" bpmnElement="toggleSuccess">
+ <dc:Bounds height="80.0" width="100.0" x="826.0" y="199.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="828.0" y="239.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="59.0" x="596.0" y="94.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="624.0" y="168.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="664.0" y="140.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="751.0" y="163.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/GenericDeleteVnf.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn
new file mode 100644
index 0000000..b20a26a
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn
@@ -0,0 +1,250 @@
+<?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:process id="GenericDeleteVnf" name="GenericDeleteVnf" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <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()
+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:exclusiveGateway id="resourceVersionCheck" name="Resource Version Provided?" default="resourceVersionProvided">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>resourceVariableNotProvided</bpmn2:outgoing>
+ <bpmn2:outgoing>resourceVersionProvided</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <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: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()
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <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: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.*
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
+deleteVnf.getVnfResourceVersion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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)
+
+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:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
+deleteVnf.deleteVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:endEvent>
+ <bpmn2:exclusiveGateway id="vnfFoundCheck" name="Vnf Found?" default="vnfFoundNo">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>vnfFoundYes</bpmn2:outgoing>
+ <bpmn2:outgoing>vnfFoundNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <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: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:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="92.0" y="257.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"/>
+ </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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="169.0" x="360.0" y="238.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="191.0" y="466.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"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_321" bpmnElement="deleteVnf">
+ <dc:Bounds height="80.0" width="100.0" x="658.0" y="194.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="587.0" y="263.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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1019.0" y="257.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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="354.0" y="165.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="351.0" y="276.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="558.0" y="135.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="633.0" y="234.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="777.0" y="234.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="949.0" y="234.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="311.0" y="233.0"/>
+ </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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="150.0" y="489.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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="390.0" y="489.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"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="343.0" y="466.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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="72.0" x="552.0" y="90.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="726.0" y="159.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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="587.0" y="165.0"/>
+ </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"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="637.0" y="135.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/GenericGetService.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn
new file mode 100644
index 0000000..cbaec1a
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn
@@ -0,0 +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.*
+
+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>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn
new file mode 100644
index 0000000..4fe0321
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn
@@ -0,0 +1,212 @@
+<?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:process id="GenericGetVnf" name="GenericGetVnf" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <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.*
+GenericGetVnf genericGetVnf = new GenericGetVnf ()
+genericGetVnf.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="vnfIdProvided"/>
+ <bpmn2:exclusiveGateway id="vnfIdProvided" name="Vnf Id Provided?" default="noVnfId">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>noVnfId</bpmn2:outgoing>
+ <bpmn2:outgoing>haveVnfId</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="noVnfId" name="No" sourceRef="vnfIdProvided" targetRef="getVnfByName"/>
+ <bpmn2:sequenceFlow id="haveVnfId" name="Yes" sourceRef="vnfIdProvided" targetRef="getGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_getVnfByName") == false}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <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.*
+GenericGetVnf genericGetVnf = new GenericGetVnf()
+genericGetVnf.getVnfByName(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="getVnfByName" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_2" targetRef="toggleSuccess"/>
+ <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.*
+GenericGetVnf genericGetVnf = new GenericGetVnf()
+genericGetVnf.getVnfById(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="getGenericVnf" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_31"/>
+ </bpmn2:endEvent>
+ <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.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="proccessBPMNError" targetRef="EndEvent_3"/>
+ <bpmn2:startEvent id="catchMSOWorkflowException">
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="catchMSOWorkflowException" targetRef="proccessBPMNError"/>
+ </bpmn2:subProcess>
+ <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.*
+GenericGetVnf genericGetVnf = new GenericGetVnf()
+genericGetVnf.setSuccessIndicator(execution, true)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_28"/>
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="110.0" y="271.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="128.0" y="312.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_295" bpmnElement="intialization">
+ <dc:Bounds height="80.0" width="100.0" x="228.0" y="249.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_230" bpmnElement="vnfIdProvided" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="372.0" y="263.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="99.0" x="419.0" y="292.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_295">
+ <di:waypoint xsi:type="dc:Point" x="146.0" y="289.0"/>
+ <di:waypoint xsi:type="dc:Point" x="228.0" y="289.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_295" targetElement="_BPMNShape_ExclusiveGateway_230">
+ <di:waypoint xsi:type="dc:Point" x="328.0" y="289.0"/>
+ <di:waypoint xsi:type="dc:Point" x="372.0" y="288.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="347.0" y="288.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_296" bpmnElement="getVnfByName">
+ <dc:Bounds height="80.0" width="100.0" x="456.0" y="156.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_231" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="600.0" y="263.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="625.0" y="318.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="noVnfId" sourceElement="_BPMNShape_ExclusiveGateway_230" targetElement="_BPMNShape_ScriptTask_296">
+ <di:waypoint xsi:type="dc:Point" x="397.0" y="263.0"/>
+ <di:waypoint xsi:type="dc:Point" x="397.0" y="196.0"/>
+ <di:waypoint xsi:type="dc:Point" x="456.0" y="196.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="399.0" y="219.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="haveVnfId" sourceElement="_BPMNShape_ExclusiveGateway_230" targetElement="_BPMNShape_ScriptTask_297">
+ <di:waypoint xsi:type="dc:Point" x="397.0" y="313.0"/>
+ <di:waypoint xsi:type="dc:Point" x="397.0" y="368.0"/>
+ <di:waypoint xsi:type="dc:Point" x="456.0" y="368.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="396.0" y="328.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_297" bpmnElement="getGenericVnf">
+ <dc:Bounds height="80.0" width="100.0" x="456.0" y="328.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_298" bpmnElement="toggleSuccess">
+ <dc:Bounds height="80.0" width="100.0" x="696.0" y="249.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="888.0" y="271.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="906.0" y="312.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_231" targetElement="_BPMNShape_ScriptTask_298">
+ <di:waypoint xsi:type="dc:Point" x="650.0" y="288.0"/>
+ <di:waypoint xsi:type="dc:Point" x="696.0" y="289.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="673.0" y="289.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_298" targetElement="_BPMNShape_EndEvent_226">
+ <di:waypoint xsi:type="dc:Point" x="796.0" y="289.0"/>
+ <di:waypoint xsi:type="dc:Point" x="888.0" y="289.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="829.0" y="289.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_296" targetElement="_BPMNShape_ExclusiveGateway_231">
+ <di:waypoint xsi:type="dc:Point" x="556.0" y="196.0"/>
+ <di:waypoint xsi:type="dc:Point" x="625.0" y="196.0"/>
+ <di:waypoint xsi:type="dc:Point" x="625.0" y="263.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="622.0" y="205.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_297" targetElement="_BPMNShape_ExclusiveGateway_231">
+ <di:waypoint xsi:type="dc:Point" x="556.0" y="368.0"/>
+ <di:waypoint xsi:type="dc:Point" x="625.0" y="368.0"/>
+ <di:waypoint xsi:type="dc:Point" x="625.0" y="313.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="621.0" y="368.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_30" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
+ <dc:Bounds height="169.0" width="313.0" x="168.0" y="468.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_74" bpmnElement="catchMSOWorkflowException">
+ <dc:Bounds height="36.0" width="36.0" x="180.0" y="535.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="198.0" y="576.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="proccessBPMNError">
+ <dc:Bounds height="80.0" width="100.0" x="275.0" y="513.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_231" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="432.0" y="535.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="450.0" y="576.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_StartEvent_74" targetElement="_BPMNShape_ScriptTask_302">
+ <di:waypoint xsi:type="dc:Point" x="216.0" y="553.0"/>
+ <di:waypoint xsi:type="dc:Point" x="275.0" y="553.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="238.0" y="553.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_302" targetElement="_BPMNShape_EndEvent_231">
+ <di:waypoint xsi:type="dc:Point" x="375.0" y="553.0"/>
+ <di:waypoint xsi:type="dc:Point" x="432.0" y="553.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="402.0" y="553.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/GenericPutVnf.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn
new file mode 100644
index 0000000..bcda933
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn
@@ -0,0 +1,135 @@
+<?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:process id="GenericPutVnf" name="GenericPutVnf" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <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.*
+GenericPutVnf genericPutVnf = new GenericPutVnf()
+genericPutVnf.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="putVnf"/>
+ <bpmn2:subProcess id="processBPMNExceptionSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_43"/>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_96"/>
+ </bpmn2:startEvent>
+ <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.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="StartEvent_2" targetRef="processBPMNException"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="processBPMNException" targetRef="EndEvent_2"/>
+ </bpmn2:subProcess>
+ <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.*
+GenericPutVnf genericPutVnf = new GenericPutVnf()
+genericPutVnf.putVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="putVnf" targetRef="toggleSuccess"/>
+ <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.*
+GenericPutVnf genericPutVnf = new GenericPutVnf()
+genericPutVnf.setSuccessIndicator(execution, true)
+
+execution.setVariable("WorkflowResponse", " ") //for junits]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_42"/>
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericPutVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_75" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="116.0" y="233.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="134.0" y="274.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="intialization">
+ <dc:Bounds height="80.0" width="100.0" x="240.0" y="211.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="putVnf">
+ <dc:Bounds height="80.0" width="100.0" x="384.0" y="211.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_307" bpmnElement="toggleSuccess">
+ <dc:Bounds height="80.0" width="100.0" x="528.0" y="211.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_233" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="732.0" y="233.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="750.0" y="274.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_75" targetElement="_BPMNShape_ScriptTask_305">
+ <di:waypoint xsi:type="dc:Point" x="152.0" y="251.0"/>
+ <di:waypoint xsi:type="dc:Point" x="240.0" y="251.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_305" targetElement="_BPMNShape_ScriptTask_306">
+ <di:waypoint xsi:type="dc:Point" x="340.0" y="251.0"/>
+ <di:waypoint xsi:type="dc:Point" x="384.0" y="251.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="365.0" y="251.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_306" targetElement="_BPMNShape_ScriptTask_307">
+ <di:waypoint xsi:type="dc:Point" x="484.0" y="251.0"/>
+ <di:waypoint xsi:type="dc:Point" x="528.0" y="251.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="513.0" y="251.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_307" targetElement="_BPMNShape_EndEvent_233">
+ <di:waypoint xsi:type="dc:Point" x="628.0" y="251.0"/>
+ <di:waypoint xsi:type="dc:Point" x="732.0" y="251.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="678.0" y="251.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_31" bpmnElement="processBPMNExceptionSubProcess" isExpanded="true">
+ <dc:Bounds height="169.0" width="322.0" x="174.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_83" bpmnElement="StartEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="204.0" y="463.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="222.0" y="504.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_244" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="432.0" y="463.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="450.0" y="504.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_324" bpmnElement="processBPMNException">
+ <dc:Bounds height="80.0" width="100.0" x="286.0" y="441.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_StartEvent_83" targetElement="_BPMNShape_ScriptTask_324">
+ <di:waypoint xsi:type="dc:Point" x="240.0" y="481.0"/>
+ <di:waypoint xsi:type="dc:Point" x="286.0" y="481.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_324" targetElement="_BPMNShape_EndEvent_244">
+ <di:waypoint xsi:type="dc:Point" x="386.0" y="481.0"/>
+ <di:waypoint xsi:type="dc:Point" x="432.0" y="481.0"/>
+ </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
new file mode 100644
index 0000000..fc9f0a1
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn
@@ -0,0 +1,810 @@
+<?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/ConfirmVolumeGroupName.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn
new file mode 100644
index 0000000..74e962f
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn
@@ -0,0 +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.*
+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.*
+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.*
+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.*
+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.*
+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">
+ <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>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn
new file mode 100644
index 0000000..7da59a3
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn
@@ -0,0 +1,190 @@
+<?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: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.*
+ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
+volume.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="tenantIdMatchCheck" name="Tenant Ids&#xD;&#xA;Match?" default="idsMatchNo">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>idsMatchNo</bpmn2:outgoing>
+ <bpmn2:outgoing>idsMatchYes</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="queryAAIForVolumeGroup" targetRef="tenantIdMatchCheck"/>
+ <bpmn2:sequenceFlow id="idsMatchNo" name="No" sourceRef="tenantIdMatchCheck" targetRef="assignError"/>
+ <bpmn2:sequenceFlow id="idsMatchYes" name="Yes" sourceRef="tenantIdMatchCheck" targetRef="tenantNamesMatchCheck">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("tenantIdsMatch")==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>
+ </bpmn2:endEvent>
+ <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.*
+ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
+volume.assignWorkflowException(execution, "does not belong to your tenant")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="assignError" targetRef="EndEvent_3"/>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_75" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <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.*
+ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
+volume.assignVolumeHeatId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="assignVolumeHeatId" targetRef="EndEvent_1"/>
+ <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.*
+ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
+volume.assignWorkflowException(execution, "name does not match")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="assignErrorNames" targetRef="EndEvent_2"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_74" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="tenantNamesMatchCheck" name="Volume Group&#xD;&#xA;Names Match?" default="groupNamesMatchNo">
+ <bpmn2:incoming>idsMatchYes</bpmn2:incoming>
+ <bpmn2:outgoing>groupNamesMatchNo</bpmn2:outgoing>
+ <bpmn2:outgoing>groupNamesMatchYes</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="groupNamesMatchNo" name="No" sourceRef="tenantNamesMatchCheck" targetRef="assignErrorNames"/>
+ <bpmn2:sequenceFlow id="groupNamesMatchYes" name="Yes" sourceRef="tenantNamesMatchCheck" targetRef="assignVolumeHeatId">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("groupNamesMatch")==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="queryAAIForVolumeGroup"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ConfirmVolumeGroupTenant">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_61" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="129.0" y="324.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="147.0" y="365.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="queryAAIForVolumeGroup">
+ <dc:Bounds height="80.0" width="100.0" x="252.0" y="302.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_61" targetElement="_BPMNShape_ScriptTask_237">
+ <di:waypoint xsi:type="dc:Point" x="165.0" y="342.0"/>
+ <di:waypoint xsi:type="dc:Point" x="252.0" y="342.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="179.0" y="342.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_209" bpmnElement="tenantIdMatchCheck" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="384.0" y="316.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="76.0" x="414.0" y="347.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_237" targetElement="_BPMNShape_ExclusiveGateway_209">
+ <di:waypoint xsi:type="dc:Point" x="352.0" y="342.0"/>
+ <di:waypoint xsi:type="dc:Point" x="368.0" y="342.0"/>
+ <di:waypoint xsi:type="dc:Point" x="368.0" y="341.0"/>
+ <di:waypoint xsi:type="dc:Point" x="384.0" y="341.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_210" bpmnElement="tenantNamesMatchCheck" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="460.0" y="216.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="99.0" x="494.0" y="246.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_238" bpmnElement="assignError">
+ <dc:Bounds height="80.0" width="100.0" x="456.0" y="400.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="idsMatchNo" sourceElement="_BPMNShape_ExclusiveGateway_209" targetElement="_BPMNShape_ScriptTask_238">
+ <di:waypoint xsi:type="dc:Point" x="409.0" y="366.0"/>
+ <di:waypoint xsi:type="dc:Point" x="409.0" y="440.0"/>
+ <di:waypoint xsi:type="dc:Point" x="456.0" y="440.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="414.0" y="400.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="idsMatchYes" sourceElement="_BPMNShape_ExclusiveGateway_209" targetElement="_BPMNShape_ExclusiveGateway_210">
+ <di:waypoint xsi:type="dc:Point" x="409.0" y="316.0"/>
+ <di:waypoint xsi:type="dc:Point" x="409.0" y="241.0"/>
+ <di:waypoint xsi:type="dc:Point" x="460.0" y="241.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="411.0" y="266.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_239" bpmnElement="assignErrorNames">
+ <dc:Bounds height="80.0" width="100.0" x="555.0" y="296.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="groupNamesMatchNo" sourceElement="_BPMNShape_ExclusiveGateway_210" targetElement="_BPMNShape_ScriptTask_239">
+ <di:waypoint xsi:type="dc:Point" x="485.0" y="266.0"/>
+ <di:waypoint xsi:type="dc:Point" x="485.0" y="336.0"/>
+ <di:waypoint xsi:type="dc:Point" x="555.0" y="336.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="491.0" y="296.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_240" bpmnElement="assignVolumeHeatId">
+ <dc:Bounds height="80.0" width="100.0" x="555.0" y="120.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="groupNamesMatchYes" sourceElement="_BPMNShape_ExclusiveGateway_210" targetElement="_BPMNShape_ScriptTask_240">
+ <di:waypoint xsi:type="dc:Point" x="485.0" y="216.0"/>
+ <di:waypoint xsi:type="dc:Point" x="485.0" y="160.0"/>
+ <di:waypoint xsi:type="dc:Point" x="555.0" y="160.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="487.0" y="173.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_200" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="738.0" y="142.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="756.0" y="183.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_240" targetElement="_BPMNShape_EndEvent_200">
+ <di:waypoint xsi:type="dc:Point" x="655.0" y="160.0"/>
+ <di:waypoint xsi:type="dc:Point" x="738.0" y="160.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="692.0" y="160.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_210" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="709.0" y="318.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="727.0" y="359.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_211" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="605.0" y="422.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="623.0" y="463.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_238" targetElement="_BPMNShape_EndEvent_211">
+ <di:waypoint xsi:type="dc:Point" x="556.0" y="440.0"/>
+ <di:waypoint xsi:type="dc:Point" x="605.0" y="440.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="591.0" y="440.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_239" targetElement="_BPMNShape_EndEvent_210">
+ <di:waypoint xsi:type="dc:Point" x="655.0" y="336.0"/>
+ <di:waypoint xsi:type="dc:Point" x="709.0" y="336.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="680.0" y="336.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/CreateAAIVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn
new file mode 100644
index 0000000..8970324
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn
@@ -0,0 +1,519 @@
+<?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="CreateAAIVfModule" name="CreateAAIVfModule" isExecutable="true">
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_5" default="SequenceFlow_7">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("CAAIVfMod_newGenericVnf") == true && execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404) || execution.getVariable("CAAIVfMod_isBaseVfModule") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_5" targetRef="ScriptTask_2"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_22">
+ <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="ProcessAAISearch"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") != 200 && execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") != 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.*
+def cvm = new CreateAAIVfModule()
+cvm.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="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.*
+def cvm = new CreateAAIVfModule()
+cvm.processAAIGenericVnfQuery(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ProcessAAISearch" targetRef="ExclusiveGateway_5"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_5">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_7">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="Generic Vnf does not exist&#xD;&#xA; and Vnf Id != null or&#xD;&#xA;Generic Vnf does exist&#xD;&#xA;and Vnf Id == null" sourceRef="ExclusiveGateway_5" targetRef="CreateGenericVnfFailure">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("CAAIVfMod_newGenericVnf") == false && execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404) || (execution.getVariable("CAAIVfMod_newGenericVnf") == true && execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 200)}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="CreateGenericVnfFailure" name="Create Generic Vnf Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <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.*
+def cvm = new CreateAAIVfModule()
+cvm.handleCreateVfModuleFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_8">
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_69" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="CreateGenericVnfFailure" targetRef="EndEvent_8"/>
+ <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.*
+def cvm = new CreateAAIVfModule()
+cvm.parseForAddOnModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="ScriptTask_2" targetRef="ExclusiveGateway_4"/>
+ <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.*
+def cvm = new CreateAAIVfModule()
+cvm.createVfModule(execution, false)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ScriptTask_8" targetRef="ExclusiveGateway_7"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_4" default="SequenceFlow_33">
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="Vnf Module Exists&#xD;&#xA;" sourceRef="ExclusiveGateway_4" targetRef="CreateGenericVnfFailure"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="ExclusiveGateway_4" targetRef="ScriptTask_8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CAAIVfMod_moduleExists") != true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <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.*
+def cvm = new CreateAAIVfModule()
+cvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVnf" 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.*
+def cvm = new CreateAAIVfModule()
+cvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InitializeVariables" targetRef="QueryAAIForGenericVnf"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <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.*
+def cvm = new CreateAAIVfModule()
+cvm.handleCreateVfModuleFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="CreateVfModuleFailure" targetRef="EndEvent_2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_1" targetRef="CreateVfModuleFailure"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ExclusiveGateway_7" targetRef="ExclusiveGateway_1"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CAAIVfMod_createVfModuleResponseCode") == 200 || execution.getVariable("CAAIVfMod_createVfModuleResponseCode") == 201}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" default="SequenceFlow_26">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_26" name="Create Generic Vnf&#xD;&#xA;Failure" sourceRef="ExclusiveGateway_2" targetRef="CreateGenericVnfFailure"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CAAIVfMod_createGenericVnfResponseCode") == 200 || execution.getVariable("CAAIVfMod_createGenericVnfResponseCode") == 201}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_6" name="Is VID Request?" default="SequenceFlow_9">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="No" sourceRef="ExclusiveGateway_6" targetRef="ScriptTask_3"/>
+ <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.*
+def cvm = new CreateAAIVfModule()
+cvm.createGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_3" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="Yes" sourceRef="ExclusiveGateway_6" targetRef="ScriptTask_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("isVidRequest") =="true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Create Base Module" scriptFormat="groovy">
+ <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.*
+def cvm = new CreateAAIVfModule()
+cvm.createVfModule(execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_4" targetRef="ExclusiveGateway_7"/>
+ <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="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.*
+def cvm = new CreateAAIVfModule()
+cvm.parseForBaseModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_8"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_8" default="SequenceFlow_13">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ExclusiveGateway_8" targetRef="ScriptTask_4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("CAAIVfMod_baseModuleConflict") != true) && (execution.getVariable("CAAIVfMod_moduleExists") != true)}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="Base Module Conflict" sourceRef="ExclusiveGateway_8" targetRef="ExclusiveGateway_2"/>
+ </bpmn2:process>
+ <bpmn2:message id="Message_1" name="CreateAAIVfModuleRequest"/>
+ <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="65.0" y="240.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="83.0" y="281.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="216.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="101.0" y="258.0"/>
+ <di:waypoint xsi:type="dc:Point" x="160.0" y="258.0"/>
+ <di:waypoint xsi:type="dc:Point" x="160.0" y="256.0"/>
+ <di:waypoint xsi:type="dc:Point" x="204.0" y="256.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="123.0" y="258.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="ProcessAAISearch">
+ <dc:Bounds height="80.0" width="100.0" x="518.0" y="117.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_50" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="630.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="655.0" y="285.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_52" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1120.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1145.0" y="285.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_47" bpmnElement="ScriptTask_3">
+ <dc:Bounds height="80.0" width="100.0" x="718.0" y="93.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ExclusiveGateway_225">
+ <di:waypoint xsi:type="dc:Point" x="655.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="655.0" y="88.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="601.0" y="133.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_48" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="695.0" y="391.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ScriptTask_48">
+ <di:waypoint xsi:type="dc:Point" x="655.0" y="280.0"/>
+ <di:waypoint xsi:type="dc:Point" x="655.0" y="431.0"/>
+ <di:waypoint xsi:type="dc:Point" x="695.0" y="431.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="574.0" y="256.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="1216.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1241.0" y="285.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="1224.0" y="454.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1242.0" y="495.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_115" bpmnElement="ScriptTask_4">
+ <dc:Bounds height="80.0" width="100.0" x="996.0" y="24.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_115" targetElement="_BPMNShape_ExclusiveGateway_52">
+ <di:waypoint xsi:type="dc:Point" x="1096.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1145.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1145.0" y="177.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1145.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1282.0" y="51.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="468.0" y="229.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="493.0" y="284.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="493.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="158.0"/>
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="158.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="490.0" y="192.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
+ <dc:Bounds height="80.0" width="100.0" x="518.0" y="335.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="279.0"/>
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="297.0"/>
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="297.0"/>
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="335.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="547.0" y="297.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_50">
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="197.0"/>
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="255.0"/>
+ <di:waypoint xsi:type="dc:Point" x="630.0" y="255.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="565.0" y="250.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="454.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="568.0" y="495.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="415.0"/>
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="454.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="565.0" y="426.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="CreateGenericVnfFailure">
+ <dc:Bounds height="80.0" width="100.0" x="837.0" y="213.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_99" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="861.0" y="107.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="886.0" y="162.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_47" targetElement="_BPMNShape_ExclusiveGateway_99">
+ <di:waypoint xsi:type="dc:Point" x="818.0" y="133.0"/>
+ <di:waypoint xsi:type="dc:Point" x="839.0" y="133.0"/>
+ <di:waypoint xsi:type="dc:Point" x="839.0" y="132.0"/>
+ <di:waypoint xsi:type="dc:Point" x="861.0" y="132.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="839.0" y="132.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="157.0"/>
+ <di:waypoint xsi:type="dc:Point" x="887.0" y="213.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="126.0" x="899.0" y="162.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ScriptTask_115">
+ <di:waypoint xsi:type="dc:Point" x="911.0" y="132.0"/>
+ <di:waypoint xsi:type="dc:Point" x="953.0" y="132.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1045.0" y="132.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1045.0" y="104.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="959.0" y="132.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="680.0" y="255.0"/>
+ <di:waypoint xsi:type="dc:Point" x="758.0" y="255.0"/>
+ <di:waypoint xsi:type="dc:Point" x="758.0" y="253.0"/>
+ <di:waypoint xsi:type="dc:Point" x="837.0" y="253.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="170.0" x="669.0" y="260.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_8">
+ <dc:Bounds height="36.0" width="36.0" x="987.0" y="235.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_EndEvent_161">
+ <di:waypoint xsi:type="dc:Point" x="937.0" y="253.0"/>
+ <di:waypoint xsi:type="dc:Point" x="987.0" y="253.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_100" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="863.0" y="403.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="888.0" y="458.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_48" targetElement="_BPMNShape_ExclusiveGateway_100">
+ <di:waypoint xsi:type="dc:Point" x="795.0" y="431.0"/>
+ <di:waypoint xsi:type="dc:Point" x="822.0" y="431.0"/>
+ <di:waypoint xsi:type="dc:Point" x="822.0" y="428.0"/>
+ <di:waypoint xsi:type="dc:Point" x="863.0" y="428.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="817.0" y="431.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ExclusiveGateway_100" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="888.0" y="403.0"/>
+ <di:waypoint xsi:type="dc:Point" x="888.0" y="348.0"/>
+ <di:waypoint xsi:type="dc:Point" x="887.0" y="348.0"/>
+ <di:waypoint xsi:type="dc:Point" x="887.0" y="293.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="122.0" x="889.0" y="344.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_159" bpmnElement="ScriptTask_8">
+ <dc:Bounds height="80.0" width="100.0" x="996.0" y="389.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ExclusiveGateway_100" targetElement="_BPMNShape_ScriptTask_159">
+ <di:waypoint xsi:type="dc:Point" x="913.0" y="428.0"/>
+ <di:waypoint xsi:type="dc:Point" x="954.0" y="428.0"/>
+ <di:waypoint xsi:type="dc:Point" x="954.0" y="429.0"/>
+ <di:waypoint xsi:type="dc:Point" x="996.0" y="429.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="955.0" y="429.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_159" targetElement="_BPMNShape_ExclusiveGateway_52">
+ <di:waypoint xsi:type="dc:Point" x="1096.0" y="429.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1108.0" y="429.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1145.0" y="429.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1145.0" y="280.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1142.0" y="379.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="216.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="256.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="256.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="324.0" y="256.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="256.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="256.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="254.0"/>
+ <di:waypoint xsi:type="dc:Point" x="468.0" y="254.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="449.0" y="255.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="CreateVfModuleFailure">
+ <dc:Bounds height="80.0" width="100.0" x="1192.0" y="324.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
+ <di:waypoint xsi:type="dc:Point" x="1242.0" y="404.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1242.0" y="454.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
+ <di:waypoint xsi:type="dc:Point" x="1241.0" y="280.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1241.0" y="302.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1242.0" y="302.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1242.0" y="324.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ExclusiveGateway_52" targetElement="_BPMNShape_ExclusiveGateway_54">
+ <di:waypoint xsi:type="dc:Point" x="1170.0" y="255.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1216.0" y="255.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_164" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="1316.0" y="237.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_164">
+ <di:waypoint xsi:type="dc:Point" x="1266.0" y="255.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1316.0" y="255.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="630.0" y="38.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="100.0" x="617.0" y="18.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_47">
+ <di:waypoint xsi:type="dc:Point" x="680.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="699.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="699.0" y="133.0"/>
+ <di:waypoint xsi:type="dc:Point" x="718.0" y="133.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="669.0" y="93.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_162">
+ <di:waypoint xsi:type="dc:Point" x="680.0" y="63.0"/>
+ <di:waypoint xsi:type="dc:Point" x="702.0" y="63.0"/>
+ <di:waypoint xsi:type="dc:Point" x="702.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="724.0" y="40.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="688.0" y="54.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_8" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="863.0" y="14.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="888.0" y="69.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_162" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="724.0" y="0.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_162" targetElement="_BPMNShape_ExclusiveGateway_226">
+ <di:waypoint xsi:type="dc:Point" x="824.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="843.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="843.0" y="39.0"/>
+ <di:waypoint xsi:type="dc:Point" x="863.0" y="39.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="840.0" y="39.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ScriptTask_115">
+ <di:waypoint xsi:type="dc:Point" x="913.0" y="39.0"/>
+ <di:waypoint xsi:type="dc:Point" x="954.0" y="39.0"/>
+ <di:waypoint xsi:type="dc:Point" x="954.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="996.0" y="64.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="951.0" y="52.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ExclusiveGateway_99">
+ <di:waypoint xsi:type="dc:Point" x="888.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="888.0" y="85.0"/>
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="85.0"/>
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="107.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="884.0" y="85.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/CreateAAIVfModuleVolumeGroup.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn
new file mode 100644
index 0000000..bbdd21a
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn
@@ -0,0 +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.*
+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.*
+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">
+ <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.*
+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.*
+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.*
+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>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn
new file mode 100644
index 0000000..d043619
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn
@@ -0,0 +1,482 @@
+<?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="DeleteAAIVfModule" name="DeleteAAIVfModule" isExecutable="true">
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_5" default="SequenceFlow_8">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_5" targetRef="DeleteVfModule">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DAAIVfMod_moduleExists") == true && (execution.getVariable("DAAIVfMod_isBaseModule") == false || (execution.getVariable("DAAIVfMod_isBaseModule") == true && execution.getVariable("DAAIVfMod_isLastModule") == true ))}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_22">
+ <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="ParseForAddonModule"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") != 200}]]></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.*
+def dvm = new DeleteAAIVfModule()
+dvm.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="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.*
+def dvm = new DeleteAAIVfModule()
+dvm.parseForVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ParseForAddonModule" targetRef="ExclusiveGateway_5"/>
+ <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.*
+def dvm = new DeleteAAIVfModule()
+dvm.deleteVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="DeleteVfModule" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" default="SequenceFlow_26">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_26" name="Delete Vf Module&#xD;&#xA;Failure" sourceRef="ExclusiveGateway_2" targetRef="DeleteVfModuleFailure"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 200 || execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 204) && execution.getVariable("DAAIVfMod_isLastModule") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="DeleteVfModuleFailure" name="Delete Vf Module Failure" scriptFormat="groovy">
+ <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.*
+def dvm = new DeleteAAIVfModule()
+dvm.handleDeleteVfModuleFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="DeleteVfModuleFailure" targetRef="EndEvent_8"/>
+ <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.*
+def dvm = new DeleteAAIVfModule()
+dvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVnf" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="Vf Module&#xD;&#xA;Does Not Exist or&#xD;&#xA;Base Module is Not&#xD;&#xA;the Last Vf Module" sourceRef="ExclusiveGateway_5" targetRef="DeleteVfModuleFailure"/>
+ <bpmn2:endEvent id="EndEvent_8">
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_69" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 200 || execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 204) && execution.getVariable("DAAIVfMod_isLastModule") == false} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <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.*
+def dvm = new DeleteAAIVfModule()
+dvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="QueryAAIForGenericVnf1" targetRef="ExclusiveGateway_4"/>
+ <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.*
+def dvm = new DeleteAAIVfModule()
+dvm.handleDeleteGenericVnfFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="DeleteGenericVnfFailure" targetRef="EndEvent_2"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_5">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <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="DeleteGenericVnfFailure"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{((execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 200 || execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 204) && execution.getVariable("DAAIVfMod_isLastModule") == false) || (execution.getVariable("DAAIVfMod_deleteGenericVnfResponseCode") == 200 || execution.getVariable("DAAIVfMod_deleteGenericVnfResponseCode") == 204)}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <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.*
+def dvm = new DeleteAAIVfModule()
+dvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="AAIQueryFailure1" targetRef="EndEvent_3"/>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_70" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <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.*
+def dvm = new DeleteAAIVfModule()
+dvm.deleteGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="DeleteGenericVnf" targetRef="ExclusiveGateway_1"/>
+ <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.*
+def dvm = new DeleteAAIVfModule()
+dvm.parseForResourceVersion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ParseForGenericVNFResourceVersion" targetRef="DeleteGenericVnf"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_4" default="SequenceFlow_13">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ExclusiveGateway_4" targetRef="AAIQueryFailure1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") != 200}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ExclusiveGateway_4" targetRef="ParseForGenericVNFResourceVersion"/>
+ <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="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.*
+def dvm = new DeleteAAIVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InitializeVariables" targetRef="QueryAAIForGenericVnf"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_6" name="Is VID Request?" default="SequenceFlow_3">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="no" sourceRef="ExclusiveGateway_6" targetRef="QueryAAIForGenericVnf1"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="yes" sourceRef="ExclusiveGateway_6" targetRef="EndEvent_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("isVidRequest") =="true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmn2:message id="Message_1" name="DeleteAAIVfModuleRequest"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteAAIVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="59.0" y="200.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="77.0" y="241.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
+ <dc:Bounds height="80.0" width="100.0" x="192.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="95.0" y="218.0"/>
+ <di:waypoint xsi:type="dc:Point" x="192.0" y="218.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="117.0" y="218.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="ParseForAddonModule">
+ <dc:Bounds height="80.0" width="100.0" x="518.0" y="79.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_50" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="630.0" y="192.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="655.0" y="247.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_47" bpmnElement="DeleteVfModule">
+ <dc:Bounds height="80.0" width="100.0" x="695.0" y="0.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ScriptTask_47">
+ <di:waypoint xsi:type="dc:Point" x="655.0" y="192.0"/>
+ <di:waypoint xsi:type="dc:Point" x="655.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="695.0" y="40.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="579.0" y="73.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="1681.0" y="297.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1706.0" y="352.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="1689.0" y="564.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1707.0" y="605.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_115" bpmnElement="DeleteGenericVnf">
+ <dc:Bounds height="80.0" width="100.0" x="1582.0" y="0.0"/>
+ </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:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="191.0"/>
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="120.0"/>
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="120.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="490.0" y="154.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <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:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_50">
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="159.0"/>
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="630.0" y="217.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="565.0" y="212.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_158" bpmnElement="DeleteVfModuleFailure">
+ <dc:Bounds height="80.0" width="100.0" x="837.0" y="175.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_99" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="861.0" y="14.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="886.0" y="69.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_47" targetElement="_BPMNShape_ExclusiveGateway_99">
+ <di:waypoint xsi:type="dc:Point" x="795.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="861.0" y="39.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="817.0" y="40.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="98.0"/>
+ <di:waypoint xsi:type="dc:Point" x="887.0" y="98.0"/>
+ <di:waypoint xsi:type="dc:Point" x="887.0" y="175.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="126.0" x="887.0" y="100.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ExclusiveGateway_226">
+ <di:waypoint xsi:type="dc:Point" x="911.0" y="39.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1068.0" y="39.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="959.0" y="39.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_8">
+ <dc:Bounds height="36.0" width="36.0" x="869.0" y="299.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="887.0" y="340.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_EndEvent_161">
+ <di:waypoint xsi:type="dc:Point" x="887.0" y="255.0"/>
+ <di:waypoint xsi:type="dc:Point" x="887.0" y="299.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="884.0" y="280.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="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="292.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="299.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_ScriptTask_161" bpmnElement="DeleteGenericVnfFailure">
+ <dc:Bounds height="80.0" width="100.0" x="1656.0" y="432.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
+ <di:waypoint xsi:type="dc:Point" x="1706.0" y="512.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1707.0" y="564.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1703.0" y="515.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
+ <di:waypoint xsi:type="dc:Point" x="1706.0" y="347.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1706.0" y="432.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1703.0" y="390.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="680.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="758.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="758.0" y="215.0"/>
+ <di:waypoint xsi:type="dc:Point" x="837.0" y="215.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="94.0" x="708.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ExclusiveGateway_54">
+ <di:waypoint xsi:type="dc:Point" x="911.0" y="39.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1008.0" y="39.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1008.0" y="140.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1008.0" y="322.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1681.0" y="322.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1005.0" y="197.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_115" targetElement="_BPMNShape_ExclusiveGateway_54">
+ <di:waypoint xsi:type="dc:Point" x="1632.0" y="80.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1632.0" y="322.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1681.0" y="322.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1629.0" y="187.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="1806.0" y="305.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1824.0" y="346.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_162">
+ <di:waypoint xsi:type="dc:Point" x="1731.0" y="322.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1806.0" y="323.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1753.0" y="322.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_242" bpmnElement="QueryAAIForGenericVnf1">
+ <dc:Bounds height="80.0" width="100.0" x="1166.0" y="0.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_213" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1325.0" y="15.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1350.0" y="70.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_242" targetElement="_BPMNShape_ExclusiveGateway_213">
+ <di:waypoint xsi:type="dc:Point" x="1266.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1325.0" y="40.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1292.0" y="40.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_243" bpmnElement="AAIQueryFailure1">
+ <dc:Bounds height="80.0" width="100.0" x="1300.0" y="117.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_244" bpmnElement="ParseForGenericVNFResourceVersion">
+ <dc:Bounds height="80.0" width="100.0" x="1440.0" y="0.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="1332.0" y="244.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1350.0" y="285.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_ScriptTask_243">
+ <di:waypoint xsi:type="dc:Point" x="1350.0" y="65.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1349.0" y="90.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1350.0" y="90.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1350.0" y="117.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1347.0" y="95.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_243" targetElement="_BPMNShape_EndEvent_181">
+ <di:waypoint xsi:type="dc:Point" x="1350.0" y="197.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1350.0" y="244.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1347.0" y="226.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_ScriptTask_244">
+ <di:waypoint xsi:type="dc:Point" x="1375.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1440.0" y="40.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1394.0" y="40.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_244" targetElement="_BPMNShape_ScriptTask_115">
+ <di:waypoint xsi:type="dc:Point" x="1540.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1582.0" y="40.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1565.0" y="40.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1068.0" y="14.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="100.0" x="1044.0" y="-6.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ScriptTask_242">
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="39.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1142.0" y="39.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1142.0" y="40.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1166.0" y="40.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_EndEvent_162">
+ <di:waypoint xsi:type="dc:Point" x="1093.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1093.0" y="289.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1823.0" y="289.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1823.0" y="305.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="27.0" x="1104.0" y="146.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/DoDeleteVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn
new file mode 100644
index 0000000..06aeafb
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn
@@ -0,0 +1,287 @@
+<?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/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn
new file mode 100644
index 0000000..2e96035
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn
@@ -0,0 +1,650 @@
+<?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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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.*
+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>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn
new file mode 100644
index 0000000..bd16398
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.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://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">
+ <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.*
+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.*
+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.*
+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.*
+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">
+ <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.*
+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.*
+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.*
+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>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn
new file mode 100644
index 0000000..32206bd
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn
@@ -0,0 +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.*
+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.*
+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">
+ <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.*
+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.*
+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.*
+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>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn
new file mode 100644
index 0000000..fabd9c2
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn
@@ -0,0 +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.*
+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.*
+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">
+ <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.*
+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.*
+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.*
+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>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn
new file mode 100644
index 0000000..04f9d02
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn
@@ -0,0 +1,442 @@
+<?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: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 +
+ " 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()
+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()
+vnfAdapterRestV1.vnfAdapterWorkflowException(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("VNFREST_vnfAdapterStatusCode") == '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="waitForAsyncMessage">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("VNFREST_vnfAdapterStatusCode") == '200' || execution.getVariable("VNFREST_vnfAdapterStatusCode") == '202'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="Timeout" attachedToRef="waitForAsyncMessage">
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition id="TimerEventDefinition_1">
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${URN_mso_po_timeout}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:boundaryEvent>
+ <bpmn2:subProcess id="waitForAsyncMessage" name="Wait for Callback">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="Catch Event">
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
+ <bpmn2:messageEventDefinition id="MessageEventDefinition_1" messageRef="Message_1"/>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="IntermediateCatchEvent_1" targetRef="EndEvent_2"/>
+ <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:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="BoundaryEvent_1" targetRef="ScriptTask_5"/>
+ <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()
+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>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="ScriptTask_6" targetRef="ExclusiveGateway_2"/>
+ <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: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:endEvent id="EndEvent_7">
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_20" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Callback&#xD;&#xA;Exception?" default="SequenceFlow_31">
+ <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="no" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_setSuccess"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="yes" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <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()
+vnfAdapterRestV1.setSuccessIndicator(execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ScriptTask_setSuccess" targetRef="EndEvent_6"/>
+ <bpmn2:endEvent id="EndEvent_6" name="End Flow">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <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()
+vnfAdapterRestV1.sendRequestToVnfAdapter(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_2"/>
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handling Sub Process" triggeredByEvent="true">
+ <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>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_8" targetRef="EndEvent_1"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <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:subProcess>
+ <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>
+ </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:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmn2:message id="Message_1" name="vnfAdapterRestCallbackMessage"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="vnfAdapterRestV1">
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_56" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="204.0" y="148.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_14" bpmnElement="waitForAsyncMessage" isExpanded="true">
+ <dc:Bounds height="154.0" width="265.0" x="744.0" y="275.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_58" bpmnElement="ScriptTask_6">
+ <dc:Bounds height="80.0" width="100.0" x="1046.0" y="311.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_59" bpmnElement="ScriptTask_5">
+ <dc:Bounds height="80.0" width="100.0" x="827.0" y="492.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_24" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="859.0" y="411.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="52.0" x="894.0" y="441.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_20" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="863.0" y="330.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="76.0" x="843.0" y="371.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_78" bpmnElement="ScriptTask_4">
+ <dc:Bounds height="80.0" width="97.0" x="744.0" y="148.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="492.0" y="148.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="84.0" y="170.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="85.0" y="211.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="ScriptTask_3">
+ <dc:Bounds height="80.0" width="97.0" x="744.0" y="24.0"/>
+ </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="120.0" y="188.0"/>
+ <di:waypoint xsi:type="dc:Point" x="204.0" y="188.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="130.0" y="188.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_105" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="624.0" y="162.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="649.0" y="217.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.0" y="188.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="187.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="611.0" y="187.0"/>
+ </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.0" y="162.0"/>
+ <di:waypoint xsi:type="dc:Point" x="649.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="744.0" y="64.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="27.0" x="688.0" y="64.0"/>
+ </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.0" y="187.0"/>
+ <di:waypoint xsi:type="dc:Point" x="709.0" y="187.0"/>
+ <di:waypoint xsi:type="dc:Point" x="709.0" y="188.0"/>
+ <di:waypoint xsi:type="dc:Point" x="744.0" y="188.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="35.0" x="684.0" y="188.0"/>
+ </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.0" y="212.0"/>
+ <di:waypoint xsi:type="dc:Point" x="649.0" y="353.0"/>
+ <di:waypoint xsi:type="dc:Point" x="708.0" y="353.0"/>
+ <di:waypoint xsi:type="dc:Point" x="744.0" y="353.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="27.0" x="688.0" y="328.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_55" bpmnElement="StartEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="768.0" y="330.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="786.0" y="371.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="804.0" y="348.0"/>
+ <di:waypoint xsi:type="dc:Point" x="863.0" y="348.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="833.0" y="348.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_156" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="948.0" y="330.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="966.0" y="371.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_IntermediateCatchEvent_20" targetElement="_BPMNShape_EndEvent_156">
+ <di:waypoint xsi:type="dc:Point" x="899.0" y="348.0"/>
+ <di:waypoint xsi:type="dc:Point" x="929.0" y="348.0"/>
+ <di:waypoint xsi:type="dc:Point" x="929.0" y="347.0"/>
+ <di:waypoint xsi:type="dc:Point" x="948.0" y="348.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="926.0" y="348.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="877.0" y="447.0"/>
+ <di:waypoint xsi:type="dc:Point" x="877.0" y="492.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="874.0" y="472.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_SubProcess_14" targetElement="_BPMNShape_ScriptTask_58">
+ <di:waypoint xsi:type="dc:Point" x="1008.0" y="351.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1046.0" y="351.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1023.0" y="351.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_106" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1188.0" y="325.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="71.0" x="1179.0" y="288.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_158" bpmnElement="EndEvent_6">
+ <dc:Bounds height="36.0" width="36.0" x="1463.0" y="333.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="60.0" x="1451.0" y="374.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ExclusiveGateway_106" targetElement="_BPMNShape_ScriptTask_236">
+ <di:waypoint xsi:type="dc:Point" x="1238.0" y="350.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1308.0" y="350.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="20.0" x="1248.0" y="350.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_159" bpmnElement="EndEvent_7">
+ <dc:Bounds height="36.0" width="36.0" x="1196.0" y="426.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1214.0" y="467.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ExclusiveGateway_106" targetElement="_BPMNShape_EndEvent_159">
+ <di:waypoint xsi:type="dc:Point" x="1213.0" y="375.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1213.0" y="392.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1214.0" y="392.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1214.0" y="426.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="27.0" x="1223.0" y="390.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_58" targetElement="_BPMNShape_ExclusiveGateway_106">
+ <di:waypoint xsi:type="dc:Point" x="1146.0" y="351.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1173.0" y="351.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1173.0" y="350.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1188.0" y="350.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1170.0" y="350.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_8">
+ <dc:Bounds height="36.0" width="36.0" x="974.0" y="514.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="992.0" y="555.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="927.0" y="532.0"/>
+ <di:waypoint xsi:type="dc:Point" x="974.0" y="532.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="951.0" y="532.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_9">
+ <dc:Bounds height="36.0" width="36.0" x="891.0" y="46.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="909.0" y="87.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.0" y="64.0"/>
+ <di:waypoint xsi:type="dc:Point" x="891.0" y="64.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="865.0" y="64.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_10">
+ <dc:Bounds height="36.0" width="36.0" x="892.0" y="170.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="910.0" y="211.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.0" y="188.0"/>
+ <di:waypoint xsi:type="dc:Point" x="892.0" y="188.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_236" bpmnElement="ScriptTask_setSuccess">
+ <dc:Bounds height="83.0" width="97.0" x="1308.0" y="309.0"/>
+ </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="1404.0" y="350.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1422.0" y="350.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1422.0" y="351.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1463.0" y="351.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1419.0" y="351.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="ScriptTask_7">
+ <dc:Bounds height="83.0" width="97.0" x="360.0" y="146.0"/>
+ </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.0" y="188.0"/>
+ <di:waypoint xsi:type="dc:Point" x="344.0" y="188.0"/>
+ <di:waypoint xsi:type="dc:Point" x="344.0" y="187.0"/>
+ <di:waypoint xsi:type="dc:Point" x="360.0" y="187.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="317.0" y="188.0"/>
+ </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.0" y="187.0"/>
+ <di:waypoint xsi:type="dc:Point" x="474.0" y="187.0"/>
+ <di:waypoint xsi:type="dc:Point" x="474.0" y="188.0"/>
+ <di:waypoint xsi:type="dc:Point" x="492.0" y="188.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_24" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds height="181.0" width="382.0" x="180.0" y="532.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="225.0" y="605.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="243.0" y="646.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_207" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="477.0" y="605.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="495.0" y="646.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ScriptTask_8">
+ <dc:Bounds height="83.0" width="97.0" x="323.0" y="581.0"/>
+ </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="261.0" y="623.0"/>
+ <di:waypoint xsi:type="dc:Point" x="323.0" y="622.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="273.0" y="623.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_266" targetElement="_BPMNShape_EndEvent_207">
+ <di:waypoint xsi:type="dc:Point" x="419.0" y="622.0"/>
+ <di:waypoint xsi:type="dc:Point" x="477.0" y="623.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="445.0" y="623.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/urn.properties b/bpmn/MSOGammaBPMN/src/main/resources/urn.properties
new file mode 100644
index 0000000..44967b7
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/urn.properties
@@ -0,0 +1,30 @@
+###
+# ============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
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl b/bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl
new file mode 100644
index 0000000..471745c
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl
@@ -0,0 +1,233 @@
+<?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: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">
+ <types>
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://com.att.mso/vnfNotify"
+ version="1.0">
+
+ <xs:element name="createVnfNotification" type="tns:createVnfNotification"/>
+
+ <xs:element name="updateVnfNotification" type="tns:updateVnfNotification"/>
+
+ <xs:element name="deleteVnfNotification" type="tns:deleteVnfNotification"/>
+
+ <xs:element name="queryVnfNotification" type="tns:queryVnfNotification"/>
+
+ <xs:element name="rollbackVnfNotification" type="tns:rollbackVnfNotification"/>
+
+ <xs:complexType name="queryVnfNotification">
+ <xs:sequence>
+ <xs:element name="messageId" type="xs:string"/>
+ <xs:element name="completed" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+ <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+ <xs:element minOccurs="0" name="vnfExists" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
+ <xs:element minOccurs="0" name="status" type="tns:vnfStatus"/>
+ <xs:element minOccurs="0" name="outputs">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="key" type="xs:string"/>
+ <xs:element minOccurs="0" name="value" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="deleteVnfNotification">
+ <xs:sequence>
+ <xs:element name="messageId" type="xs:string"/>
+ <xs:element name="completed" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+ <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="rollbackVnfNotification">
+ <xs:sequence>
+ <xs:element name="messageId" type="xs:string"/>
+ <xs:element name="completed" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+ <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="createVnfNotification">
+ <xs:sequence>
+ <xs:element name="messageId" type="xs:string"/>
+ <xs:element name="completed" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+ <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+ <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
+ <xs:element minOccurs="0" name="outputs">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="key" type="xs:string"/>
+ <xs:element minOccurs="0" name="value" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element minOccurs="0" name="rollback" type="tns:vnfRollback"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="updateVnfNotification">
+ <xs:sequence>
+ <xs:element name="messageId" type="xs:string"/>
+ <xs:element name="completed" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+ <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+ <xs:element minOccurs="0" name="outputs">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="key" type="xs:string"/>
+ <xs:element minOccurs="0" name="value" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element minOccurs="0" name="rollback" type="tns:vnfRollback"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="vnfRollback">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="cloudSiteId" type="xs:string"/>
+ <xs:element minOccurs="0" name="msoRequest" type="tns:msoRequest"/>
+ <xs:element name="tenantCreated" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:string"/>
+ <xs:element name="vnfCreated" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="msoRequest">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="requestId" type="xs:string"/>
+ <xs:element minOccurs="0" name="serviceInstanceId" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:simpleType name="msoExceptionCategory">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="OPENSTACK"/>
+ <xs:enumeration value="IO"/>
+ <xs:enumeration value="INTERNAL"/>
+ <xs:enumeration value="USERDATA"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="vnfStatus">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ACTIVE"/>
+ <xs:enumeration value="FAILED"/>
+ <xs:enumeration value="NOTFOUND"/>
+ <xs:enumeration value="UNKNOWN"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:schema>
+ </types>
+ <message name="rollbackVnfNotification">
+ <part element="tns:rollbackVnfNotification" name="parameters"/>
+ </message>
+ <message name="queryVnfNotification">
+ <part element="tns:queryVnfNotification" name="parameters"/>
+ </message>
+ <message name="createVnfNotification">
+ <part element="tns:createVnfNotification" name="parameters"/>
+ </message>
+ <message name="updateVnfNotification">
+ <part element="tns:updateVnfNotification" name="parameters"/>
+ </message>
+ <message name="deleteVnfNotification">
+ <part element="tns:deleteVnfNotification" name="parameters"/>
+ </message>
+ <portType name="vnfAdapterNotify">
+ <operation name="rollbackVnfNotification">
+ <input message="tns:rollbackVnfNotification"
+ wsam:Action="http://com.att.mso/notify/adapterNotify/rollbackVnfNotificationRequest"/>
+ </operation>
+ <operation name="queryVnfNotification">
+ <input message="tns:queryVnfNotification"
+ wsam:Action="http://com.att.mso/notify/adapterNotify/queryVnfNotificationRequest"/>
+ </operation>
+ <operation name="createVnfNotification">
+ <input message="tns:createVnfNotification"
+ wsam:Action="http://com.att.mso/notify/adapterNotify/createVnfNotificationRequest"/>
+ </operation>
+ <operation name="updateVnfNotification">
+ <input message="tns:updateVnfNotification"
+ wsam:Action="http://com.att.mso/notify/adapterNotify/updateVnfNotificationRequest"/>
+ </operation>
+ <operation name="deleteVnfNotification">
+ <input message="tns:deleteVnfNotification"
+ wsam:Action="http://com.att.mso/notify/adapterNotify/deleteVnfNotificationRequest"/>
+ </operation>
+ </portType>
+ <binding name="MsoVnfAdapterAsyncImplPortBinding" type="tns:vnfAdapterNotify">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="rollbackVnfNotification">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="queryVnfNotification">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="createVnfNotification">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="updateVnfNotification">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="deleteVnfNotification">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+ <service name="vnfAdapterNotify">
+ <port binding="tns:MsoVnfAdapterAsyncImplPortBinding"
+ name="MsoVnfAdapterAsyncImplPort">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+</definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100644
index 0000000..130f95e
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/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/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644
index 0000000..42717c5
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/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</context-root>
+</jboss-web>
diff --git a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml b/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..e046d15
--- /dev/null
+++ b/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,102 @@
+<?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>
diff --git a/bpmn/MSORESTClient/pom.xml b/bpmn/MSORESTClient/pom.xml
new file mode 100644
index 0000000..97d9971
--- /dev/null
+++ b/bpmn/MSORESTClient/pom.xml
@@ -0,0 +1,59 @@
+<?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>0.0.4-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>
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
new file mode 100644
index 0000000..dfb9f36
--- /dev/null
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java
@@ -0,0 +1,143 @@
+/*-
+ * ============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 java.io.IOException;
+
+import org.apache.http.Header;
+import org.apache.http.HttpResponse;
+import org.apache.http.util.EntityUtils;
+
+/**
+ * An immutable class that encapsulates an API response.
+ *
+ * @version 1.0
+ * @since 1.0
+ */
+public class APIResponse {
+ private final int statusCode;
+ private final byte[] responseBody;
+ private final HttpHeader[] headers;
+
+ /**
+ * Internal method used to create http headers using the specified
+ * HttpResponse object.
+ *
+ * @param httpResponse used to create headers
+ * @return http headers
+ */
+ private HttpHeader[] buildHeaders(final HttpResponse httpResponse) {
+ final Header[] headers = httpResponse.getAllHeaders();
+
+ HttpHeader[] httpHeaders = new HttpHeader[headers.length];
+ for (int i = 0; i < headers.length; ++i) {
+ final Header header = headers[i];
+ final String name = header.getName();
+ final String value = header.getValue();
+ final HttpHeader httpHeader = new HttpHeader(name, value);
+ httpHeaders[i] = httpHeader;
+ }
+
+ return httpHeaders;
+ }
+
+ /**
+ * Create an APIResponse object using the specified HttpResponse object.
+ *
+ * @param httpResponse used to create the APIResponse
+ *
+ * @throws RESTException if unable to read from the HttpResponse object
+ */
+ public APIResponse(final HttpResponse httpResponse) throws RESTException {
+ try {
+ this.statusCode = httpResponse.getStatusLine().getStatusCode();
+
+ if (httpResponse.getEntity() == null)
+ {
+ this.responseBody = null;
+ }
+ else
+ {
+ this.responseBody = EntityUtils.toByteArray(httpResponse.getEntity());
+ }
+
+ this.headers = buildHeaders(httpResponse);
+ } catch (IOException ioe) {
+ throw new RESTException(ioe);
+ }
+ }
+
+ /**
+ * Gets the http status code returned by the api server.
+ * <p>
+ * For example, status code 200 represents 'OK.'
+ *
+ * @return status code
+ */
+ public int getStatusCode() {
+ return this.statusCode;
+ }
+
+ /**
+ * Gets the http response body as a byte array.
+ *
+ * @return http response body
+ */
+ public byte[] getResponseBodyAsByteArray() {
+ return this.responseBody;
+ }
+
+ /**
+ * Gets the http response body as a string.
+ *
+ * @return http response body
+ */
+ public String getResponseBodyAsString() {
+ if (this.responseBody != null) {
+ return new String(this.responseBody);
+ } else {
+ return "";
+ }
+ }
+
+ /**
+ * Gets a list of all the headers returned by the API response.
+ *
+ * @return an array of all the HttpHeaders
+ */
+ 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;
+ }
+
+ public String getFirstHeader(String name) {
+ for (HttpHeader header : headers) {
+ if (header.getName().equals(name)) {
+ return header.getValue();
+ }
+ }
+ return null;
+ }
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HostNameVerifier.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HostNameVerifier.java
new file mode 100644
index 0000000..f597fdf
--- /dev/null
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HostNameVerifier.java
@@ -0,0 +1,45 @@
+/*-
+ * ============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 javax.net.ssl.SSLException;
+
+import org.apache.http.conn.ssl.AbstractVerifier;
+
+/**
+ * @version 1.0
+ * Place holder to validate host name, for now just invokes the super class method
+ *
+ */
+public class HostNameVerifier extends AbstractVerifier {
+
+ public final void verify(
+ final String host,
+ final String[] cns,
+ final String[] subjectAlts) throws SSLException {
+ try {
+ verify(host, cns, subjectAlts, true);
+ } catch (SSLException sex) {
+
+ }
+ }
+
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java
new file mode 100644
index 0000000..e0d6c30
--- /dev/null
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java
@@ -0,0 +1,65 @@
+/*-
+ * ============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;
+
+/**
+ * An immutable class used to wrap an http header.
+ *
+ * @version 1.0
+ * @since 1.0
+ */
+public class HttpHeader {
+ private final String name;
+ private final String value;
+
+ /**
+ * Create an http header using the specified name and value
+ *
+ * @param name name of http header
+ * @param value value of http header
+ */
+ public HttpHeader(final String name, final String value) {
+ if (name == null) {
+ throw new IllegalArgumentException("Name may not be null.");
+ }
+
+ this.name = name;
+ this.value = value;
+ }
+
+ /**
+ * Gets the header name.
+ *
+ * @return header name
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Gets the header value.
+ *
+ * @return header value
+ */
+ public String getValue() {
+ return this.value;
+ }
+}
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
new file mode 100644
index 0000000..5c20004
--- /dev/null
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
@@ -0,0 +1,618 @@
+/*-
+ * ============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 java.io.Closeable;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Set;
+
+import javax.net.ssl.SSLSocketFactory;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpHost;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPatch;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.http.message.AbstractHttpMessage;
+import org.apache.http.util.EntityUtils;
+
+/**
+ * Client used to send RESTFul requests.
+ * <p>
+ * Many of the methods return a reference to the 'this,' thereby allowing
+ * method chaining.
+ * <br>
+ * An example of usage can be found below:
+ * <pre>
+ * RESTClient client;
+ * try {
+ * client = new RESTClient("http://www.openecomp.org");
+ * APIResponse response = client
+ * .setHeader("Accept", "application/json")
+ * .setHeader("Clientid", "clientid")
+ * .setHeader("header", "value")
+ * .httpPost("postbody");
+ * if (response.getStatusCode() == 200) {
+ * System.out.println("Success!");
+ * }
+ * } catch (RESTException re) {
+ * // Handle Exception
+ * }
+ * </pre>
+ *
+ * @version 1.0
+ * @since 1.0
+ */
+public class RESTClient {
+ private final String proxyHost;
+ private final int proxyPort;
+
+ private final String URL;
+
+ private final LinkedHashMap<String, List<String>> headers;
+ private final LinkedHashMap<String, List<String>> parameters;
+
+ private HttpEntity httpEntity;
+ private HttpClient unitTestClient;
+
+ /**
+ * Internal method used to build an APIResponse using the specified
+ * HttpResponse object.
+ *
+ * @param response response wrapped inside an APIResponse object
+ * @return api response
+ */
+ private APIResponse buildResponse(HttpResponse response)
+ throws RESTException {
+
+ return new APIResponse(response);
+ }
+
+ /**
+ * Used to release any resources used by the connection.
+ * @param response HttpResponse object used for releasing the connection
+ * @throws RESTException if unable to release connection
+ *
+ */
+ private void releaseConnection(HttpResponse response) throws RESTException {
+ try {
+ EntityUtils.consume(response.getEntity());
+ } catch (IOException ioe) {
+ throw new RESTException(ioe);
+ }
+ }
+
+ /**
+ * Sets headers to the http message.
+ *
+ * @param httpMsg http message to set headers for
+ */
+ private void addInternalHeaders(AbstractHttpMessage httpMsg) {
+ if (headers.isEmpty()) {
+ return;
+ }
+
+ final Set<String> keySet = headers.keySet();
+ for (final String key : keySet) {
+ final List<String> values = headers.get(key);
+ for (final String value : values) {
+ httpMsg.addHeader(key, value);
+ }
+ }
+ }
+
+ /**
+ * Builds the query part of a URL.
+ *
+ * @return query
+ */
+ private String buildQuery() {
+ if (this.parameters.size() == 0) {
+ return "";
+ }
+
+ StringBuilder sb = new StringBuilder();
+ String charSet = "UTF-8";
+ try {
+ Iterator<String> keyitr = this.parameters.keySet().iterator();
+ for (int i = 0; keyitr.hasNext(); ++i) {
+ if (i > 0) {
+ sb.append("&");
+ }
+
+ final String name = keyitr.next();
+ final List<String> values = this.parameters.get(name);
+ for(final String value : values) {
+ sb.append(URLEncoder.encode(name, charSet));
+ sb.append("=");
+ sb.append(URLEncoder.encode(value, charSet));
+ }
+ }
+ } catch (UnsupportedEncodingException e) {
+ // should not occur
+ e.printStackTrace();
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Creates an http client that can be used for sending http requests.
+ *
+ * @return created http client
+ *
+ * @throws RESTException if unable to create http client.
+ */
+ private CloseableHttpClient createClient() throws RESTException {
+ //TODO - we may want to trust self signed certificate at some point - add implementation here
+ HttpClientBuilder clientBuilder;
+
+ try {
+ SSLConnectionSocketFactory sslSocketFactory = new SSLConnectionSocketFactory(
+ (SSLSocketFactory) SSLSocketFactory.getDefault(),
+ new HostNameVerifier());
+ Registry<ConnectionSocketFactory> registry = RegistryBuilder
+ .<ConnectionSocketFactory> create()
+ .register("http",
+ PlainConnectionSocketFactory.getSocketFactory())
+ .register("https", sslSocketFactory).build();
+ PoolingHttpClientConnectionManager manager = new PoolingHttpClientConnectionManager(
+ registry);
+ clientBuilder = HttpClientBuilder.create().setConnectionManager(
+ manager);
+ } catch (Exception ex) {
+ throw new RESTException(ex.getMessage());
+ }
+ clientBuilder.disableRedirectHandling();
+
+ if ((this.proxyHost != null) && (this.proxyPort != -1)) {
+ HttpHost proxy = new HttpHost(this.proxyHost, this.proxyPort);
+ clientBuilder.setProxy(proxy);
+ }
+
+ return clientBuilder.build();
+ }
+
+ /**
+ * Creates a RESTClient with the specified URL, proxy host, and proxy port.
+ *
+ * @param URL URL to send request to
+ * @param proxyHost proxy host to use for sending request
+ * @param proxyPort proxy port to use for sendin request
+ *
+ * @throws RESTException if unable to create a RESTClient
+ */
+ public RESTClient(String URL, String proxyHost, int proxyPort)
+ throws RESTException {
+ this(new RESTConfig(URL, proxyHost, proxyPort));
+ }
+
+ /**
+ * Creates a RESTClient with the specified URL. No proxy host nor port will
+ * be used.
+ *
+ * @param URL URL to send request to
+ *
+ * @throws RESTException if unable to create a RESTClient
+ */
+ public RESTClient(String URL) throws RESTException {
+ this(new RESTConfig(URL));
+ }
+
+ /**
+ * Creates a RESTClient with the RESTConfig object.
+ *
+ * @param RESTConfig config to use for sending request
+ *
+ * @throws RESTException if unable to create a RESTClient
+ */
+ public RESTClient(RESTConfig cfg) throws RESTException {
+ this.headers = new LinkedHashMap<String, List<String>>();
+ this.parameters = new LinkedHashMap<String, List<String>>();
+ this.URL = cfg.getURL();
+ this.proxyHost = cfg.getProxyHost();
+ this.proxyPort = cfg.getProxyPort();
+ }
+
+ /**
+ * Adds parameter to be sent during http request.
+ * <p>
+ * Does not remove any parameters with the same name, thus allowing
+ * duplicates.
+ *
+ * @param name name of parameter
+ * @param value value of parametr
+ * @return a reference to 'this', which can be used for method chaining
+ */
+ public RESTClient addParameter(String name, String value) {
+ if (!parameters.containsKey(name)) {
+ parameters.put(name, new ArrayList<String>());
+ }
+
+ List<String> values = parameters.get(name);
+ values.add(value);
+
+ return this;
+ }
+
+ /**
+ * Sets parameter to be sent during http request.
+ * <p>
+ * Removes any parameters with the same name, thus disallowing duplicates.
+ *
+ * @param name name of parameter
+ * @param value value of parametr
+ * @return a reference to 'this', which can be used for method chaining
+ */
+ public RESTClient setParameter(String name, String value) {
+ if (parameters.containsKey(name)) {
+ parameters.get(name).clear();
+ }
+
+ addParameter(name, value);
+
+ return this;
+ }
+
+ /**
+ * Adds http header to be sent during http request.
+ * <p>
+ * Does not remove any headers with the same name, thus allowing
+ * duplicates.
+ *
+ * @param name name of header
+ * @param value value of header
+ * @return a reference to 'this', which can be used for method chaining
+ */
+ public RESTClient addHeader(String name, String value) {
+ if (!headers.containsKey(name)) {
+ headers.put(name, new ArrayList<String>());
+ }
+
+ List<String> values = headers.get(name);
+ values.add(value);
+
+ return this;
+ }
+
+ /**
+ * Sets http header to be sent during http request.
+ * <p>
+ * Does not remove any headers with the same name, thus allowing
+ * duplicates.
+ *
+ * @param name name of header
+ * @param value value of header
+ * @return a reference to 'this', which can be used for method chaining
+ */
+ public RESTClient setHeader(String name, String value) {
+ if (headers.containsKey(name)) {
+ headers.get(name).clear();
+ }
+
+ addHeader(name, value);
+
+ return this;
+ }
+
+ /**
+ * Convenience method for adding the authorization header using the
+ * specified OAuthToken object.
+ *
+ * @param token token to use for setting authorization
+ * @return a reference to 'this,' which can be used for method chaining
+ */
+ public RESTClient addAuthorizationHeader(String token) {
+ this.addHeader("Authorization", token);
+ return this;
+ }
+
+ /**
+ * Alias for httpGet().
+ *
+ * @see RESTClient#httpGet()
+ */
+ public APIResponse get() throws RESTException {
+ return httpGet();
+ }
+
+ /**
+ * Sends an http GET request using the parameters and headers previously
+ * set.
+ *
+ * @return api response
+ *
+ * @throws RESTException if request was unsuccessful
+ */
+ public APIResponse httpGet() throws RESTException {
+ HttpResponse response = null;
+
+ try (CloseableHttpClient httpClient = createClient()) {
+ String query = "";
+ if (!buildQuery().equals("")) {
+ query = "?" + buildQuery();
+ }
+ HttpGet httpGet = new HttpGet(this.getURL() + query);
+ addInternalHeaders(httpGet);
+
+ response = httpClient.execute(httpGet);
+
+ APIResponse apiResponse = buildResponse(response);
+ return apiResponse;
+ } catch (IOException ioe) {
+ throw new RESTException(ioe);
+ } finally {
+ if (response != null) {
+ this.releaseConnection(response);
+ }
+ }
+ }
+
+ /**
+ * Alias for httpPost()
+ *
+ * @see RESTClient#httpPost()
+ */
+ public APIResponse post() throws RESTException {
+ return httpPost();
+ }
+
+ /**
+ * Sends an http POST request.
+ * <p>
+ * POST body will be set to the values set using add/setParameter()
+ *
+ * @return api response
+ *
+ * @throws RESTException if POST was unsuccessful
+ */
+ public APIResponse httpPost() throws RESTException {
+ APIResponse response = httpPost(buildQuery());
+ return response;
+ }
+
+ /**
+ * Sends an http POST request using the specified body.
+ *
+ * @return api response
+ *
+ * @throws RESTException if POST was unsuccessful
+ */
+ public APIResponse httpPost(String body) throws RESTException {
+ HttpResponse response = null;
+ try (CloseableHttpClient httpClient = createClient()) {
+ HttpPost httpPost = new HttpPost(this.getURL());
+ addInternalHeaders(httpPost);
+ if (body != null && !body.equals("")) {
+ httpEntity = new StringEntity(body);
+ httpPost.setEntity(new StringEntity(body));
+ }
+
+ response = httpClient.execute(httpPost);
+
+ return buildResponse(response);
+ } catch (IOException e) {
+ throw new RESTException(e);
+ } finally {
+ if (response != null) {
+ this.releaseConnection(response);
+ }
+ }
+ }
+
+ /**
+ *
+ * @param body Data to PUT
+ * @return API response
+ * @throws RESTException
+ */
+ public APIResponse httpPut(String body) throws RESTException {
+ HttpResponse response = null;
+ try (CloseableHttpClient httpClient = createClient()) {
+
+ String query = "";
+ if (!buildQuery().equals("")) {
+ query = "?" + buildQuery();
+ }
+ HttpPut httpPut = new HttpPut(this.getURL() + query);
+ addInternalHeaders(httpPut);
+ if (body != null && !body.equals("")) {
+ httpEntity = new StringEntity(body);
+ httpPut.setEntity(httpEntity);
+ }
+
+ response = httpClient.execute(httpPut);
+
+ return buildResponse(response);
+ } catch (IOException e) {
+ throw new RESTException(e);
+ } finally {
+ if (response != null) {
+ this.releaseConnection(response);
+ }
+ }
+ }
+
+ /**
+ * Alias for httpPatch().
+ *
+ * @see RESTClient#httpPatch()
+ */
+ public APIResponse patch(String body) throws RESTException {
+ return httpPatch(body);
+ }
+
+ /**
+ *
+ * @param body Data to PATCH
+ * @return API response
+ * @throws RESTException
+ */
+ public APIResponse httpPatch(String body) throws RESTException {
+ HttpResponse response = null;
+ try (CloseableHttpClient httpClient = createClient()) {
+ String query = "";
+ if (!buildQuery().equals("")) {
+ query = "?" + buildQuery();
+ }
+ HttpPatch httpPatch = new HttpPatch(this.getURL() + query);
+ addInternalHeaders(httpPatch);
+ if (body != null && !body.equals("")) {
+ httpEntity = new StringEntity(body);
+ httpPatch.setEntity(httpEntity);
+ }
+
+ response = httpClient.execute(httpPatch);
+
+ return buildResponse(response);
+ } catch (IOException e) {
+ throw new RESTException(e);
+ } finally {
+ if (response != null) {
+ this.releaseConnection(response);
+ }
+ }
+ }
+
+ /**
+ * Alias for httpDelete().
+ *
+ * @see RESTClient#httpDelete()
+ */
+ public APIResponse delete() throws RESTException {
+ return httpDelete();
+ }
+
+ /**
+ * Sends an http DELETE request using the parameters and headers previously
+ * set.
+ *
+ * @return api response
+ *
+ * @throws RESTException if request was unsuccessful
+ */
+ public APIResponse httpDelete() throws RESTException {
+ return httpDelete(null);
+ }
+
+ /**
+ * Sends an http DELETE request with a body, using the parameters and headers
+ * previously set.
+ *
+ * @return api response
+ *
+ * @throws RESTException if request was unsuccessful
+ */
+ public APIResponse httpDelete(String body) throws RESTException {
+ HttpResponse response = null;
+
+ try (CloseableHttpClient httpClient = createClient()){
+
+ String query = "";
+ if (!buildQuery().equals("")) {
+ query = "?" + buildQuery();
+ }
+ HttpDeleteWithBody httpDelete = new HttpDeleteWithBody(this.getURL() + query);
+ addInternalHeaders(httpDelete);
+
+ if (body != null && !body.equals("")) {
+ httpEntity = new StringEntity(body);
+ httpDelete.setEntity(httpEntity);
+ }
+
+ response = httpClient.execute(httpDelete);
+
+ APIResponse apiResponse = buildResponse(response);
+ return apiResponse;
+ } catch (IOException ioe) {
+ throw new RESTException(ioe);
+ } finally {
+ if (response != null) {
+ this.releaseConnection(response);
+ }
+ }
+ }
+
+ public String getURL() {
+ return URL;
+ }
+ public LinkedHashMap<String,List<String>> getHeaders() {
+ return headers;
+ }
+ public LinkedHashMap<String,List<String>> getParameters() {
+ return parameters;
+ }
+ public HttpEntity getHttpEntity() {
+ return httpEntity;
+ }
+
+ public HttpClient getUnitTestClient() {
+ return unitTestClient;
+ }
+
+ public void setUnitTestClient(HttpClient unitTestClient) {
+ this.unitTestClient = unitTestClient;
+ }
+
+ /**
+ * Allows inclusion of a request body with DELETE.
+ */
+ private class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
+ public static final String METHOD_NAME = "DELETE";
+
+ public String getMethod() {
+ return METHOD_NAME;
+ }
+
+ public HttpDeleteWithBody(final String uri) {
+ super();
+ setURI(URI.create(uri));
+ }
+
+ public HttpDeleteWithBody(final URI uri) {
+ super();
+ setURI(uri);
+ }
+
+ public HttpDeleteWithBody() {
+ super();
+ }
+ }
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTConfig.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTConfig.java
new file mode 100644
index 0000000..a668506
--- /dev/null
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTConfig.java
@@ -0,0 +1,131 @@
+/*-
+ * ============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;
+
+/**
+ * Configuration values to be used by the RESTClient.
+ *
+ * @version 1.0
+ *
+ */
+public class RESTConfig {
+ private final String URL;
+
+ private final boolean trustAllCerts;
+ private final String proxyHost;
+ private final int proxyPort;
+
+ /**
+ * Creates a RESTConfig with the specified URL.
+ * <p>
+ * By default, no proxy will be used, and only valid certificates will
+ * be used.
+ *
+ * @param URL url to set
+ */
+ public RESTConfig(final String URL) {
+ this(URL, null, -1, false);
+ }
+
+ /**
+ * Creates a RESTConfig with the specified URL and whether to trust all
+ * certificates.
+ * <p>
+ * Trusting all certificates is useful for testing self-signed
+ * certificates. By default, no proxy will be used.
+ *
+ * @param URL url to set
+ * @param trustAllCerts whether to trust all certificates
+ */
+ public RESTConfig(final String URL, final boolean trustAllCerts) {
+ this(URL, null, -1, trustAllCerts);
+ }
+
+ /**
+ * Creates a RESTConfig with the specified URL and proxy.
+ * <p>
+ * By default, only valid certificates will be allowed.
+ *
+ * @param URL url to set
+ * @param proxyHost proxy host to set
+ * @param proxyPort proxy port to set
+ */
+ public RESTConfig(final String URL, final String proxyHost,
+ final int proxyPort) {
+
+ this(URL, proxyHost, proxyPort, false);
+ }
+
+ /**
+ * Creates a RESTConfig object with the specified URL, proxy host, proxy
+ * port, and whether to trust all certificates. Allowing all certificates
+ * is useful for testing self-signed certificates.
+ *
+ * @param URL url to set
+ * @param proxyHost proxy host to set
+ * @param proxyPort porxy port to set
+ * @param trustAllCerts whether to trust all certificates
+ */
+ public RESTConfig(final String URL, final String proxyHost,
+ final int proxyPort, boolean trustAllCerts) {
+
+ this.URL = URL;
+ this.proxyHost = proxyHost;
+ this.proxyPort = proxyPort;
+ this.trustAllCerts = trustAllCerts;
+ }
+
+ /**
+ * Gets the URL to use.
+ *
+ * @return URL to use
+ */
+ public String getURL() {
+ return this.URL;
+ }
+
+ /**
+ * Gets whether to trust all certificates.
+ *
+ * @return true if to trust all certificates, false otherwise
+ */
+ public boolean trustAllCerts() {
+ return this.trustAllCerts;
+ }
+
+ /**
+ * Gets proxy host or null if proxy host has not been set.
+ *
+ * @return proxy host
+ */
+ public String getProxyHost() {
+ return this.proxyHost;
+ }
+
+ /**
+ * Gets proxy port or -1 if no proxy port has been set.
+ *
+ * @return proxy port
+ */
+ public int getProxyPort() {
+ return this.proxyPort;
+ }
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTException.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTException.java
new file mode 100644
index 0000000..1c28aa1
--- /dev/null
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTException.java
@@ -0,0 +1,85 @@
+/*-
+ * ============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;
+
+/**
+ * A custom exception class.
+ *
+ * @version 1.0
+ *
+ */
+public class RESTException extends Exception {
+ private static final long serialVersionUID = -6874042744590915838L;
+ // http status code
+ private final int statusCode;
+
+ // error message
+ private final String errorMessage;
+
+ /**
+ * {@inheritDoc}
+ * @see Exception#RESTException(String)
+ */
+ public RESTException(final String errorMessage) {
+ this(-1, errorMessage);
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see Exception#RESTException(Throwable)
+ */
+ public RESTException(final Throwable cause) {
+ super(cause);
+ this.statusCode = -1;
+ this.errorMessage = cause.getMessage();
+ }
+
+ /**
+ * Creates a RESTException with the specified status code and error
+ * message.
+ *
+ * @param statusCode http status code
+ * @param errorMessage http error message
+ */
+ public RESTException(final int statusCode, final String errorMessage) {
+ super(statusCode + ":" + errorMessage);
+ this.statusCode = statusCode;
+ this.errorMessage = errorMessage;
+ }
+
+ /**
+ * Gets the status code or -1 if none has been set.
+ *
+ * @return status code
+ */
+ public int getStatusCode() {
+ return this.statusCode;
+ }
+
+ /**
+ * Gets the error message.
+ *
+ * @return error message
+ */
+ public String getErrorMessage() {
+ return this.errorMessage;
+ }
+}
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
new file mode 100644
index 0000000..87a3f47
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
@@ -0,0 +1,217 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:46:25 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.util.Locale;
+import org.apache.http.HttpResponse;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.ReasonPhraseCatalog;
+import org.apache.http.StatusLine;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.EnglishReasonPhraseCatalog;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
+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 APIResponseESTest extends APIResponseESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test00() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "Uc");
+ basicHttpResponse0.addHeader("Uc", "org.apache.http.entity.ContentType");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ assertEquals(0, aPIResponse0.getStatusCode());
+ }
+
+ @Test(timeout = 4000)
+ public void test01() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ int int0 = aPIResponse0.getStatusCode();
+ assertEquals(1471, int0);
+ }
+
+ @Test(timeout = 4000)
+ public void test02() throws Throwable {
+ ProtocolVersion protocolVersion0 = mock(ProtocolVersion.class, new ViolatedAssumptionAnswer());
+ StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
+ doReturn(protocolVersion0).when(statusLine0).getProtocolVersion();
+ doReturn("Gi|Heay:?O.-PvSJFp").when(statusLine0).getReasonPhrase();
+ doReturn((-1730834464), (-1730834464)).when(statusLine0).getStatusCode();
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse(statusLine0);
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ int int0 = aPIResponse0.getStatusCode();
+ assertEquals((-1730834464), int0);
+ }
+
+ @Test(timeout = 4000)
+ public void test03() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+ byte[] byteArray0 = new byte[3];
+ ByteArrayEntity byteArrayEntity0 = new ByteArrayEntity(byteArray0);
+ basicHttpResponse0.setEntity(byteArrayEntity0);
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ byte[] byteArray1 = aPIResponse0.getResponseBodyAsByteArray();
+ assertFalse(byteArray1.equals((Object)byteArray0));
+ }
+
+ @Test(timeout = 4000)
+ public void test04() throws Throwable {
+ ProtocolVersion protocolVersion0 = new ProtocolVersion("", 548, 548);
+ BasicStatusLine basicStatusLine0 = new BasicStatusLine(protocolVersion0, 1196, " len: ");
+ EnglishReasonPhraseCatalog englishReasonPhraseCatalog0 = EnglishReasonPhraseCatalog.INSTANCE;
+ Locale locale0 = Locale.ITALY;
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((StatusLine) basicStatusLine0, (ReasonPhraseCatalog) englishReasonPhraseCatalog0, locale0);
+ StringEntity stringEntity0 = new StringEntity("");
+ basicHttpResponse0.setEntity(stringEntity0);
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ byte[] byteArray0 = aPIResponse0.getResponseBodyAsByteArray();
+ assertArrayEquals(new byte[] {}, byteArray0);
+ }
+
+ @Test(timeout = 4000)
+ public void test05() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "'");
+ basicHttpResponse0.addHeader("'", "'");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ String string0 = aPIResponse0.getFirstHeader("'");
+ assertEquals("'", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test06() throws Throwable {
+ APIResponse aPIResponse0 = null;
+ try {
+ aPIResponse0 = new APIResponse((HttpResponse) null);
+ 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 test07() throws Throwable {
+ ProtocolVersion protocolVersion0 = new ProtocolVersion("=", 1, 2);
+ BasicStatusLine basicStatusLine0 = new BasicStatusLine(protocolVersion0, 1, "=");
+ EnglishReasonPhraseCatalog englishReasonPhraseCatalog0 = EnglishReasonPhraseCatalog.INSTANCE;
+ Locale locale0 = Locale.UK;
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((StatusLine) basicStatusLine0, (ReasonPhraseCatalog) englishReasonPhraseCatalog0, locale0);
+ basicHttpResponse0.setStatusLine(protocolVersion0, 1);
+ APIResponse aPIResponse0 = null;
+ try {
+ aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ fail("Expecting exception: IllegalArgumentException");
+
+ } catch(IllegalArgumentException e) {
+ //
+ // Unknown category for status code 1
+ //
+ verifyException("org.apache.http.util.Args", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test08() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
+ basicHttpResponse0.addHeader("", "");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ String string0 = aPIResponse0.getFirstHeader(",n6_`^Oyzn6YprnX");
+ assertNull(string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test09() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
+ basicHttpResponse0.addHeader("", "");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ String string0 = aPIResponse0.getFirstHeader("");
+ assertEquals("", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test10() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
+ basicHttpResponse0.addHeader("", "");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ HttpHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
+ assertNotNull(httpHeaderArray0);
+ }
+
+ @Test(timeout = 4000)
+ public void test11() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ HttpHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
+ assertNotNull(httpHeaderArray0);
+ }
+
+ @Test(timeout = 4000)
+ public void test12() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "c");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ String string0 = aPIResponse0.getResponseBodyAsString();
+ assertEquals("", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test13() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+ byte[] byteArray0 = new byte[3];
+ ByteArrayEntity byteArrayEntity0 = new ByteArrayEntity(byteArray0);
+ basicHttpResponse0.setEntity(byteArrayEntity0);
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ String string0 = aPIResponse0.getResponseBodyAsString();
+ assertEquals("\u0000\u0000\u0000", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test14() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "c");
+ basicHttpResponse0.addHeader("c", "c");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ aPIResponse0.getResponseBodyAsString();
+ basicHttpResponse0.getStatusLine();
+ aPIResponse0.getStatusCode();
+ HttpHeader[] httpHeaderArray0 = new HttpHeader[2];
+ HttpHeader httpHeader0 = mock(HttpHeader.class, new ViolatedAssumptionAnswer());
+ doReturn((String) null).when(httpHeader0).getName();
+ httpHeaderArray0[0] = httpHeader0;
+ HttpHeader httpHeader1 = mock(HttpHeader.class, new ViolatedAssumptionAnswer());
+ httpHeaderArray0[1] = httpHeader1;
+ PrivateAccess.setVariable((Class<APIResponse>) APIResponse.class, aPIResponse0, "headers", (Object) httpHeaderArray0);
+ // Undeclared exception!
+ try {
+ aPIResponse0.getFirstHeader("");
+ fail("Expecting exception: NullPointerException");
+
+ } catch(NullPointerException e) {
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test15() throws Throwable {
+ BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+ APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+ byte[] byteArray0 = aPIResponse0.getResponseBodyAsByteArray();
+ assertNull(byteArray0);
+ }
+}
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
new file mode 100644
index 0000000..59f09a0
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java
@@ -0,0 +1,140 @@
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:46:25 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 APIResponseESTestscaffolding {
+
+ @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.APIResponse";
+ 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(APIResponseESTestscaffolding.class.getClassLoader() ,
+ "org.apache.http.HttpVersion",
+ "org.apache.http.message.BasicNameValuePair",
+ "org.apache.http.message.HeaderGroup",
+ "org.apache.http.message.HeaderValueParser",
+ "org.apache.http.message.BasicStatusLine",
+ "org.apache.http.message.BasicHeaderValueParser",
+ "org.apache.http.message.BasicLineFormatter",
+ "org.apache.http.entity.ByteArrayEntity",
+ "org.apache.http.Header",
+ "org.apache.http.StatusLine",
+ "org.apache.http.util.EntityUtils",
+ "org.apache.http.message.BasicHttpResponse",
+ "org.apache.http.FormattedHeader",
+ "org.apache.http.RequestLine",
+ "org.apache.http.HttpMessage",
+ "org.apache.http.message.AbstractHttpMessage",
+ "org.apache.http.Consts",
+ "org.apache.http.protocol.HTTP",
+ "org.apache.http.util.ByteArrayBuffer",
+ "org.apache.http.ParseException",
+ "org.apache.http.HeaderIterator",
+ "org.apache.http.entity.AbstractHttpEntity",
+ "org.openecomp.mso.rest.RESTException",
+ "org.apache.http.util.Args",
+ "org.apache.http.ReasonPhraseCatalog",
+ "org.apache.http.HttpEntity",
+ "org.apache.http.entity.ContentType",
+ "org.apache.http.message.LineFormatter",
+ "org.apache.http.entity.StringEntity",
+ "org.openecomp.mso.rest.HttpHeader",
+ "org.apache.http.HeaderElement",
+ "org.apache.http.message.BufferedHeader",
+ "org.openecomp.mso.rest.APIResponse",
+ "org.apache.http.util.CharArrayBuffer",
+ "org.apache.http.ProtocolVersion",
+ "org.apache.http.util.TextUtils",
+ "org.apache.http.impl.EnglishReasonPhraseCatalog",
+ "org.apache.http.params.HttpParams",
+ "org.apache.http.message.BasicHeader",
+ "org.apache.http.HttpResponse",
+ "org.apache.http.NameValuePair",
+ "org.apache.http.message.ParserCursor"
+ );
+ }
+
+ private static void resetClasses() {
+ org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(APIResponseESTestscaffolding.class.getClassLoader());
+
+ org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+ "org.apache.http.message.HeaderGroup",
+ "org.apache.http.ProtocolVersion",
+ "org.apache.http.message.BasicStatusLine",
+ "org.apache.http.message.BasicLineFormatter",
+ "org.apache.http.util.CharArrayBuffer",
+ "org.apache.http.HttpVersion",
+ "org.apache.http.impl.EnglishReasonPhraseCatalog",
+ "org.apache.http.message.BasicHeader",
+ "org.apache.http.message.BasicHeaderValueParser",
+ "org.apache.http.Consts",
+ "org.apache.http.protocol.HTTP",
+ "org.apache.http.message.BasicNameValuePair",
+ "org.apache.http.message.BufferedHeader",
+ "org.apache.http.ParseException",
+ "org.apache.http.entity.AbstractHttpEntity",
+ "org.apache.http.util.ByteArrayBuffer",
+ "org.apache.http.entity.ContentType"
+ );
+ }
+}
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
new file mode 100644
index 0000000..2104349
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
@@ -0,0 +1,79 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:47:07 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+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.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class HttpHeaderESTest extends HttpHeaderESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test0() throws Throwable {
+ HttpHeader httpHeader0 = new HttpHeader("Fw", "WD#>QF/v6_|_A");
+ String string0 = httpHeader0.getValue();
+ assertEquals("WD#>QF/v6_|_A", string0);
+ assertEquals("Fw", httpHeader0.getName());
+ }
+
+ @Test(timeout = 4000)
+ public void test1() throws Throwable {
+ HttpHeader httpHeader0 = new HttpHeader("", "");
+ String string0 = httpHeader0.getValue();
+ assertEquals("", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test2() throws Throwable {
+ HttpHeader httpHeader0 = new HttpHeader("Nae may no be null.", "Nae may no be null.");
+ PrivateAccess.setVariable((Class<HttpHeader>) HttpHeader.class, httpHeader0, "name", (Object) null);
+ String string0 = httpHeader0.getName();
+ assertNull(string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test3() throws Throwable {
+ HttpHeader httpHeader0 = new HttpHeader("", "EIqJp");
+ String string0 = httpHeader0.getName();
+ assertEquals("EIqJp", httpHeader0.getValue());
+ assertEquals("", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test4() throws Throwable {
+ HttpHeader httpHeader0 = null;
+ try {
+ httpHeader0 = new HttpHeader((String) null, (String) null);
+ fail("Expecting exception: IllegalArgumentException");
+
+ } catch(IllegalArgumentException e) {
+ //
+ // Name may not be null.
+ //
+ verifyException("org.openecomp.mso.rest.HttpHeader", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test5() throws Throwable {
+ HttpHeader httpHeader0 = new HttpHeader("Nae may no be null.", "Nae may no be null.");
+ String string0 = httpHeader0.getName();
+ assertEquals("Nae may no be null.", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test6() throws Throwable {
+ HttpHeader httpHeader0 = new HttpHeader("|SJ`pSz:BCB1o8~", (String) null);
+ String string0 = httpHeader0.getValue();
+ assertNull(string0);
+ }
+}
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
new file mode 100644
index 0000000..e59f7da
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:47:07 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 HttpHeaderESTestscaffolding {
+
+ @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.HttpHeader";
+ 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(HttpHeaderESTestscaffolding.class.getClassLoader() ,
+ "org.openecomp.mso.rest.HttpHeader"
+ );
+ }
+
+ private static void resetClasses() {
+ }
+}
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
new file mode 100644
index 0000000..1a9e05a
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java
@@ -0,0 +1,1068 @@
+/*
+ * 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
new file mode 100644
index 0000000..2761b25
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java
@@ -0,0 +1,366 @@
+/**
+ * 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
new file mode 100644
index 0000000..a1c83ba
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java
@@ -0,0 +1,77 @@
+/*-
+ * ============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
new file mode 100644
index 0000000..0a46ceb
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java
@@ -0,0 +1,110 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:47:42 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+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 RESTConfigESTest extends RESTConfigESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test00() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig((String) null, "", (-3449));
+ String string0 = rESTConfig0.getURL();
+ assertEquals(-3449, rESTConfig0.getProxyPort());
+ assertNull(string0);
+ assertFalse(rESTConfig0.trustAllCerts());
+ }
+
+ @Test(timeout = 4000)
+ public void test01() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig(";A,GC~!-_.>+R=>rIO", "", (-3449), false);
+ String string0 = rESTConfig0.getURL();
+ assertEquals("", rESTConfig0.getProxyHost());
+ assertEquals(-3449, rESTConfig0.getProxyPort());
+ assertFalse(rESTConfig0.trustAllCerts());
+ assertEquals(";A,GC~!-_.>+R=>rIO", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test02() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig("", "", 0);
+ int int0 = rESTConfig0.getProxyPort();
+ assertFalse(rESTConfig0.trustAllCerts());
+ assertEquals(0, int0);
+ }
+
+ @Test(timeout = 4000)
+ public void test03() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig((String) null);
+ int int0 = rESTConfig0.getProxyPort();
+ assertEquals((-1), int0);
+ assertFalse(rESTConfig0.trustAllCerts());
+ }
+
+ @Test(timeout = 4000)
+ public void test04() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig((String) null, "zZu8", (-1933), true);
+ String string0 = rESTConfig0.getProxyHost();
+ assertEquals(-1933, rESTConfig0.getProxyPort());
+ assertTrue(rESTConfig0.trustAllCerts());
+ assertNotNull(string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test05() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
+ boolean boolean0 = rESTConfig0.trustAllCerts();
+ assertTrue(boolean0);
+ assertEquals(2708, rESTConfig0.getProxyPort());
+ }
+
+ @Test(timeout = 4000)
+ public void test06() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
+ rESTConfig0.getURL();
+ assertTrue(rESTConfig0.trustAllCerts());
+ assertEquals(2708, rESTConfig0.getProxyPort());
+ }
+
+ @Test(timeout = 4000)
+ public void test07() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig("", true);
+ String string0 = rESTConfig0.getProxyHost();
+ assertTrue(rESTConfig0.trustAllCerts());
+ assertNull(string0);
+ assertEquals(-1, rESTConfig0.getProxyPort());
+ }
+
+ @Test(timeout = 4000)
+ public void test08() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
+ int int0 = rESTConfig0.getProxyPort();
+ assertEquals(2708, int0);
+ assertTrue(rESTConfig0.trustAllCerts());
+ }
+
+ @Test(timeout = 4000)
+ public void test09() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
+ rESTConfig0.getProxyHost();
+ assertEquals(2708, rESTConfig0.getProxyPort());
+ assertTrue(rESTConfig0.trustAllCerts());
+ }
+
+ @Test(timeout = 4000)
+ public void test10() throws Throwable {
+ RESTConfig rESTConfig0 = new RESTConfig("");
+ boolean boolean0 = rESTConfig0.trustAllCerts();
+ assertEquals(-1, rESTConfig0.getProxyPort());
+ assertFalse(boolean0);
+ }
+}
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
new file mode 100644
index 0000000..1eb33dd
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:47:42 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 RESTConfigESTestscaffolding {
+
+ @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.RESTConfig";
+ 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(RESTConfigESTestscaffolding.class.getClassLoader() ,
+ "org.openecomp.mso.rest.RESTConfig"
+ );
+ }
+
+ private static void resetClasses() {
+ }
+}
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
new file mode 100644
index 0000000..aff908e
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java
@@ -0,0 +1,78 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:47:59 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+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.evosuite.runtime.mock.java.lang.MockThrowable;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class RESTExceptionESTest extends RESTExceptionESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test0() throws Throwable {
+ RESTException rESTException0 = new RESTException(0, (String) null);
+ int int0 = rESTException0.getStatusCode();
+ assertEquals(0, int0);
+ }
+
+ @Test(timeout = 4000)
+ public void test1() throws Throwable {
+ RESTException rESTException0 = new RESTException(1619, "");
+ int int0 = rESTException0.getStatusCode();
+ assertEquals(1619, int0);
+ }
+
+ @Test(timeout = 4000)
+ public void test2() throws Throwable {
+ RESTException rESTException0 = new RESTException("");
+ String string0 = rESTException0.getErrorMessage();
+ assertEquals("", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test3() throws Throwable {
+ RESTException rESTException0 = null;
+ try {
+ rESTException0 = new RESTException((Throwable) null);
+ fail("Expecting exception: NullPointerException");
+
+ } catch(NullPointerException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("org.openecomp.mso.rest.RESTException", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test4() throws Throwable {
+ RESTException rESTException0 = new RESTException((-489), "org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable");
+ String string0 = rESTException0.getErrorMessage();
+ assertEquals("org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test5() throws Throwable {
+ MockThrowable mockThrowable0 = new MockThrowable();
+ RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
+ int int0 = rESTException0.getStatusCode();
+ assertEquals((-1), int0);
+ }
+
+ @Test(timeout = 4000)
+ public void test6() throws Throwable {
+ MockThrowable mockThrowable0 = new MockThrowable();
+ RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
+ String string0 = rESTException0.getErrorMessage();
+ assertNull(string0);
+ }
+}
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
new file mode 100644
index 0000000..13d4dcc
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:47:59 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 RESTExceptionESTestscaffolding {
+
+ @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.RESTException";
+ 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(RESTExceptionESTestscaffolding.class.getClassLoader() ,
+ "org.openecomp.mso.rest.RESTException"
+ );
+ }
+
+ private static void resetClasses() {
+ org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RESTExceptionESTestscaffolding.class.getClassLoader());
+
+ org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+ "org.openecomp.mso.rest.RESTException"
+ );
+ }
+}
diff --git a/bpmn/MSOURN-plugin/build.properties b/bpmn/MSOURN-plugin/build.properties
new file mode 100644
index 0000000..7e5fb9f
--- /dev/null
+++ b/bpmn/MSOURN-plugin/build.properties
@@ -0,0 +1,7 @@
+# Copy this file to 'build.properties' and modify it to match your system
+# Alternatively, you can also copy it to '${user.home}/.camunda/build.properties'
+# to have a central configuration that works with all camunda BPM projects
+
+# Defines the deployment folder in a camunda BPM installation (backslashes need to be escaped or replaced by forward slashes).
+#deploy.jboss.dir=C:/camunda/camunda-bpm-jboss-7.3.0/server/jboss-as-${jboss-version}/standalone/deployments
+deploy.jboss.dir=C:/D2/jboss-ee/server/jboss-as-7.2.0.Final/standalone/deployments \ No newline at end of file
diff --git a/bpmn/MSOURN-plugin/build.xml b/bpmn/MSOURN-plugin/build.xml
new file mode 100644
index 0000000..f2dbc55
--- /dev/null
+++ b/bpmn/MSOURN-plugin/build.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="urnMap-plugin" default="deploy.jboss">
+
+ <property file="build.properties" />
+ <property file="${user.home}/.camunda/build.properties" />
+ <property name="target.dir" value="target" />
+
+ <condition property="mvn.executable" value="mvn.bat" else="mvn">
+ <os family="windows"/>
+ </condition>
+
+ <target name="deploy.jboss" depends="package.mvn, install.cockpit.plugin" description="Copies the cockit plugin to the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'" />
+
+ <target name="deploy.tomcat" depends="package.mvn" description="Copies the cockpit plugin to the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
+ <fail unless="deploy.tomcat.dir" message="No deployment folder has been configured. Please copy the file '${basedir}/build.properties.example' to '${basedir}/build.properties' or '${user.home}/.camunda/build.properties' and change it according to your environment." />
+ <copy file="${target.dir}/${ant.project.name}.jar" todir="${deploy.tomcat.dir}/camunda/WEB-INF/lib" />
+ <touch file="${deploy.tomcat.dir}/camunda/WEB-INF/web.xml"/>
+ </target>
+
+ <target name="package.mvn">
+ <exec executable="${mvn.executable}" dir="." failonerror="true">
+ <env key="MAVEN_OPTS" value="-Xmx1024m -Xms512m -DskipTests=true -Dmaven.test.skip=true" />
+ <arg line="clean package" />
+ </exec>
+ </target>
+
+ <target name="install.cockpit.plugin">
+ <fail unless="deploy.jboss.dir" message="No deployment folder has been configured. Please copy the file '${basedir}/build.properties.example' to '${basedir}/build.properties' or '${user.home}/.camunda/build.properties' and change it according to your environment." />
+ <path id="cockpit.file.id">
+ <fileset dir="${deploy.jboss.dir}">
+ <include name="camunda-webapp-*.war"/>
+ </fileset>
+ </path>
+ <property name="cockpit.file" refid="cockpit.file.id"/>
+ <war destfile="${cockpit.file}" update="true">
+ <zipfileset file="${target.dir}/${ant.project.name}.jar" fullpath="WEB-INF/lib/${ant.project.name}.jar" />
+ </war>
+ </target>
+
+ <target name="undeploy.jboss" description="Deletes the cockpit plugin from the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
+ <path id="cockpit.file.id">
+ <fileset dir="${deploy.jboss.dir}">
+ <include name="camunda-webapp-*.war"/>
+ </fileset>
+ </path>
+ <property name="cockpit.file" refid="cockpit.file.id"/>
+ <basename property="cockpit.filename" file="${cockpit.file}"/>
+ <move file="${cockpit.file}" todir="${java.io.tmpdir}"/>
+ <zip destfile="${cockpit.file}">
+ <zipfileset src="${java.io.tmpdir}/${cockpit.filename}">
+ <exclude name="WEB-INF/lib/${ant.project.name}.jar"/>
+ </zipfileset>
+ </zip>
+ </target>
+
+ <target name="undeploy.tomcat" description="Deletes the cockpit plugin from the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
+ <delete file="${deploy.tomcat.dir}/camunda/WEB-INF/lib/${ant.project.name}.jar" />
+ </target>
+
+</project>
diff --git a/bpmn/MSOURN-plugin/pom.xml b/bpmn/MSOURN-plugin/pom.xml
new file mode 100644
index 0000000..48da51e
--- /dev/null
+++ b/bpmn/MSOURN-plugin/pom.xml
@@ -0,0 +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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
+ <version>0.0.4-SNAPSHOT</version>
+ </parent>
+
+ <groupId>com.att.camunda.bpm.cockpit.plugin</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> \ 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/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java
new file mode 100644
index 0000000..9a02aa0
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java
@@ -0,0 +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.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");
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
new file mode 100644
index 0000000..8a9d136
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
@@ -0,0 +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);
+ }
+
+}
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/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java
new file mode 100644
index 0000000..0bd7d73
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java
@@ -0,0 +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);
+ }
+
+
+}
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/com/att/camunda/bpm/plugin/urnmap/db/URNData.java
new file mode 100644
index 0000000..f8396bb
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java
@@ -0,0 +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_;
+ }
+
+}
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/com/att/camunda/bpm/plugin/urnmap/db/URNService.java
new file mode 100644
index 0000000..7fd41c1
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java
@@ -0,0 +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);
+ }
+ });
+ }
+
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java
new file mode 100644
index 0000000..44fe47b
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java
@@ -0,0 +1,98 @@
+/*-
+ * ============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");
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java
new file mode 100644
index 0000000..c30eb8d
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java
@@ -0,0 +1,43 @@
+/*-
+ * ============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);
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java
new file mode 100644
index 0000000..08724db
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java
@@ -0,0 +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();
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..1e207d8
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin
@@ -0,0 +1 @@
+com.att.camunda.bpm.plugin.urnmap.URNMapPlugin \ No newline at end of file
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/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml
new file mode 100644
index 0000000..ed61030
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml
@@ -0,0 +1,64 @@
+<?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 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">
+ <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>
+
+
+ <!-- INSERT cockpit.InsertURNData keyProperty="NAME_" -->
+ <resultMap id="insertNewRow" type="com.att.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_)
+ values (
+ #{URNName}, #{URNValue}, 1
+ )
+ </insert>
+
+<!-- UPDATE cockpit.InsertURNData -->
+ <resultMap id="saveURNMappingDataMap" type="com.att.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
+ NAME_ = #{URNName},
+ VALUE_ = #{URNValue},
+ REV_ = 1
+ where NAME_=#{URNName}
+</update>
+</mapper>
diff --git a/bpmn/MSOURN-plugin/src/main/resources/mappings.xml b/bpmn/MSOURN-plugin/src/main/resources/mappings.xml
new file mode 100644
index 0000000..d0a9177
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/resources/mappings.xml
@@ -0,0 +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>
diff --git a/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/dashboard.html b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/dashboard.html
new file mode 100644
index 0000000..cc794e5
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/dashboard.html
@@ -0,0 +1,63 @@
+<!--
+ ============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=========================================================
+ -->
+
+<div class="form-group container">
+ <form novalidate="novalidate" class="simple-form" name="urnMapper">
+ <div class="panel panel-default">
+ <div class="panel-heading" style="padding:3px;background:#871020 !important;color:#fff"> <h3 style="margin:1px" class="heading">Process Engine - URN Mapping</h3></div>
+ <div class="panel-body">
+ <div class="well">
+ <div class="input-group well" style="padding:5px">
+ <input id="new_key" class="form-control input-md" placeholder="New URN Key" size="25" type="text" name="URNName" value="" ng-blur="enableAddRowBtn()">
+ <span class="input-group-btn" style="width:0px;"></span>
+ <input type="text" class="form-control input-md" size="55" style="margin-left:-1px" id="new_value" placeholder="New URN Value" name="URNValue" />
+ <span class="input-group-btn" style="width:0px;"></span>
+ <span class="input-group-btn">
+ <button class="btn btn-primary" type="button" id="addRow_BTN" data-ng-click="addNewRow(); setTimeout( retrieveData(), 1000);" disabled data-original-title="" title="">Add!</button>
+ </span>
+ </div>
+ <div>
+ <table cellpadding="0" cellspacing="0" class="table responsive" widht="100%">
+ <tbody>
+ <tr data-ng-repeat="urnData in UrnDataMap">
+ <td>
+ <div class="input-group">
+ <input id="{{ urnData.urnname }}_key" type="text" style="border:0px solid #bfbfbf" size="25" class="form-control input-md" ng-blur="SaveRow( urnData )" value="{{ urnData.urnName }}" data-ng-model= "urnData.urnname" data-ng-change="enableButton(urnData)"/>
+ <span class="input-group-btn" style="width:0px;"></span>
+ <input id="{{ urnData.urnname }}_value" type="text" style="border:0px solid #dfdfdf;border-left:1px solid #bfbfbf" size="55" class="form-control input-md" ng-blur="SaveRow( urnData )" value="{{ urnData.urnvalue }}" data-ng-model="urnData.urnvalue" data-ng-change="enableButton(urnData)"/>
+ <span class="input-group-btn">
+ <button disabled="true" class="btn btn-primary" type="button" id="btn_{{ urnData.urnname }}_key" data-ng-click="SaveRow( urnData ); setTimeout( retrieveData(), 1000);">
+ <span class="glyphicon glyphicon-floppy-disk"></span>
+ </button>
+ </span>
+ </div><!-- /input-group -->
+ </td>
+ <!--
+ <td><button id="btn_{{ urnData.urnname }}_key" data-ng-click="SaveRow( urnData )" disabled>SaveRecord</button> </td>
+ -->
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+</div>
diff --git a/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/plugin.js b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/plugin.js
new file mode 100644
index 0000000..9f33986
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/plugin.js
@@ -0,0 +1,132 @@
+/*-
+ * ============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=========================================================
+ */
+
+define(['angular'], function(angular) {
+
+ var DashboardController = ["$scope", "$http", "Uri", function($scope, $http, Uri) {
+
+ $http.get(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"))
+ .success(function(data) {
+ $scope.UrnDataMap = data;
+ });
+
+ //enable saveRow button
+ $scope.enableButton=function(urnData)
+ {
+ document.getElementById("btn_" + urnData.urnname + "_key").disabled = false;
+ };
+
+ $scope.enableAddRowBtn=function()
+ {
+ if(document.getElementById("new_key").value.trim().length >0)
+ document.getElementById("addRow_BTN").disabled = false;
+ else
+ document.getElementById("addRow_BTN").disabled = true;
+ };
+
+
+ $scope.addNewRow = function()
+ {
+ var newKey = document.getElementById("new_key").value.trim();
+ var newValue = document.getElementById("new_value").value.trim();
+ var x;
+
+ for (var i=0;i<$scope.UrnDataMap.length;i++)
+ {
+ var n = $scope.UrnDataMap[i].urnname.localeCompare(newKey);
+ if(n == 0){
+ x = "match";
+ }
+ }
+
+ if(Boolean(x))
+ {
+ alert("URN Name already exists, please check the KEY!");
+ }
+ else
+ {
+ if(newKey.length >0 )
+ {
+
+ var temp = newKey + "|" + newValue;
+
+ $http.put(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"), temp);
+
+ document.getElementById("new_key").value = "";
+ document.getElementById("new_value").value = "";
+
+ }
+
+ }
+ //this.enableAddRowBtn;
+ document.getElementById("addRow_BTN").disabled = true;
+
+ $http.get(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"))
+ .success(function(data) {
+ $scope.UrnDataMap = data;
+ });
+
+
+ }
+
+ $scope.retrieveData = function() {
+
+ $http.get(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"))
+ .success(function(data) {
+ $scope.UrnDataMap = data;
+ });
+ }
+
+ $scope.SaveRow = function(user)
+ {
+ $http.post(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"), user);
+
+ document.getElementById("btn_" + user.urnname + "_key").disabled = true;
+ document.getElementById(user.urnname + "_status").style.display = "";
+ this.enableAddRowBtn;
+
+ $http.get(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"))
+ .success(function(data) {
+ $scope.UrnDataMap = data;
+ });
+
+ };
+ }];
+
+ var Configuration = ['ViewsProvider', function(ViewsProvider) {
+
+ ViewsProvider.registerDefaultView('cockpit.dashboard', {
+ id: 'process-definitions',
+ label: 'Deployed Processes',
+ url: 'plugin://urnMap-plugin/static/app/dashboard.html',
+ controller: DashboardController,
+ // make sure we have a higher priority than the default plugin
+ priority: 12
+ });
+ }];
+//START
+//END
+
+ var ngModule = angular.module('cockpit.plugin.urnMap-plugin', []);
+
+ ngModule.config(Configuration);
+
+ return ngModule;
+});
diff --git a/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/info.txt b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/info.txt
new file mode 100644
index 0000000..09b6262
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/info.txt
@@ -0,0 +1 @@
+# Client side assets of the urnMap-plugin \ No newline at end of file
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java
new file mode 100644
index 0000000..0377b44
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java
@@ -0,0 +1,40 @@
+/*
+ * 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());
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java
new file mode 100644
index 0000000..472a2bc
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java
@@ -0,0 +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"
+ );
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java
new file mode 100644
index 0000000..c7b241c
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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);
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java
new file mode 100644
index 0000000..7ae4fab
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java
@@ -0,0 +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() {
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java
new file mode 100644
index 0000000..9c71cde
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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);
+ }
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java
new file mode 100644
index 0000000..d6ce3f3
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java
@@ -0,0 +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"
+ );
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java
new file mode 100644
index 0000000..56d7283
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java
@@ -0,0 +1,85 @@
+/*
+ * 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);
+ }
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java
new file mode 100644
index 0000000..bb115f1
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java
@@ -0,0 +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"
+ );
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java
new file mode 100644
index 0000000..ba562f9
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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);
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java
new file mode 100644
index 0000000..2707052
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java
@@ -0,0 +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"
+ );
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java
new file mode 100644
index 0000000..2c0a5ea
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java
@@ -0,0 +1,162 @@
+/*
+ * 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());
+ }
+}
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/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java
new file mode 100644
index 0000000..885426f
--- /dev/null
+++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java
@@ -0,0 +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"
+ );
+ }
+}
diff --git a/bpmn/pom.xml b/bpmn/pom.xml
new file mode 100644
index 0000000..ebcce1d
--- /dev/null
+++ b/bpmn/pom.xml
@@ -0,0 +1,159 @@
+<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</groupId>
+ <artifactId>mso</artifactId>
+ <version>0.0.4-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
+ <name>BPMN Subsystem</name>
+ <description>BPMN Subsystem for MSO</description>
+ <packaging>pom</packaging>
+
+ <properties>
+ <camunda.version>7.3.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>MSORESTClient</module>
+ <module>MSOGammaBPMN</module>
+ <module>MSOURN-plugin</module>
+ <module>MSOCockpit</module>
+
+ </modules>
+
+ <!-- Define artifact versions for child modules -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-bom</artifactId>
+ <version>${camunda.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.camunda.bpm.extension</groupId>
+ <artifactId>camunda-bpm-assert</artifactId>
+ <version>${camunda.bpm.assert.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>${h2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>${groovy.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>Saxon-HE</artifactId>
+ <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>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>1.1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>3.2.4.RELEASE</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <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>
+ <argLine>-Xss1m @{argLine}</argLine>
+ </configuration>
+<!-- <configuration>
+ <testFailureIgnore>true</testFailureIgnore>
+ <forkCount>1</forkCount>
+ <forkMode>once</forkMode>
+ </configuration> -->
+ </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.jacoco</groupId>
+ <artifactId>
+ jacoco-maven-plugin
+ </artifactId>
+ <versionRange>
+ [0.7.1.201405082137,)
+ </versionRange>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>