aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy749
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy453
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateServiceInstance.groovy262
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy451
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy304
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy502
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy353
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteGenericMacroServiceNetworkVnf.groovy476
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy417
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy383
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy560
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy217
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy1741
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy387
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy506
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy231
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy1678
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy487
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy654
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy414
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy241
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy1061
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy335
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy420
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy599
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy136
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy789
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/HealchCheckActivate.groovy54
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy1613
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy329
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy427
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy440
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy549
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java58
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java50
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java57
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml37
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml81
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml159
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn1203
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn372
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn336
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn473
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn481
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn284
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn331
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn771
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn370
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn330
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn568
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn353
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn1016
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleInfra.bpmn275
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn517
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn1385
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn517
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn390
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn338
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn1006
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn674
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn675
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn475
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn352
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn933
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn546
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn332
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn422
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnf.bpmn308
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateVfModule.bpmn668
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties29
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml31
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml26
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml74
74 files changed, 35541 insertions, 0 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy
new file mode 100644
index 0000000..b48e07f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy
@@ -0,0 +1,749 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>CreateGenericMacroServiceNetworkVnf.bpmn</class> process.
+ *
+ */
+public class CreateGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="CREVAS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("createGenericMacroServiceNetworkVnfRequest", "")
+ execution.setVariable("globalSubscriberId", "")
+ execution.setVariable("serviceInstanceName", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable("CREVAS_NetworksCreatedCount", 0)
+ execution.setVariable("CREVAS_VnfsCreatedCount", 0)
+ execution.setVariable("productFamilyId", "")
+
+
+ //TODO
+ execution.setVariable("sdncVersion", "1702")
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest CreateGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // check for incoming json message/input
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(createGenericMacroServiceNetworkVnfRequest)
+ execution.setVariable("createGenericMacroServiceNetworkVnfRequest", createGenericMacroServiceNetworkVnfRequest);
+ println 'createGenericMacroServiceNetworkVnfRequest - ' + createGenericMacroServiceNetworkVnfRequest
+
+ // extract requestId
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ utils.log("DEBUG", " Generated new Service Instance: " + serviceInstanceId , isDebugEnabled)
+ } else {
+ utils.log("DEBUG", "Using provided Service Instance ID: " + serviceInstanceId , isDebugEnabled)
+ }
+
+ serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ String requestAction = execution.getVariable("requestAction")
+ execution.setVariable("requestAction", requestAction)
+
+ String source = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ execution.setVariable("source", "VID")
+ } else {
+ execution.setVariable("source", source)
+ }
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+
+ // verify element global-customer-id is sent from JSON input, throw exception if missing
+ if ((globalSubscriberId == null) || (globalSubscriberId.isEmpty())) {
+ String dataErrorMessage = " Element 'globalSubscriberId' is missing. "
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ execution.setVariable("globalCustomerId", globalSubscriberId)
+ }
+
+ // extract subscriptionServiceType
+ String subscriptionServiceType = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
+
+ String suppressRollback = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("disableRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String productFamilyId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("CREVAS_requestInfo", requestInfo)
+
+ utils.log("DEBUG", " ***** Completed preProcessRequest CreateGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareCreateServiceInstance(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareCreateServiceInstance of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+ String serviceModelInfo = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo")
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+
+ String serviceInputParams = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters")
+ execution.setVariable("serviceInputParams", serviceInputParams)
+
+ String serviceInstanceName = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.instanceName")
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+
+ utils.log("DEBUG", " ***** Completed prepareCreateServiceInstance of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareCreateService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ public void postProcessServiceInstanceCreate (Execution execution){
+ def method = getClass().getSimpleName() + '.postProcessServiceInstanceCreate(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+
+ try {
+
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <serviceInstanceName>${serviceInstanceName}</serviceInstanceName>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+ execution.setVariable("CREVAS_setUpdateDbInstancePayload", payload)
+ utils.logAudit("CREVAS_setUpdateDbInstancePayload: " + payload)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ //println("CMSO_updateDBStatusToSuccessPayload --> " + execution.getVariable("CMSO_updateDBStatusToSuccessPayload"))
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+ }
+
+
+ public void callDBCatalog (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside callDBCatalog() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+
+ // get variable within incoming json
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest");
+
+ String catalog_db_endpoint = execution.getVariable("URN_mso_catalog_db_endpoint")
+ utils.log("DEBUG", "catalog_db_endpoint: "+catalog_db_endpoint, isDebugEnabled)
+
+ String serviceModelInvariantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo.modelInvariantId")
+ String serviceModelVersion = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo.modelVersion")
+ utils.log("DEBUG", "getting network list ", isDebugEnabled)
+
+ JSONArray networkList = catalogDbUtils.getAllNetworksByServiceModelInvariantUuidAndServiceModelVersion(catalog_db_endpoint, serviceModelInvariantId, serviceModelVersion)
+
+ //utils.log("DEBUG", "got network list: "+ networkList.toString(), isDebugEnabled)
+ execution.setVariable("networkList", networkList)
+ execution.setVariable("networkListString", networkList.toString())
+
+ if (networkList != null && networkList.length() > 0) {
+
+ execution.setVariable("CREVAS_NetworksCount", networkList.length())
+ utils.log("DEBUG", "networks to create: "+ networkList.length(), isDebugEnabled)
+ } else {
+ execution.setVariable("CREVAS_NetworksCount", 0)
+ utils.log("DEBUG", "no networks to create based upon Catalog DB response", isDebugEnabled)
+ }
+
+ // VNFs
+ JSONArray vnfList = catalogDbUtils.getAllVnfsByServiceModelInvariantUuidAndServiceModelVersion(catalog_db_endpoint, serviceModelInvariantId, serviceModelVersion)
+ execution.setVariable("vnfList", vnfList)
+
+ String vnfModelInfoString = ""
+ if (vnfList != null && vnfList.length() > 0) {
+ execution.setVariable("CREVAS_VNFsCount", vnfList.length())
+ utils.log("DEBUG", "vnfs to create: "+ vnfList.length(), isDebugEnabled)
+ JSONObject vnfModelInfo = vnfList.getJSONObject(0).getJSONObject("modelInfo")
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ execution.setVariable("CREVAS_VNFsCount", 0)
+ utils.log("DEBUG", "no vnfs to create based upon Catalog DB response", isDebugEnabled)
+ }
+
+ execution.setVariable("vnfModelInfo", vnfModelInfoString)
+ //utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed callDBCatalog() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. callDBCatalog() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareNetworkCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside preparenNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+// String disableRollback = execution.getVariable("disableRollback")
+// def backoutOnFailure = ""
+// if(disableRollback != null){
+// if ( disableRollback == true) {
+// backoutOnFailure = "false"
+// } else if ( disableRollback == false) {
+// backoutOnFailure = "true"
+// }
+// }
+ //failIfExists - optional
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+
+ JSONArray networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "array networkList: "+ networkList, isDebugEnabled)
+
+ if (networkList == null || networkList.length() < 1){
+ networkList = new JSONArray(execution.getVariable("networkListString"))
+ utils.log("DEBUG", "array from string networkList: "+ networkList, isDebugEnabled)
+ }
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ String networkModelInfoString = ""
+
+ if (networkList != null) {
+ utils.log("DEBUG", " getting model info for network # :" + networksCreatedCount, isDebugEnabled)
+ JSONObject networkModelInfo = networkList.getJSONObject(networksCreatedCount.intValue()).getJSONObject("modelInfo")
+ networkModelInfoString = networkModelInfo.toString()
+ } else {
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected number of networks to create - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ execution.setVariable("networkModelInfo", networkModelInfoString)
+ utils.log("DEBUG", " networkModelInfoString :" + networkModelInfoString, isDebugEnabled)
+
+// String networkModelInfo = execution.getVariable("networkModelInfo")
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+ utils.log("DEBUG", "vnfList: "+ vnfList, isDebugEnabled)
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ utils.log("DEBUG", "vnfModelInfo: "+ vnfModelInfo, isDebugEnabled)
+
+ networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "networkList: "+ networkList, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed preparenNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareNetworkCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section -> increment count
+ // *******************************
+ public void validateNetworkCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ networksCreatedCount++
+
+ execution.setVariable("CREVAS_NetworksCreatedCount", networksCreatedCount)
+
+ execution.setVariable("DCRENI_rollbackData"+networksCreatedCount, execution.getVariable("DCRENI_rollbackData"))
+
+ utils.log("DEBUG", "networksCreatedCount: "+ networksCreatedCount, isDebugEnabled)
+ utils.log("DEBUG", "DCRENI_rollbackData N : "+ execution.getVariable("DCRENI_rollbackData"+networksCreatedCount), isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+ utils.log("DEBUG", "vnfList: "+ vnfList, isDebugEnabled)
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ utils.log("DEBUG", "vnfModelInfo: "+ vnfModelInfo, isDebugEnabled)
+
+ JSONArray networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "networkList: "+ networkList, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed validateNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** "+" network # "+networksCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateNetworkCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareVnfAndModulesCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareVnfAndModulesCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ // String disableRollback = execution.getVariable("disableRollback")
+ // def backoutOnFailure = ""
+ // if(disableRollback != null){
+ // if ( disableRollback == true) {
+ // backoutOnFailure = "false"
+ // } else if ( disableRollback == false) {
+ // backoutOnFailure = "true"
+ // }
+ // }
+ //failIfExists - optional
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+ String productFamilyId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG","productFamilyId: "+ productFamilyId, isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+
+ Integer vnfsCreatedCount = execution.getVariable("CREVAS_VnfsCreatedCount")
+ String vnfModelInfoString = null;
+
+ if (vnfList != null && vnfList.length() > 0 ) {
+ utils.log("DEBUG", "getting model info for vnf # " + vnfsCreatedCount, isDebugEnabled)
+ JSONObject vnfModelInfo1 = vnfList.getJSONObject(0).getJSONObject("modelInfo")
+ utils.log("DEBUG", "got 0 ", isDebugEnabled)
+ JSONObject vnfModelInfo = vnfList.getJSONObject(vnfsCreatedCount.intValue()).getJSONObject("modelInfo")
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ //TODO: vnfList does not contain data. Need to investigate why ... . Fro VIPR use model stored
+ vnfModelInfoString = execution.getVariable("vnfModelInfo")
+ }
+
+ utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
+
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareVnfAndModulesCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareVnfAndModulesCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateVnfCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer vnfsCreatedCount = execution.getVariable("CREVAS_VnfsCreatedCount")
+ vnfsCreatedCount++
+
+ execution.setVariable("CREVAS_VnfsCreatedCount", vnfsCreatedCount)
+
+ utils.log("DEBUG", " ***** Completed validateVnfCreate of CreateGenericMacroServiceNetworkVnf ***** "+" vnf # "+vnfsCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateVnfCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section -> decrement count
+ // *******************************
+ public void validateNetworkRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ networksCreatedCount--
+
+ execution.setVariable("CREVAS_NetworksCreatedCount", networksCreatedCount)
+
+ execution.setVariable("DCRENI_rollbackData", execution.getVariable("DCRENI_rollbackData"+networksCreatedCount))
+
+ utils.log("DEBUG", " ***** Completed validateNetworkRollback of CreateGenericMacroServiceNetworkVnf ***** "+" network # "+networksCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateNetworkRollback() - " + ex.getMessage()
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ execution.setVariable("CREVAS_NetworksCreatedCount", 0)
+ utils.log("ERROR", exceptionMessage, true)
+ }
+ }
+ // *******************************
+ // Build DB request Section
+ // *******************************
+// public void prepareDBRequest (Execution execution) {
+// def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+//
+// try {
+// utils.log("DEBUG", " ***** Inside prepareDBRequest of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+//
+// String requestId = execution.getVariable("CREVAS_requestId")
+// String statusMessage = "vIPR ATM Service Instance successfully created."
+// String serviceInstanceId = execution.getVariable("CREVAS_serviceInstanceId")
+//
+// //TODO - verify the format for Service Instance Create,
+// String dbRequest =
+// """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+// <soapenv:Header/>
+// <soapenv:Body>
+// <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+// <requestId>${requestId}</requestId>
+// <lastModifiedBy>BPMN</lastModifiedBy>
+// <statusMessage>${statusMessage}</statusMessage>
+// <responseBody></responseBody>
+// <requestStatus>COMPLETED</requestStatus>
+// <progress>100</progress>
+// <vnfOutputs/>
+// <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+// </ns:updateInfraRequest>
+// </soapenv:Body>
+// </soapenv:Envelope>"""
+//
+// String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+// execution.setVariable("CREVAS_createDBRequest", buildDeleteDBRequestAsString)
+// utils.logAudit(buildDeleteDBRequestAsString)
+//
+// utils.log("DEBUG", " ***** Completed prepareDBRequest of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+// } catch (Exception ex) {
+// // try error in method block
+// String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+//
+// }
+//
+// }
+
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <status-message>Service Instance has been created successfully via macro orchestration</status-message>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <mso-bpel-name>BPMN macro create</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable("CREVAS_Success", true)
+ execution.setVariable("CREVAS_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void preProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** preProcessRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ utils.log("DEBUG", "BPMN Error during preProcessRollback", isDebugEnabled)
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit preProcessRollback of CreateGenericMacroServiceNetworkVnf *** ", isDebugEnabled)
+ }
+
+ public void postProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Setting prevException to WorkflowException: ", isDebugEnabled)
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ } catch (BpmnError b) {
+ utils.log("DEBUG", "BPMN Error during postProcessRollback", isDebugEnabled)
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit postProcessRollback of CreateGenericMacroServiceNetworkVnf *** ", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " *** STARTED CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestInfo = execution.getVariable("CREVAS_requestInfo")
+ utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+ //TODO. hmmm. there is no way to UPDATE error message.
+// String errorMessage = wfex.getErrorMessage()
+// boolean successIndicator = execution.getVariable("DCRESI_rollbackSuccessful")
+// if (successIndicator){
+// errorMessage = errorMessage + ". Rollback successful."
+// } else {
+// errorMessage = errorMessage + ". Rollback not completed."
+// }
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable("CREVAS_falloutRequest", falloutRequest)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncError() of CreateServiceInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("CRESI_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ }catch(BpmnError b){
+ utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("CRESI_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
new file mode 100644
index 0000000..b9b97c7
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
@@ -0,0 +1,453 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>CreateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class CreateNetworkInstance extends AbstractServiceTaskProcessor {
+ String Prefix="CRENI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public InitializeProcessVariables(Execution execution){
+
+ execution.setVariable(Prefix + "source", "")
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ execution.setVariable(Prefix + "FalloutHandlerRequest", "")
+ execution.setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of CreateNetworkInstance Request ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null || sdncVersion == '1610') {
+ // 'a-la-cart' default, sdncVersion = '1610'
+ execution.setVariable("sdncVersion", "1610")
+ String bpmnRequest = execution.getVariable("bpmnRequest")
+ // set 'disableRollback'
+ if (bpmnRequest != null) {
+ String disableRollback = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.requestInfo.suppressRollback")
+ if (disableRollback != null) {
+ execution.setVariable("disableRollback", disableRollback)
+ utils.log("DEBUG", "Received 'suppressRollback': " + disableRollback , isDebugEnabled)
+ } else {
+ execution.setVariable("disableRollback", false)
+ }
+ utils.log("DEBUG", " Set 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ } else {
+ String dataErrorMessage = " Invalid 'bpmnRequest' request."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ // 'macro' TEST ONLY, sdncVersion = '1702'
+ utils.log("DEBUG", " 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ }
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ // get/set 'requestId'
+ if (execution.getVariable("requestId") == null) {
+ execution.setVariable("requestId", requestId)
+ }
+
+ //Place holder for additional code.
+
+ // TODO ???
+ // userParams??? 1) pre-loads indicator, 2) 'auto-activation'
+ // Tag/Value parameters
+ //
+ // Map: 'networkInputParams': 'auto-activation''
+ // Sample format?
+ // "requestParameters": {
+ // "userParams": [
+ // {
+ // "name": "someUserParam1",
+ // "value": "someValue1"
+ // }
+ // ]
+ // }
+ //
+ // String userParams = //use json util to extract "userParams"//
+ // execution.setVariable("networkInputParams", userParams)
+ // else: execution.setVariable("networkInputParams", null)
+ //
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ sendSyncError(execution)
+ // caught exception
+ String exceptionMessage = "Exception Encountered in CreateNetworkInstance, PreProcessRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String createNetworkRestRequest = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + createNetworkRestRequest, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, createNetworkRestRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateNetworkInstance flow. sendSyncResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ public void getNetworkModelInfo (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside getNetworkModelInfo() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // "networkModelInfo" is expected to be sent
+ String networkModelInfo = execution.getVariable("networkModelInfo")
+ utils.log("DEBUG", " networkModelInfo - " + networkModelInfo, isDebugEnabled)
+
+ // "serviceModelInfo" is expected to be sent
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+ utils.log("DEBUG", " serviceModelInfo - " + serviceModelInfo, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in CreateNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncError() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+
+ // REST Error (for API Handler (APIH) Reply Task)
+ String syncError = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 500, syncError)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Bpmn error encountered in CreateNetworkInstance flow. sendSyncError() - " + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareDBRequestError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDBRequestError() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ String statusMessage = ""
+ WorkflowException wfe = null
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ wfe = execution.getVariable("WorkflowException")
+ statusMessage = wfe.getErrorMessage()
+ }
+
+ String requestId = execution.getVariable(Prefix + "requestId")
+ String networkName = execution.getVariable("networkName") !=null ? execution.getVariable("networkName") : ""
+ String networkId = execution.getVariable("networkId") !=null ? execution.getVariable("networkId") : ""
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ execution.setVariable(Prefix + "createDBRequest", dbRequest)
+ utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+ utils.logAudit(dbRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareDBRequestError() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCompletion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareCompletion() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ // normal path
+ execution.setVariable(Prefix + "Success", true)
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareCompletion() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ if (execution.getVariable("CMSO_ResponseCode") == "200") {
+ execution.setVariable(Prefix + "Success", true)
+ utils.log("DEBUG", " ***** CreateNetworkInstance Success ***** ", isDebugEnabled)
+ // Place holder for additional code.
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ utils.log("DEBUG", " ***** CreateNetworkInstance Failed in CompletionMsoProces flow!. ***** ", isDebugEnabled)
+
+ }
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processRollbackData (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside processRollbackData() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ //execution.getVariable("orchestrationStatus")
+ //execution.getVariable("networkId")
+ //execution.getVariable("networkName")
+ //networkOutputParams
+ //rollbackData
+ //rolledBack
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Bpmn error encountered in CreateNetworkInstance flow. callDBCatalog() - " + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ // Prepare for FalloutHandler
+ public void buildErrorResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+ String falloutHandlerRequest = ""
+ String requestId = execution.getVariable("mso-request-id")
+
+ try {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ String errorCode = String.valueOf(wfe.getErrorCode())
+ String errorMessage = wfe.getErrorMessage()
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.logAudit(falloutHandlerRequest)
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String errorException = " Bpmn error encountered in CreateNetworkInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ utils.log("DEBUG", errorException, isDebugEnabled)
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ }
+
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Exception in processJavaException method - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateServiceInstance.groovy
new file mode 100644
index 0000000..202829d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateServiceInstance.groovy
@@ -0,0 +1,262 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>CreateServiceInstance.bpmn</class> process.
+ * AlaCarte flow for 1702 ServiceInstance Create
+ *
+ */
+public class CreateServiceInstance extends AbstractServiceTaskProcessor {
+ String Prefix="CRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+ utils.log("DEBUG", " *** preProcessRequest() *** ", isDebugEnabled)
+
+ try {
+
+ String siRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(siRequest)
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ utils.log("DEBUG", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ }
+ utils.log("DEBUG", "Generated new Service Instance:" + serviceInstanceId, isDebugEnabled)
+ serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ //subscriberInfo
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //requestInfo
+ execution.setVariable("source", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.source"))
+ execution.setVariable("serviceInstanceName", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.instanceName"))
+ execution.setVariable("disableRollback", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.suppressRollback"))
+ String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
+ if (isBlank(productFamilyId))
+ {
+ msg = "Input productFamilyId is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("productFamilyId", productFamilyId)
+ }
+
+ //modelInfo
+ String serviceModelInfo = jsonUtil.getJsonValue(siRequest, "requestDetails.modelInfo")
+ if (isBlank(serviceModelInfo)) {
+ msg = "Input serviceModelInfo is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else
+ {
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ }
+
+ utils.log("DEBUG", "modelInfo" + serviceModelInfo, isDebugEnabled)
+
+ //requestParameters
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ }
+
+ //TODO
+ //execution.setVariable("serviceInputParams", jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams"))
+ //execution.setVariable("failExists", true)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ // RESTResponse for API Handler (APIH) Reply Task
+ String createServiceRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+ utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + createServiceRestRequest, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, createServiceRestRequest)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncError *** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareCompletionRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareCompletion *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String source = execution.getVariable("source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <status-message>Service Instance was created successfully.</status-message>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <mso-bpel-name>CreateServiceInstance</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareFalloutRequest *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
+ String errorException = " Bpmn error encountered in CreateServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ utils.log("DEBUG", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
new file mode 100644
index 0000000..7f5bd61
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
@@ -0,0 +1,451 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.json.JsonSlurper
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils;
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
+
+ /**
+ * 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)
+ utils.logAudit("CreateVfModule Infra incoming Request: " + incomingRequest)
+
+ // 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)
+
+ utils.logAudit("CreateVfModule Infra Response: " + synchResponse)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ *
+ * @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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:ns8="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ ${requestInfo}
+ </request-info>
+ <ns8:status-message>Vf Module has been created successfully.</ns8:status-message>
+ <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.logAudit("CreateVfModuleInfra completion request: " + 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("mso-request-id")
+
+ if (requestId == null) {
+ createWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
+ }
+
+ setVariable(execution, prefix + 'requestId', requestId)
+
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ createWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
+ }
+
+ utils.logContext(requestId, serviceInstanceId)
+ */
+ utils.logAudit("CreateVfModule incoming request: " + request)
+ logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ return request
+ } 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")
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ 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)
+
+ try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>VF Module successfully created</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;vnf-outputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:aetgt="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"&gt;&lt;vnf-id&gt;${vnfId}&lt;/vnf-id&gt;&lt;vf-module-id&gt;${vfModuleId}&lt;/vf-module-id&gt;&lt;/vnf-outputs&gt;</vnfOutputs>
+ <vfModuleId>${vfModuleId}</vfModuleId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_updateInfraRequest", payload)
+ utils.log("DEBUG", "Outgoing UpdateInfraRequest: \n" + payload, isDebugEnabled)
+ utils.logAudit("CreateVfModuleInfra Outgoing UpdateInfra Request: " + payload)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing prepareUpdateInfraRequest. Exception is:\n" + e, isDebugEnabled)
+ 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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInformation}
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${encErrorResponseMsg}</aetgt:ErrorMessage>
+ <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)
+ utils.logAudit("CreateVfModuleInfra FallOutHander Request: " + content)
+ 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/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000..385e9e9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
@@ -0,0 +1,304 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+
+import groovy.json.JsonSlurper
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.lang3.*
+
+class CreateVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+
+ public static final String prefix='CVMVINFRAV1_'
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void preProcessRequest (Execution execution, isDebugEnabled) {
+
+ execution.setVariable("prefix",prefix)
+ setSuccessIndicator(execution, false)
+ execution.setVariable(prefix+'syncResponseSent', false)
+
+ String createVolumeIncoming = validateRequest(execution, 'vnfId')
+ utils.logAudit(createVolumeIncoming)
+
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def vnfId = execution.getVariable('vnfId')
+
+ def vidUtils = new VidUtils(this)
+ createVolumeIncoming = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', serviceInstanceId)
+
+ execution.setVariable(prefix+'Request', createVolumeIncoming)
+ execution.setVariable(prefix+'vnfId', vnfId)
+ execution.setVariable(prefix+'isVidRequest', true)
+
+ utils.log("DEBUG", "XML request:\n" + createVolumeIncoming, isDebugEnabled)
+
+ }
+ catch(groovy.json.JsonException je) {
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'Request is not a valid JSON document')
+ }
+
+ execution.setVariable(prefix+'source', utils.getNodeText1(createVolumeIncoming, "source"))
+ execution.setVariable(prefix+'volumeGroupName', utils.getNodeText1(createVolumeIncoming, 'volume-group-name'))
+ execution.setVariable(prefix+'volumeOutputs', utils.getNodeXml(createVolumeIncoming, 'volume-outputs', false))
+
+ execution.setVariable(prefix+'serviceType', 'service-instance')
+ execution.setVariable(prefix+'serviceInstanceId', utils.getNodeText1(createVolumeIncoming, "service-instance-id"))
+
+ // Generate volume group id
+ String volumeGroupId = UUID.randomUUID()
+ utils.log("DEBUG", "Generated volume group id: " + volumeGroupId, isDebugEnabled)
+
+ def testGroupId = execution.getVariable('test-volume-group-id')
+ if (testGroupId != null && testGroupId.trim() != '') {
+ volumeGroupId = testGroupId
+ }
+
+ execution.setVariable(prefix+'volumeGroupId', volumeGroupId)
+
+ }
+
+
+ public void sendSyncResponse (Execution execution, isDebugEnabled) {
+ def volumeGroupId = execution.getVariable(prefix+'volumeGroupId')
+ def requestId = execution.getVariable("mso-request-id")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", "Sync Response: " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 200, syncResponse)
+
+ execution.setVariable(prefix+'syncResponseSent', true)
+ }
+
+
+ public void sendSyncError (Execution execution, isDebugEnabled) {
+ WorkflowException we = execution.getVariable('WorkflowException')
+ def errorCode = we?.getErrorCode()
+ def errorMessage = we?.getErrorMessage()
+ //default to 400 since only invalid request will trigger this method
+ sendWorkflowResponse(execution, 400, errorMessage)
+ }
+
+
+ /**
+ * Create a WorkflowException
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void buildWorkflowException(Execution execution, int errorCode, errorMessage, isDebugEnabled) {
+ utils.log("DEBUG", errorMessage, isDebugEnabled)
+ (new ExceptionUtil()).buildWorkflowException(execution, 2500, errorMessage)
+ }
+
+
+ public void prepareDbInfraSuccessRequest(Execution execution, isDebugEnabled) {
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ def dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
+ def requestId = execution.getVariable('mso-request-id')
+ def statusMessage = "VolumeGroup successfully created."
+ def requestStatus = "COMPLETED"
+ def progress = "100"
+
+ try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ /*
+ from: $gVolumeGroup/aai:volume-group-id/text()
+ to: vnfreq:volume-outputs/vnfreq:volume-group-id
+ */
+ // for now assume, generated volumeGroupId is accepted
+ def volumeGroupId = execution.getVariable(prefix+'volumeGroupId')
+
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>${requestStatus}</requestStatus>
+ <progress>${progress}</progress>
+ <vnfOutputs>${dbVnfOutputs}</vnfOutputs>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable(prefix+"createDBRequest", buildDeleteDBRequestAsString)
+
+ utils.logAudit(buildDeleteDBRequestAsString)
+ }
+
+
+
+
+
+ public void postProcessResponse (Execution execution, isDebugEnabled) {
+
+ def dbReturnCode = execution.getVariable(prefix+'dbReturnCode')
+ def createDBResponse = execution.getVariable(prefix+'createDBResponse')
+
+ utils.logAudit('DB return code: ' + dbReturnCode)
+ utils.logAudit('DB response: ' + createDBResponse)
+
+ def requestId = execution.getVariable("mso-request-id")
+ def source = execution.getVariable(prefix+'source')
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:status-message>Volume Group has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: CREATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ utils.logAudit(createDBResponse)
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable(prefix+'Success', true)
+ execution.setVariable(prefix+'CompleteMsoProcessRequest', xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ }
+
+ public void prepareFalloutHandlerRequest(Execution execution, isDebugEnabled) {
+
+ WorkflowException we = execution.getVariable('WorkflowException')
+ def errorCode = we?.getErrorCode()
+ def errorMessage = we?.getErrorMessage()
+
+ def requestId = execution.getVariable("mso-request-id")
+ def source = execution.getVariable(prefix+'source')
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+
+ </aetgt:FalloutHandlerRequest>"""
+
+ // Format Response
+ String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
+ utils.logAudit(xmlHandlerRequest)
+
+ execution.setVariable(prefix+'FalloutHandlerRequest', xmlHandlerRequest)
+ utils.log("ERROR", "Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled)
+ }
+
+
+ /**
+ * Query AAI service instance
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAIServiceInstance(Execution execution, isDebugEnabled) {
+
+ def request = execution.getVariable(prefix+"Request")
+ def serviceInstanceId = utils.getNodeText1(request, "service-instance-id")
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getSearchNodesQueryEndpoint(execution)
+
+ def String queryAAIRequest = aaiEndpoint + "?search-node-type=service-instance&filter=service-instance-id:EQUALS:" + serviceInstanceId
+ utils.logAudit("AAI query service instance request: " + queryAAIRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query service instance return code: " + returnCode)
+ utils.logAudit("AAI query service instance response: " + aaiResponseAsString)
+
+ utils.log("DEBUG", "AAI query service instance return code: " + returnCode, isDebugEnabled)
+ utils.log("DEBUG", "AAI query service instance response: " + aaiResponseAsString, isDebugEnabled)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode=='200') {
+ utils.log("DEBUG", 'Service instance ' + serviceInstanceId + ' found in AAI.', isDebugEnabled)
+ } else {
+ if (returnCode=='404') {
+ def message = 'Service instance ' + serviceInstanceId + ' was not found in AAI. Return code: 404.'
+ utils.log("DEBUG", message, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
new file mode 100644
index 0000000..6168acd
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.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 org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+
+
+/**
+ * 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("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)
+
+ def vnfModelInfo = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo")
+ execution.setVariable("CREVI_vnfModelInfo", vnfModelInfo)
+
+ String modelInvariantId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelInvariantId")
+ execution.setVariable("CREVI_modelInvariantId", modelInvariantId)
+ 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)
+
+ def cloudConfiguration = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.cloudConfiguration")
+ execution.setVariable("CREVI_cloudConfiguration", cloudConfiguration)
+
+ String cloudSiteId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("CREVI_cloudSiteId", cloudSiteId)
+ utils.log("DEBUG", "Incoming Cloud Site Id is: " + cloudSiteId, isDebugEnabled)
+
+ String tenantId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("CREVI_tenantId", tenantId)
+ utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/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")
+
+ String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("CREVI_sdncCallbackUrl", sdncCallbackUrl)
+
+ def vnfInputParameters = jsonUtil.getJsonValue(createVnfRequest, "requestParameters.userParams")
+ execution.setVariable("CREVI_vnfInputParameters", vnfInputParameters)
+
+
+ utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
+ logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugEnabled)
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Bpmn Request is Null.")
+ }
+
+ }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 preProcessSDNCAssignRequest(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ def vnfId = execution.getVariable("CREVI_vnfId")
+ def serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId")
+ logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled)
+ utils.logAudit("NEW VNF ID: " + vnfId)
+
+ try{
+ //Build SDNC Request
+
+ String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("CREVI_assignSDNCRequest", assignSDNCRequest)
+ logDebug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessSDNCAssignRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void preProcessSDNCActivateRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ try{
+ String vnfId = execution.getVariable("CREVI_vnfId")
+ String serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId")
+
+ String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate")
+
+ execution.setVariable("CREVI_activateSDNCRequest", activateSDNCRequest)
+ logDebug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+
+ }catch(Exception e){
+ log.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ }
+
+ public String buildSDNCRequest(Execution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable("CREVI_sdncCallbackUrl")
+ def requestId = execution.getVariable("CREVI_requestId")
+ def serviceId = execution.getVariable("CREVI_serviceId")
+ def vnfType = execution.getVariable("CREVI_vnfType")
+ def vnfName = execution.getVariable("CREVI_vnfName")
+ def tenantId = execution.getVariable("CREVI_tenantId")
+ def source = execution.getVariable("CREVI_source")
+ def vnfId = execution.getVariable("CREVI_vnfId")
+ def cloudSiteId = execution.getVariable("CREVI_cloudSiteId")
+
+ String sdncVNFParamsXml = ""
+
+ if(execution.getVariable("CREVI_vnfParamsExistFlag") == true){
+ sdncVNFParamsXml = buildSDNCParamsXml(execution)
+ }else{
+ sdncVNFParamsXml = ""
+ }
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>VNFActivateRequest</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${svcInstId}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-name>${vnfName}</vnf-name>
+ <vnf-type>${vnfType}</vnf-type>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ <tenant>${tenantId}</tenant>
+ ${sdncVNFParamsXml}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.logAudit("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(Execution execution, String response, String method){
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ utils.logAudit("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ utils.logAudit("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
+
+ }else{
+ logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+ }
+
+ public void prepareCompletionHandlerRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ 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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ ${requestInfo}
+ <status-message>Vnf has been created successfully.</status-message>
+ <vnfId>${vnfId}</vnfId>
+ <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/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy
new file mode 100644
index 0000000..6e346d2
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy
@@ -0,0 +1,353 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+
+import java.util.UUID;
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+import org.xml.sax.InputSource
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>DelServiceInstance.bpmn</class> process.
+ *
+ */
+public class DelServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+
+ utils.log("DEBUG", " *** preProcessRequest Request *** ", isDebugEnabled)
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(siRequest)
+
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ utils.log("DEBUG", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "Input serviceInstanceId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ //String xmlRequestDetails = vidUtils.getJsonRequestDetailstoXml(siRequest)
+ //execution.setVariable("requestDetails", xmlRequestDetails)
+
+ //modelInfo
+ String serviceModelInfo = jsonUtil.getJsonValue(siRequest, "requestDetails.modelInfo")
+ if (isBlank(serviceModelInfo)) {
+ msg = "Input serviceModelInfo is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ } else
+ {
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ //utils.log("DEBUG", "modelInfo" + serviceModelInfo, isDebugEnabled)
+ }
+
+ //requestInfo
+ String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
+ if (isBlank(productFamilyId))
+ {
+ msg = "Input productFamilyId is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("productFamilyId", productFamilyId)
+ }
+ String source = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.source")
+ execution.setVariable("source", source)
+
+ //subscriberInfo
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //requestParameters
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ }
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncError *** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareCompletionRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareCompletion *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:status-message>Service Instance was deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>DelServiceInstance</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareFalloutRequest *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
+ String errorException = " Bpmn error encountered in CreateServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ utils.log("DEBUG", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
+ }
+
+
+ // *******************************
+ // Build DB request Section
+ // *******************************
+ public void prepareDBRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDBRequest of DeleteServiceInstance ***** ", isDebugEnabled)
+
+ String requestId = execution.getVariable("DELSI_requestId")
+ String statusMessage = "Service Instance successfully deleted."
+
+ //TODO - verify the format for Service Instance Delete,
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable("DELSI_createDBRequest", buildDeleteDBRequestAsString)
+ utils.logAudit(buildDeleteDBRequestAsString)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+ public void prepareDBRequestError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("DELSI_requestId")
+ String statusMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ statusMessage = wfe.getErrorMessage()
+
+ } else {
+ statusMessage = "Encountered Error during DeleteServiceInstanceInfra proccessing. "
+ }
+
+ //TODO - verify the format for Service Instance Create,
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable("DELSI_createDBInfraErrorRequest", buildDBRequestAsString)
+ utils.logAudit(buildDBRequestAsString)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow. Unexpected Error from method prepareDBRequestError() - " + ex.getMessage()
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteGenericMacroServiceNetworkVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteGenericMacroServiceNetworkVnf.groovy
new file mode 100644
index 0000000..f1513c6
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteGenericMacroServiceNetworkVnf.groovy
@@ -0,0 +1,476 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>DeleteViprAtmService.bpmn</class> process.
+ *
+ */
+public class DeleteGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELVAS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
+ NetworkUtils networkUtils = new NetworkUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteViprAtmService.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("deleteViprAtmServiceRequest", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable("DELVAS_vnfsDeletedCount", 0)
+ execution.setVariable("DELVAS_vnfsCount", 0)
+ execution.setVariable("DELVAS_networksCount", 0)
+ execution.setVariable("DELVAS_networksDeletedCount", 0)
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // check for incoming json message/input
+ String deleteViprAtmServiceRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(deleteViprAtmServiceRequest)
+ execution.setVariable("deleteViprAtmServiceRequest", deleteViprAtmServiceRequest);
+ println 'deleteViprAtmServiceRequest - ' + deleteViprAtmServiceRequest
+
+ // extract requestId
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
+ String dataErrorMessage = " Element 'serviceInstanceId' is missing. "
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ String requestAction = execution.getVariable("requestAction")
+ execution.setVariable("requestAction", requestAction)
+
+ String source = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ execution.setVariable("source", "VID")
+ } else {
+ execution.setVariable("source", source)
+ }
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+
+ // global-customer-id is optional on Delete
+
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ execution.setVariable("globalCustomerId", globalSubscriberId)
+
+ String suppressRollback = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("disableRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String productFamilyId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
+
+ // extract subscriptionServiceType
+ String subscriptionServiceType = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
+
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = "1702"
+ execution.setVariable("sdncVersion", sdncVersion)
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("DELVAS_requestInfo", requestInfo)
+
+ //Setting for Generic Sub Flows
+ execution.setVariable("GENGS_type", "service-instance")
+
+ utils.log("DEBUG", " ***** Completed preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareServiceInstanceDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // confirm if ServiceInstance was found
+ if ( !execution.getVariable("GENGS_FoundIndicator") )
+ {
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Service Instance was not found in AAI by id: " + serviceInstanceId
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ // get variable within incoming json
+ String deleteViprAtmServiceRequest = execution.getVariable("deleteViprAtmServiceRequest");
+
+ // get SI extracted by GenericGetService
+ String serviceInstanceAaiRecord = execution.getVariable("GENGS_service");
+
+ utils.log("DEBUG", "serviceInstanceAaiRecord: "+serviceInstanceAaiRecord, isDebugEnabled)
+
+ String relationship = ""
+ try {
+ relationship = networkUtils.getFirstNodeXml(serviceInstanceAaiRecord, "relationship-list")
+ } catch (Exception ex) {
+ //no relationships found
+ }
+ utils.log("DEBUG", " relationship string - " + relationship, isDebugEnabled)
+
+ int vnfsCount = 0
+ int networksCount = 0
+
+ if (relationship != null && relationship.length() > 0){
+ relationship = relationship.trim().replace("tag0:","").replace(":tag0","")
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List relatedVnfIdList = networkUtils.getRelatedVnfIdList(relationship)
+ vnfsCount = relatedVnfIdList.size()
+ execution.setVariable("DELVAS_vnfsCount", vnfsCount)
+ utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled)
+ execution.setVariable("DELVAS_relatedVnfIdList", relatedVnfIdList)
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List relatedNetworkIdList = networkUtils.getRelatedNetworkIdList(relationship)
+ networksCount = relatedNetworkIdList.size()
+ execution.setVariable("DELVAS_networksCount", networksCount)
+ utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled)
+ execution.setVariable("DELVAS_relatedNetworkIdList", relatedNetworkIdList)
+ execution.setVariable("relatedNetworkIdListString", relatedNetworkIdList.toString())
+ } else {
+ execution.setVariable("DELVAS_vnfsCount", 0)
+ utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled)
+ execution.setVariable("DELVAS_networksCount", 0)
+ utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled)
+ }
+
+ utils.log("DEBUG", " ***** Completed prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. prepareServiceInstanceDelete() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareVnfAndModulesDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareVnfAndModulesDelete of DeleteServiceInstanceMacro ***** ", isDebugEnabled)
+
+ List vnfList = execution.getVariable("DELVAS_relatedVnfIdList")
+ Integer vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount")
+ String vnfModelInfoString = ""
+ String vnfId = ""
+ if (vnfList.size() > 0 ) {
+ vnfId = vnfList.get(vnfsDeletedCount.intValue())
+ }
+
+ execution.setVariable("vnfId", vnfId)
+ utils.log("DEBUG", "need to delete vnfId:" + vnfId, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareVnfAndModulesDelete of DeleteServiceInstanceMacro ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceMacro flow. Unexpected Error from method prepareVnfAndModulesDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateVnfDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ String vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount")
+ vnfsDeletedCount++
+
+ execution.setVariable("DELVAS_vnfsDeletedCount", vnfsDeletedCount)
+
+ utils.log("DEBUG", " ***** Completed validateVnfDelete of DeleteViprAtmService ***** "+" vnf # "+vnfsDeletedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method validateVnfDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareNetworkDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ List networkList = execution.getVariable("DELVAS_relatedNetworkIdList")
+ utils.log("DEBUG", "array networkList from execution: "+ networkList, isDebugEnabled)
+
+ if (networkList == null || networkList.size() < 1){
+ networkList = Arrays.asList(execution.getVariable("relatedNetworkIdListString"))
+ utils.log("DEBUG", "array from string networkList: "+ networkList, isDebugEnabled)
+ }
+
+ Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount")
+
+ String networkId = ""
+ if (networkList.size() > 0) {
+ networkId = (String) networkList.get(networksDeletedCount.intValue())
+ }
+
+ execution.setVariable("networkId", networkId)
+ utils.log("DEBUG", "need to delete networkId:" + networkId, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = q"Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method prepareNetworkDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section
+ // *******************************
+ public void validateNetworkDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount")
+ networksDeletedCount++
+
+ execution.setVariable("DELVAS_networksDeletedCount", networksDeletedCount)
+
+ utils.log("DEBUG", " ***** Completed validateNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method validateNetworkDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside postProcessResponse of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("msoRequestId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:status-message>vIPR ATM Service Instance has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Service Instance macro action: DELETE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable("DELVAS_Success", true)
+ execution.setVariable("DELVAS_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** STARTED DeleteViprAtmService prepareFalloutRequest Process *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestInfo = execution.getVariable("DELVAS_requestInfo")
+ utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable("DELVAS_falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in DeleteViprAtmService prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteViprAtmService prepareFalloutRequest Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DeleteViprAtmService prepareFalloutRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside sendSyncError() of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("DELVAS_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ }catch(BpmnError b){
+ utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("DELVAS_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+
+
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
new file mode 100644
index 0000000..e18af17
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
@@ -0,0 +1,417 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import java.util.UUID;
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+public class DeleteNetworkInstance extends AbstractServiceTaskProcessor {
+ String Prefix="DELNI_"
+ String groovyClassName = "DeleteNetworkInstance"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+
+
+ public InitializeProcessVariables(Execution execution){
+
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ execution.setVariable(Prefix + "FalloutHandlerRequest", "")
+ execution.setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + groovyClassName + " ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null || sdncVersion == '1610') {
+ // 'a-la-cart' default, sdncVersion = '1610'
+ execution.setVariable("sdncVersion", "1610")
+ String bpmnRequest = execution.getVariable("bpmnRequest")
+ // set 'disableRollback'
+ if (bpmnRequest != null) {
+ String disableRollback = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.requestInfo.suppressRollback")
+ if (disableRollback != null) {
+ execution.setVariable("disableRollback", disableRollback)
+ utils.log("DEBUG", "Received 'suppressRollback': " + disableRollback , isDebugEnabled)
+ } else {
+ execution.setVariable("disableRollback", false)
+ }
+ utils.log("DEBUG", " Set 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ } else {
+ String dataErrorMessage = " Invalid 'bpmnRequest' request."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ // 'macro' test ONLY, sdncVersion = '1702'
+ utils.log("DEBUG", " 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ }
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ // get/set 'requestId'
+ if (execution.getVariable("requestId") == null) {
+ execution.setVariable("requestId", requestId)
+ }
+
+ // set action to "DELETE"
+ execution.setVariable("action", "DELETE")
+
+ //Place holder for additional code.
+
+ // TODO ???
+ // userParams??? 1) pre-loads indicator, 2) 'auto-activation'
+ // Tag/Value parameters
+ //
+ // Map: 'networkInputParams': 'auto-activation''
+ // Sample format?
+ // "requestParameters": {
+ // "userParams": [
+ // {
+ // "name": "someUserParam1",
+ // "value": "someValue1"
+ // }
+ // ]
+ // }
+ //
+ // String userParams = //use json util to extract "userParams"//
+ // execution.setVariable("networkInputParams", userParams)
+ // else: execution.setVariable("networkInputParams", null)
+ //
+
+
+ } catch (Exception ex){
+ sendSyncError(execution)
+ String exceptionMessage = "Exception Encountered in " + groovyClassName + ", PreProcessRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void getNetworkModelInfo (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside getNetworkModelInfo() of DeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // "networkModelInfo" is expected to be sent
+ String networkModelInfo = execution.getVariable("networkModelInfo")
+ utils.log("DEBUG", " networkModelInfo - " + networkModelInfo, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse() of DeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String deleteNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + deleteNetworkRestRequest, isDebugEnabled)
+
+ sendWorkflowResponse(execution, 202, deleteNetworkRestRequest)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DeleteNetworkInstance, sendSyncResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCompletion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareCompletion() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: DELETE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ // normal path
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareCompletion() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void prepareDBRequestError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteNetworkInstance ***** ", isDebugEnabled)
+
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ String statusMessage = wfe.getErrorMessage()
+ String requestId = execution.getVariable(Prefix +"requestId")
+
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <progress></progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:aetgt="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ execution.setVariable(Prefix + "deleteDBRequest", dbRequest)
+ utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance, prepareDBRequestError() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse() of DeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ if (execution.getVariable("CMSO_ResponseCode") == "200") {
+ execution.setVariable(Prefix + "Success", true)
+ utils.log("DEBUG", " ***** DeleteNetworkInstance Success ***** ", isDebugEnabled)
+ // Place holder for additional code.
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ utils.log("DEBUG", " ***** DeleteNetworkInstance Failed in CompletionMsoProces flow!. ***** ", isDebugEnabled)
+
+ }
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DeleteNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ // Prepare for FalloutHandler
+ public void buildErrorResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+ String dbReturnCode = execution.getVariable(Prefix + "dbReturnCode")
+ utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + execution.getVariable(Prefix + "deleteDBResponse"), isDebugEnabled)
+
+ String falloutHandlerRequest = ""
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+ execution.setVariable(Prefix + "Success", false)
+ try {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ String errorCode = String.valueOf(wfe.getErrorCode())
+ String errorMessage = wfe.getErrorMessage()
+
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.logAudit(falloutHandlerRequest)
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance, buildErrorResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELEtE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${exceptionMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>9999</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+ }
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String deleteNetworkRestError = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + deleteNetworkRestError, isDebugEnabled)
+
+ sendWorkflowResponse(execution, 500, deleteNetworkRestError)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed - DeleteNetworkInstance, sendSyncError(): " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method of " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
new file mode 100644
index 0000000..93890be
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
@@ -0,0 +1,383 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import groovy.json.JsonSlurper
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+
+
+public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ /**
+ * Initialize the flow's variables.
+ *
+ * @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)
+ utils.logAudit("DeleteVfModule Infra incoming Request: " + incomingRequest)
+
+ // 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')
+ utils.log("DEBUG", "serviceInstanceId is: " + serviceInstanceId, isDebugLogEnabled)
+ def vnfId = execution.getVariable('vnfId')
+ utils.log("DEBUG", "vnfId is: " + vnfId, isDebugLogEnabled)
+ def cloudConfiguration = jsonUtil.getJsonValue(incomingRequest, "requestDetails.cloudConfiguration")
+ execution.setVariable("cloudConfiguration", cloudConfiguration)
+ utils.log("DEBUG", "CloudConfiguration is: " + cloudConfiguration, isDebugLogEnabled)
+ def vfModuleModelInfo = jsonUtil.getJsonValue(incomingRequest, "requestDetails.modelInfo")
+
+ execution.setVariable("vfModuleModelInfo", vfModuleModelInfo)
+ utils.log("DEBUG", "VfModuleModelInfo is: " + vfModuleModelInfo, isDebugLogEnabled)
+
+ def vidUtils = new VidUtils(this)
+
+ String requestInXmlFormat = vidUtils.createXmlVfModuleRequest(execution, reqMap, 'DELETE_VF_MODULE', serviceInstanceId)
+
+ utils.log("DEBUG", " Request in XML format: " + requestInXmlFormat, isDebugLogEnabled)
+
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ execution.setVariable(prefix + 'Request', requestInXmlFormat)
+ execution.setVariable(prefix+'vnfId', vnfId)
+ execution.setVariable("isVidRequest", "true")
+
+ }
+ 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)
+ utils.logAudit("DeleteVfModuleInfra Request: " + request)
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('DELVfModI_requestInfo', requestInfo)
+ execution.setVariable('DELVfModI_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('DELVfModI_source', getNodeTextForce(requestInfo, 'source'))
+
+ def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs')
+ execution.setVariable('DELVfModI_vnfInputs', vnfInputs)
+ execution.setVariable('DELVfModI_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+ execution.setVariable('DELVfModI_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('DELVfModI_vfModuleName', getNodeTextForce(vnfInputs, 'vf-module-name'))
+ execution.setVariable('DELVfModI_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ execution.setVariable('DELVfModI_volumeGroupId', getNodeTextForce(vnfInputs, 'volume-group-id'))
+
+ def vnfParams = utils.getNodeXml(request, 'vnf-params')
+ execution.setVariable('DELVfModI_vnfParams', vnfParams)
+
+ 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()
+
+ utils.logAudit("DeleteVfModuleInfra Synch Response: " + synchResponse)
+ 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://org.openecomp.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)
+ utils.logAudit("DeleteAAIVfModuleInfra Update Request: " + 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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:ns8="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ ${requestInfo}
+ </request-info>
+ <ns8:status-message>Vf Module has been deleted successfully.</ns8:status-message>
+ <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ utils.logAudit("DeleteVfModule Infra Completion Handler Request: " + content)
+ execution.setVariable(resultVar, content)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } 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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ utils.logAudit("DeleteVfModuleInfra Fallout Handler Request: " + 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')
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000..0a3af33
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
@@ -0,0 +1,560 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.json.JsonSlurper
+
+import java.util.concurrent.ExecutionException;
+
+import org.springframework.web.util.UriUtils
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+
+/**
+ * This groovy class supports the <class>DeleteVfModuleVolume.bpmn</class> process.
+ */
+public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+
+ private XmlParser xmlParser = new XmlParser()
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ execution.setVariable('prefix', 'DELVfModVol_')
+ execution.setVariable("DELVfModVol_volumeRequest", null)
+ execution.setVariable('DELVfModVol_requestInfo', null)
+ execution.setVariable('DELVfModVol_requestId', null)
+ execution.setVariable('DELVfModVol_source', null)
+ execution.setVariable('DELVfModVol_volumeInputs', null)
+ execution.setVariable('DELVfModVol_volumeOutputs', null)
+ execution.setVariable('DELVfModVol_volumeGroupId', null)
+ execution.setVariable('DELVfModVol_vnfType', null)
+ execution.setVariable('DELVfModVol_serviceId', null)
+ execution.setVariable('DELVfModVol_cloudRegion', null)
+ execution.setVariable('DELVfModVol_tenantId', null)
+ execution.setVariable('DELVfModVol_volumeParams', null)
+ execution.setVariable('DELVfModVol_volumeGroupHeatStackId', null)
+ execution.setVariable('DELVfModVol_volumeGroupTenantId', null)
+ execution.setVariable("DELVfModVol_queryAAIVolGrpResponse", null)
+ execution.setVariable('DELVfModVol_messageId', null)
+ execution.setVariable('DELVfModVol_deleteVnfARequest', null)
+ execution.setVariable('DELVfModVol_updateInfraRequest', null)
+ execution.setVariable('DELVfModVol_CompleteMsoProcessRequest', null)
+ execution.setVariable('DELVfModVol_WorkflowException', null)
+ execution.setVariable('DELVfModVol_TransactionSuccessIndicator', false)
+ execution.setVariable("DELVfModVol_isErrorMessageException", false)
+ execution.setVariable('DELVfModVol_syncResponseSent', false)
+ }
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution, isDebugLogEnabled) {
+
+ InitializeProcessVariables(execution)
+
+ String createVolumeIncoming = validateRequest(execution)
+ utils.logAudit(createVolumeIncoming)
+
+ // check if request is xml or json
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+ utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def vidUtils = new VidUtils(this)
+ createVolumeIncoming = vidUtils.createXmlVolumeRequest(reqMap, 'DELETE_VF_MODULE_VOL', serviceInstanceId, volumeGroupId)
+ execution.setVariable("DELVfModVol_isVidRequest", true)
+ }
+ catch(groovy.json.JsonException je) {
+ utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
+ // assume request is in XML format - proceed as usual to process XML request
+ }
+
+ String request = utils.getNodeXml(createVolumeIncoming, "volume-request").drop(38).trim().replace("tag0:","").replace(":tag0","")
+ execution.setVariable("DELVfModVol_volumeRequest", request)
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('DELVfModVol_requestInfo', requestInfo)
+ String requestId = execution.getVariable("mso-request-id")
+ if (requestId == null || requestId == "") {
+ requestId = getRequiredNodeText(execution, requestInfo, 'request-id')
+ }
+ execution.setVariable('DELVfModVol_requestId', requestId)
+ execution.setVariable('DELVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+ def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+ execution.setVariable('DELVfModVol_volumeInputs', volumeInputs)
+ execution.setVariable('DELVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+ execution.setVariable('DELVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+ execution.setVariable('DELVfModVol_serviceId', 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'))
+
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ logDebug('Request: ' + createVolumeIncoming, isDebugLogEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution, isDebugEnabled) {
+
+ String volumeRequest = execution.getVariable("DELVfModVol_volumeRequest")
+ utils.log("DEBUG", " DELVfModVol_volumeRequest - " + "\n" + volumeRequest, isDebugEnabled)
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String deleteVolumeRequest =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd" statusCode="200">
+ <rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ contentType="text/xml">
+ ${volumeRequest}
+ </rest:payload>
+ </rest:RESTResponse>""".trim()
+
+ def isVidRequest = execution.getVariable('DELVfModVol_isVidRequest')
+ def syncResponse = ''
+
+ if(isVidRequest) {
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+ }
+ else {
+ syncResponse = utils.formatXml(deleteVolumeRequest)
+ }
+
+ execution.setVariable('DELVfModVol_syncResponseSent', true)
+
+ sendWorkflowResponse(execution, 200, syncResponse)
+ }
+
+
+ public void sendSyncError (Execution execution, isDebugEnabled) {
+ WorkflowException we = execution.getVariable('WorkflowException')
+ def errorCode = we?.getErrorCode()
+ def errorMessage = we?.getErrorMessage()
+ //default to 400 since only invalid request will trigger this method
+ sendWorkflowResponse(execution, 400, errorMessage)
+ }
+
+
+ public void callRESTQueryAAICloudRegion (Execution execution, isDebugEnabled) {
+
+ String cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ utils.logAudit(queryCloudRegionRequest)
+ execution.setVariable("DELVfModVol_queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", " DELVfModVol_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((cloudRegion != "ERROR")) {
+ if(execution.getVariable("DELVfModVol_queryCloudRegionReturnCode") == "404"){
+ execution.setVariable("DELVfModVol_aicCloudRegion", "AAIAIC25")
+ }else{
+ execution.setVariable("DELVfModVol_aicCloudRegion", cloudRegion)
+ }
+ execution.setVariable("DELVfModVol_cloudRegion", cloudRegion)
+ execution.setVariable("DELVfModVol_isCloudRegionGood", true)
+
+ } else {
+ utils.log("DEBUG", "AAI Query Cloud Region Unsuccessful.", isDebugEnabled)
+ execution.setVariable("DELVfModVol_isCloudRegionGood", false)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable("DELVfModVol_queryCloudRegionReturnCode"))
+ }
+
+ utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("DELVfModVol_isCloudRegionGood"), isDebugEnabled)
+ }
+
+ /**
+ * Query volume group by id
+ * @param execution
+ */
+ public void queryAAIForVolumeGroup(Execution execution, isDebugLogEnabled) {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+ if(volumeGroupId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, 'volume-group-id is not provided in the request')
+ throw new Exception('volume-group-id is not provided in the request')
+ }
+ String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+ logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query volume group by id return code: " + returnCode)
+ utils.logAudit("AAI query volume group by id response: " + aaiResponseAsString)
+
+ execution.setVariable("DELVfModVol_queryAAIVolGrpResponse", aaiResponseAsString)
+
+ if (returnCode=='200' || returnCode == '204') {
+
+ def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+ execution.setVariable('DELVfModVol_volumeGroupHeatStackId', heatStackId)
+
+ if(hasVfModuleRelationship(aaiResponseAsString)){
+ utils.log("DEBUG", 'Volume Group ' + volumeGroupId + ' currently in use', isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
+ }
+
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+ if (volumeGroupTenantId == null) {
+ utils.log("DEBUG", "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
+ }
+
+ execution.setVariable('DELVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ logDebug('Received Tenant Id ' + volumeGroupTenantId + ' from AAI for Volume Group with Volume Group Id ' + volumeGroupId , isDebugLogEnabled)
+ }
+ else {
+ if (returnCode=='404') {
+ utils.log("DEBUG", "Volume Group ${volumeGroupId} not found in AAI", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} not found in AAI. Response code: 404")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ /**
+ * Extract the Tenant Id from the Volume Group information returned by AAI.
+ *
+ * @param volumeGroupXml Volume Group XML returned by AAI.
+ * @return the Tenant Id extracted from the Volume Group information. 'null' is returned if
+ * the Tenant Id is missing or could not otherwise be extracted.
+ */
+ private String getTenantIdFromVolumeGroup(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('tenant'))) {
+ def NodeList relationshipDataList = utils.getIdenticalChildren(relationship, 'relationship-data')
+ for (Node relationshipData in relationshipDataList) {
+ def Node relationshipKey = utils.getChildNode(relationshipData, 'relationship-key')
+ if ((relationshipKey != null) && (relationshipKey.text().equals('tenant.tenant-id'))) {
+ def Node relationshipValue = utils.getChildNode(relationshipData, 'relationship-value')
+ if (relationshipValue != null) {
+ return relationshipValue.text()
+ }
+ }
+ }
+ }
+ }
+ }
+ return null
+ }
+
+ private boolean hasVnfRelationship(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('generic-vnf'))) {
+ def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+ if (relatedLink !=null && relatedLink.text() != null){
+ return true
+ }
+ }
+ }
+ }
+ return false
+ }
+
+ private boolean hasVfModuleRelationship(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('vf-module'))) {
+ def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+ if (relatedLink !=null && relatedLink.text() != null){
+ return true
+ }
+ }
+ }
+ }
+ return false
+ }
+
+ public void prepareVnfAdapterDeleteRequest(Execution execution, isDebugLogEnabled) {
+ def cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+ def tenantId = execution.getVariable('DELVfModVol_tenantId')
+ def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+ def volumeGroupHeatStackId = execution.getVariable('DELVfModVol_volumeGroupHeatStackId')
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ def serviceId = execution.getVariable('DELVfModVol_serviceId')
+
+ def messageId = execution.getVariable('DELVfModVol_messageId')
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <deleteVolumeGroupRequest>
+ <cloudSiteId>${cloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </deleteVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('DELVfModVol_deleteVnfARequest', vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+ }
+
+
+ public void deleteVolGrpId(Execution execution, isDebugEnabled) {
+
+ // get variables
+ String queryAAIVolGrpIdResponse = execution.getVariable("DELVfModVol_queryAAIVolGrpResponse")
+ String groupId = utils.getNodeText(queryAAIVolGrpIdResponse, "volume-group-id")
+ String resourceVersion = utils.getNodeText(queryAAIVolGrpIdResponse, "resource-version")
+ String messageId = execution.getVariable('DELVfModVol_messageId')
+ String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String deleteAAIVolumeGrpIdRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(groupId, "UTF-8")
+
+ if(resourceVersion !=null){
+ deleteAAIVolumeGrpIdRequest = deleteAAIVolumeGrpIdRequest +'?resource-version=' + UriUtils.encode(resourceVersion, 'UTF-8')
+ }
+
+ utils.logAudit('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
+ utils.log("DEBUG", "Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest, isDebugEnabled)
+
+ APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI delete volume group return code: " + returnCode)
+ utils.logAudit("AAI delete volume group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ if (returnCode=='200' || (returnCode == '204')) {
+ utils.log("DEBUG", "Volume group $groupId deleted.", isDebugEnabled)
+ } else {
+ if (returnCode=='404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $groupId not found for delete in AAI Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ public void prepareDBRequest (Execution execution, isDebugLogEnabled) {
+
+ WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ def volOutputs = execution.getVariable('DELVfModVol_volumeOutputs')
+ def statusMessage = "VolumeGroup successfully deleted"
+ def progress = "100"
+ def requestStatus = "COMPLETE"
+
+ if (workflowExceptionObj != null) {
+ statusMessage = (workflowExceptionObj.getErrorMessage()).replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ execution.setVariable("DELVfModVol_WorkflowExceptionMessage", statusMessage)
+ execution.setVariable("DELVfModVol_WorkflowExceptionCode", workflowExceptionObj.getErrorCode())
+ requestStatus = "FAILURE"
+ progress = ""
+ }
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <requestStatus>${requestStatus}</requestStatus>
+ <progress>${progress}</progress>
+ <vnfOutputs>${volOutputs}</vnfOutputs>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('DELVfModVol_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+ }
+
+
+ public void prepareCompletionHandlerRequest (Execution execution, isDebugLogEnabled) {
+ def requestId = execution.getVariable("mso-request-id")
+ def source = execution.getVariable("DELVfModVol_source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:status-message>Volume Group has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: DELETE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+ execution.setVariable('DELVfModVol_CompleteMsoProcessRequest', xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugLogEnabled)
+
+ }
+
+
+
+ public void prepareFalloutHandler (Execution execution, isDebugEnabled) {
+
+ execution.setVariable("DELVfModVol_Success", false)
+ String requestId = execution.getVariable("DELVfModVol_requestId")
+ String source = execution.getVariable("DELVfModVol_source")
+
+ WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+ def errorMessage = workflowExceptionObj.getErrorMessage()
+ def errorCode = workflowExceptionObj.getErrorCode()
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ // Format Response
+ String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
+ utils.logAudit(xmlHandlerRequest)
+
+ execution.setVariable("DELVfModVol_FalloutHandlerRequest", xmlHandlerRequest)
+ utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled)
+
+ }
+
+
+ /**
+ * Create a WorkflowException for the error case where the Tenant Id from
+ * AAI did not match the Tenant Id in the incoming request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleTenantIdMismatch(Execution execution, isDebugLogEnabled) {
+
+ def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('DELVfModVol_tenantId')
+ def volumeGroupTenantId = execution.getVariable('DELVfModVol_volumeGroupTenantId')
+
+ def String errorMessage = 'TenantId ' + tenantId + ' in incoming request does not match Tenant Id ' + volumeGroupTenantId +
+ ' retrieved from AAI for Volume Group Id ' + volumeGroupId
+
+ logError('Error in DeleteVfModuleVolume: ' + errorMessage)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ exceptionUtil.buildWorkflowException(execution, 5000, errorMessage)
+
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
new file mode 100644
index 0000000..b97686e
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
@@ -0,0 +1,217 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+import org.xml.sax.InputSource
+
+
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+
+
+/**
+ * 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("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)
+
+ def cloudConfiguration = jsonUtil.getJsonValue(deleteVnfRequest, "requestDetails.cloudConfiguration")
+ execution.setVariable("DELVI_cloudConfiguration", cloudConfiguration)
+
+ boolean cascadeDelete = false
+ Boolean cascadeDeleteObj = jsonUtil.getJsonRawValue(deleteVnfRequest, "requestDetails.requestParameters.cascadeDelete")
+ if(cascadeDeleteObj!=null){
+ cascadeDelete = cascadeDeleteObj.booleanValue()
+ }
+ execution.setVariable("DELVI_cascadeDelete", cascadeDelete)
+ utils.log("DEBUG", "Incoming cascadeDelete is: " + cascadeDelete, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/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 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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ ${requestInfo}
+ <status-message>Vnf has been deleted successfully.</status-message>
+ <vnfId>${vnfId}</vnfId>
+ <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/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
new file mode 100644
index 0000000..ed65dbc
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
@@ -0,0 +1,1741 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>DoCreateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
+ String Prefix="CRENWKI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ def className = getClass().getSimpleName()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "networkRequest", "")
+ execution.setVariable(Prefix + "rollbackEnabled", null)
+ execution.setVariable(Prefix + "networkInputs", "")
+ //execution.setVariable(Prefix + "requestId", "")
+ execution.setVariable(Prefix + "messageId", "")
+ execution.setVariable(Prefix + "source", "")
+ execution.setVariable("BasicAuthHeaderValuePO", "")
+ execution.setVariable("BasicAuthHeaderValueSDNC", "")
+ execution.setVariable(Prefix + "serviceInstanceId","")
+ execution.setVariable("GENGS_type", "")
+ execution.setVariable(Prefix + "rsrc_endpoint", null)
+ execution.setVariable(Prefix + "networkOutputs", "")
+ execution.setVariable(Prefix + "networkId","")
+ execution.setVariable(Prefix + "networkName","")
+
+ // AAI query Name
+ execution.setVariable(Prefix + "queryNameAAIRequest","")
+ execution.setVariable(Prefix + "queryNameAAIResponse", "")
+ execution.setVariable(Prefix + "aaiNameReturnCode", "")
+ execution.setVariable(Prefix + "isAAIqueryNameGood", false)
+
+ // AAI query Cloud Region
+ execution.setVariable(Prefix + "queryCloudRegionRequest","")
+ execution.setVariable(Prefix + "queryCloudRegionReturnCode","")
+ execution.setVariable(Prefix + "queryCloudRegionResponse","")
+ execution.setVariable(Prefix + "cloudRegionPo","")
+ execution.setVariable(Prefix + "cloudRegionSdnc","")
+ execution.setVariable(Prefix + "isCloudRegionGood", false)
+
+ // AAI query Id
+ execution.setVariable(Prefix + "queryIdAAIRequest","")
+ execution.setVariable(Prefix + "queryIdAAIResponse", "")
+ execution.setVariable(Prefix + "aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ execution.setVariable(Prefix + "queryVpnBindingAAIRequest","")
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "")
+ execution.setVariable(Prefix + "vpnBindings", null)
+ execution.setVariable(Prefix + "vpnCount", 0)
+ execution.setVariable(Prefix + "routeCollection", "")
+
+ // AAI query network policy
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest","")
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "")
+ execution.setVariable(Prefix + "networkPolicyUriList", null)
+ execution.setVariable(Prefix + "networkPolicyCount", 0)
+ execution.setVariable(Prefix + "networkCollection", "")
+
+ // AAI query route table reference
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest","")
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "")
+ execution.setVariable(Prefix + "networkTableRefUriList", null)
+ execution.setVariable(Prefix + "networkTableRefCount", 0)
+ execution.setVariable(Prefix + "tableRefCollection", "")
+
+ // AAI requery Id
+ execution.setVariable(Prefix + "requeryIdAAIRequest","")
+ execution.setVariable(Prefix + "requeryIdAAIResponse", "")
+ execution.setVariable(Prefix + "aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ execution.setVariable(Prefix + "updateContrailAAIUrlRequest","")
+ execution.setVariable(Prefix + "updateContrailAAIPayloadRequest","")
+ execution.setVariable(Prefix + "updateContrailAAIResponse", "")
+ execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", "")
+
+ execution.setVariable(Prefix + "createNetworkRequest", "")
+ execution.setVariable(Prefix + "createNetworkResponse", "")
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ //execution.setVariable(Prefix + "rollbackNetworkResponse", "")
+ execution.setVariable(Prefix + "networkReturnCode", "")
+ //execution.setVariable(Prefix + "rollbackNetworkReturnCode", "")
+ execution.setVariable(Prefix + "isNetworkRollbackNeeded", false)
+
+ execution.setVariable(Prefix + "assignSDNCRequest", "")
+ execution.setVariable(Prefix + "assignSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackSDNCRequest", "")
+ //execution.setVariable(Prefix + "rollbackSDNCResponse", "")
+ execution.setVariable(Prefix + "sdncReturnCode", "")
+ //execution.setVariable(Prefix + "rollbackSDNCReturnCode", "")
+ execution.setVariable(Prefix + "isSdncRollbackNeeded", false)
+ execution.setVariable(Prefix + "sdncResponseSuccess", false)
+
+ execution.setVariable(Prefix + "activateSDNCRequest", "")
+ execution.setVariable(Prefix + "activateSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", "")
+ //execution.setVariable(Prefix + "rollbackActivateSDNCResponse", "")
+ execution.setVariable(Prefix + "sdncActivateReturnCode", "")
+ //execution.setVariable(Prefix + "rollbackActivateSDNCReturnCode", "")
+ execution.setVariable(Prefix + "isSdncActivateRollbackNeeded", false)
+ execution.setVariable(Prefix + "sdncActivateResponseSuccess", false)
+
+ execution.setVariable(Prefix + "orchestrationStatus", "")
+ execution.setVariable(Prefix + "isVnfBindingPresent", false)
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "isException", false)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + className + ".groovy ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // GET Incoming request & validate 3 kinds of format.
+ execution.setVariable("action", "CREATE")
+ String networkRequest = execution.getVariable("bpmnRequest")
+ if (networkRequest != null) {
+ if (networkRequest.contains("requestDetails")) {
+ // JSON format request is sent, create xml
+ try {
+ def prettyJson = JsonOutput.prettyPrint(networkRequest.toString())
+ utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
+ networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, networkRequest)
+
+ } catch (Exception ex) {
+ String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ } else {
+ // XML format request is sent
+
+ }
+ } else {
+ // vIPR format request is sent, create xml from individual variables
+ networkRequest = vidUtils.createXmlNetworkRequestInstance(execution)
+ }
+
+ networkRequest = utils.formatXml(networkRequest)
+ utils.logAudit(networkRequest)
+ execution.setVariable(Prefix + "networkRequest", networkRequest)
+ utils.log("DEBUG", Prefix + "networkRequest - " + '\n' + networkRequest, isDebugEnabled)
+
+ // validate 'backout-on-failure' to override 'URN_mso_rollback'
+ boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
+ execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
+ utils.log("DEBUG", Prefix + "rollbackEnabled - " + rollbackEnabled, isDebugEnabled)
+
+ String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+ execution.setVariable(Prefix + "networkInputs", networkInputs)
+ utils.log("DEBUG", Prefix + "networkInputs - " + '\n' + networkInputs, isDebugEnabled)
+
+
+
+ // prepare messageId
+ String messageId = execution.getVariable("testMessageId") // for testing
+ if (messageId == null || messageId == "") {
+ messageId = UUID.randomUUID()
+ utils.log("DEBUG", Prefix + "messageId, random generated: " + messageId, isDebugEnabled)
+ } else {
+ utils.log("DEBUG", Prefix + "messageId, pre-assigned: " + messageId, isDebugEnabled)
+ }
+ execution.setVariable(Prefix + "messageId", messageId)
+
+ String source = utils.getNodeText1(networkRequest, "source")
+ execution.setVariable(Prefix + "source", source)
+ utils.log("DEBUG", Prefix + "source - " + source, isDebugEnabled)
+
+ // validate cloud region
+ String lcpCloudRegionId = utils.getNodeText1(networkRequest, "aic-cloud-region")
+ if ((lcpCloudRegionId == null) || (lcpCloudRegionId == "") || (lcpCloudRegionId == "null")) {
+ String dataErrorMessage = "Missing value/element: 'lcpCloudRegionId' or 'cloudConfiguration' or 'aic-cloud-region'."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ // validate service instance id
+ String serviceInstanceId = utils.getNodeText1(networkRequest, "service-instance-id")
+ if ((serviceInstanceId == null) || (serviceInstanceId == "") || (serviceInstanceId == "null")) {
+ String dataErrorMessage = "Missing value/element: 'serviceInstanceId'."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValuePO",encodedString)
+ execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
+
+ } catch (IOException ex) {
+ String exceptionMessage = "Exception Encountered in DoCreateNetworkInstance, PreProcessRequest() - "
+ String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, , isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ // Set variables for Generic Get Sub Flow use
+ execution.setVariable(Prefix + "serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", Prefix + "serviceInstanceId - " + serviceInstanceId, isDebugEnabled)
+
+ execution.setVariable("GENGS_type", "service-instance")
+ utils.log("DEBUG", "GENGS_type - " + "service-instance", isDebugEnabled)
+ utils.log("DEBUG", " Url for SDNC adapter: " + execution.getVariable("URN_mso_adapters_sdnc_endpoint"), isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // build 'networkOutputs'
+ String networkId = utils.getNodeText1(networkRequest, "network-id")
+ if ((networkId == null) || (networkId == "null")) {
+ networkId = ""
+ }
+ String networkName = utils.getNodeText1(networkRequest, "network-name")
+ if ((networkName == null) || (networkName == "null")) {
+ networkName = ""
+ }
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>${networkId}</network-id>
+ <network-name>${networkName}</network-name>
+ </network-outputs>"""
+ execution.setVariable(Prefix + "networkOutputs", networkOutputs)
+ utils.log("DEBUG", Prefix + "networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+ execution.setVariable(Prefix + "networkId", networkId)
+ execution.setVariable(Prefix + "networkName", networkName)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ // caught exception
+ String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkName (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkName() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ // get variables
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String networkName = utils.getNodeText1(networkInputs, "network-name")
+ networkName = UriUtils.encode(networkName,"UTF-8")
+ String messageId = execution.getVariable("messageId")
+
+ // Prepare AA&I url with network-name
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryAAINameRequest = "${aai_endpoint}${aai_uri}" + "?network-name=" + networkName
+ utils.logAudit(queryAAINameRequest)
+ execution.setVariable(Prefix + "queryNameAAIRequest", queryAAINameRequest)
+ utils.log("DEBUG", Prefix + "queryNameAAIRequest - " + "\n" + queryAAINameRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryAAINameRequest);
+
+ try {
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiNameReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI Query Name Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ utils.log("DEBUG", " ***** AAI Query Name Response : " +'\n'+ aaiResponseAsString, isDebugEnabled)
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNameAAIResponse", aaiResponseAsString)
+ execution.setVariable(Prefix + "isAAIqueryNameGood", true)
+ String orchestrationStatus = ""
+ try {
+ // response is NOT empty
+ orchestrationStatus = utils.getNodeText1(aaiResponseAsString, "orchestration-status")
+ execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus.toUpperCase())
+ utils.log("DEBUG", Prefix + "orchestrationStatus - " + orchestrationStatus.toUpperCase(), isDebugEnabled)
+ execution.setVariable("orchestrationStatus", orchestrationStatus)
+
+ } catch (Exception ex) {
+ // response is empty
+ execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus)
+ utils.log("DEBUG", Prefix + "orchestrationStatus - " + orchestrationStatus, isDebugEnabled)
+ }
+
+ } else {
+ if (returnCode=='404') {
+ utils.log("DEBUG", " QueryAAINetworkName return code = '404' (Not Found). Proceed with the Create !!! ", isDebugEnabled)
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Error Response from QueryAAINetworkName - " + returnCode
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ }
+
+ utils.log("DEBUG", Prefix + "isAAIqueryNameGood? : " + execution.getVariable(Prefix + "isAAIqueryNameGood"), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow - callRESTQueryAAINetworkName() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAICloudRegion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String cloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region")
+ cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ utils.logAudit(queryCloudRegionRequest)
+ execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", Prefix + "queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+ String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+ String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion)
+
+ if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
+ execution.setVariable(Prefix + "cloudRegionPo", cloudRegionPo)
+ execution.setVariable(Prefix + "cloudRegionSdnc", cloudRegionSdnc)
+ execution.setVariable(Prefix + "isCloudRegionGood", true)
+
+ } else {
+ String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable(Prefix + "queryCloudRegionReturnCode")
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable(Prefix + "isCloudRegionGood"), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow - callRESTQueryAAICloudRegion() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkId(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkId() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkId = ""
+ String assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
+ if (execution.getVariable("sdncVersion") == "1702") {
+ String networkResponseInformation = ""
+ try {
+ networkResponseInformation = utils.getNodeXml(assignSDNCResponse, "network-response-information", false).replace("tag0:","").replace(":tag0","")
+ networkId = utils.getNodeText1(networkResponseInformation, "instance-id")
+ } catch (Exception ex) {
+ String dataErrorMessage = " SNDC Response network validation for 'instance-id' (network-id) failed: Empty <network-response-information>"
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ networkId = utils.getNodeText1(assignSDNCResponse, "network-id")
+ }
+ if (networkId == null || networkId == "null") {
+ String dataErrorMessage = "SNDC Response did not contains 'instance-id' or 'network-id' element, or the value is null."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ } else {
+ utils.log("DEBUG", " SNDC Response network validation for 'instance-id' (network-id)' is good: " + networkId, isDebugEnabled)
+ }
+
+
+ execution.setVariable(Prefix + "networkId", networkId)
+ String networkName = utils.getNodeText1(assignSDNCResponse, "network-name")
+ execution.setVariable(Prefix + "networkName", networkName)
+
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
+ utils.logAudit(queryIdAAIRequest)
+ execution.setVariable(Prefix + "queryIdAAIRequest", queryIdAAIRequest)
+ utils.log("DEBUG", Prefix + "queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryIdAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiIdReturnCode", returnCode)
+
+ utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryIdAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String netId = utils.getNodeText1(aaiResponseAsString, "network-id")
+ execution.setVariable(Prefix + "networkId", netId)
+ String netName = utils.getNodeText1(aaiResponseAsString, "network-name")
+ execution.setVariable(Prefix + "networkName", netName)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)."
+ utils.log("DEBUG", " AAI Query Failed. " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Response from QueryAAINetworkId - " + returnCode
+ utils.log("DEBUG", "Unexpected Response from QueryAAINetworkId - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkId() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTReQueryAAINetworkId(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTReQueryAAINetworkId() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkId = execution.getVariable(Prefix + "networkId")
+ String netId = networkId
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
+ utils.logAudit(requeryIdAAIRequest)
+ execution.setVariable(Prefix + "requeryIdAAIRequest", requeryIdAAIRequest)
+ utils.log("DEBUG", Prefix + "requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(requeryIdAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiRequeryIdReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "requeryIdAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String netName = utils.getNodeText1(aaiResponseAsString, "network-name")
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>${netId}</network-id>
+ <network-name>${netName}</network-name>
+ </network-outputs>"""
+ execution.setVariable(Prefix + "networkOutputs", networkOutputs)
+ utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)."
+ utils.log("DEBUG", " AAI ReQuery Failed. - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Response from ReQueryAAINetworkId - " + returnCode
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTReQueryAAINetworkId() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkVpnBinding(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkVpnBinding() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // Check if Vnf Binding is present, then build a List of vnfBinding
+ List vpnBindingUri = networkUtils.getVnfBindingObject(relationship)
+ int vpnCount = vpnBindingUri.size()
+ execution.setVariable(Prefix + "vpnCount", vpnCount)
+ utils.log("DEBUG", Prefix + "vpnCount - " + vpnCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (vpnCount > 0) {
+ execution.setVariable(Prefix + "vpnBindings", vpnBindingUri)
+ utils.log("DEBUG", " vpnBindingUri List - " + vpnBindingUri, isDebugEnabled)
+
+ String routeTargets = ""
+ // AII loop call using list vpnBindings
+ for (i in 0..vpnBindingUri.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using vpnBinding
+ String queryVpnBindingAAIRequest = ""
+ String aai_uri = aaiUriUtil.getNetworkVpnBindingUri(execution)
+
+ // Note: By default, the vpnBinding url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (vpnBindingUri[i].charAt(vpnBindingUri[i].length()-1) == '/') {
+ queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i].substring(0, vpnBindingUri[i].length()-1)
+ } else {
+ queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i]
+ }
+
+ } else {
+ // using uri value in URN mapping
+ String vpnBindingId = vpnBindingUri[i].substring(vpnBindingUri[i].indexOf("/vpn-binding/")+13, vpnBindingUri[i].length())
+ if (vpnBindingId.charAt(vpnBindingId.length()-1) == '/') {
+ vpnBindingId = vpnBindingId.substring(0, vpnBindingId.length()-1)
+ }
+ queryVpnBindingAAIRequest = "${aai_endpoint}${aai_uri}/" + vpnBindingId
+ }
+
+ utils.logAudit(queryVpnBindingAAIRequest)
+ execution.setVariable(Prefix + "queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
+ utils.log("DEBUG", Prefix + "queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryVpnBindingAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String routeTarget = ""
+ if (utils.nodeExists(aaiResponseAsString, "global-route-target")) {
+ routeTarget = utils.getNodeText1(aaiResponseAsString, "global-route-target")
+ routeTargets += "<routeTargets>" + routeTarget + "</routeTargets>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from AAINetworkVpnBinding is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = " Unexpected Response from AAINetworkVpnBinding - " + returnCode
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "routeCollection", routeTargets)
+ utils.log("DEBUG", Prefix + "routeCollection - " + '\n' + routeTargets, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <vpn-binding xmlns="${schemaVersion}">
+ <global-route-target/>
+ </vpn-binding>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "routeCollection", "<routeTargets/>")
+ utils.log("DEBUG", " No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkPolicy(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkPolicy() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // Check if Network Policy is present, then build a List of network policy
+ List networkPolicyUriList = networkUtils.getNetworkPolicyObject(relationship)
+ int networkPolicyCount = networkPolicyUriList.size()
+ execution.setVariable(Prefix + "networkPolicyCount", networkPolicyCount)
+ utils.log("DEBUG", Prefix + "networkPolicyCount - " + networkPolicyCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkPolicyCount > 0) {
+ execution.setVariable(Prefix + "networkPolicyUriList", networkPolicyUriList)
+ utils.log("DEBUG", " networkPolicyUri List - " + networkPolicyUriList, isDebugEnabled)
+
+ String networkPolicies = ""
+ // AII loop call using list vpnBindings
+ for (i in 0..networkPolicyUriList.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using vpnBinding
+ String queryNetworkPolicyAAIRequest = ""
+
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ // Note: By default, the network policy url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (networkPolicyUriList[i].charAt(networkPolicyUriList[i].length()-1) == '/') {
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i].substring(0, networkPolicyUriList[i].length()-1)
+ } else {
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i]
+ }
+ } else {
+ // using uri value in URN mapping
+ String networkPolicyId = networkPolicyUriList[i].substring(networkPolicyUriList[i].indexOf("/network-policy/")+16, networkPolicyUriList[i].length())
+ println " networkPolicyId - " + networkPolicyId
+ if (networkPolicyId.charAt(networkPolicyId.length()-1) == '/') {
+ networkPolicyId = networkPolicyId.substring(0, networkPolicyId.length()-1)
+ }
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + networkPolicyId
+
+ }
+
+
+ utils.logAudit(queryNetworkPolicyAAIRequest)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
+ utils.log("DEBUG", Prefix + "queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryNetworkPolicyAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String networkPolicy = ""
+ if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) {
+ networkPolicy = utils.getNodeText1(aaiResponseAsString, "network-policy-fqdn")
+ networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkPolicy is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Response from QueryAAINetworkPolicy - " + returnCode
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "networkCollection", networkPolicies)
+ utils.log("DEBUG", Prefix + "networkCollection - " + '\n' + networkPolicies, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <network-policy xmlns="${schemaVersion}">
+ <network-policy-fqdn/>
+ </network-policy>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "networkCollection", "<policyFqdns/>")
+ utils.log("DEBUG", " No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkTableRef(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkTableRef() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List networkTableRefUriList = networkUtils.getNetworkTableRefObject(relationship)
+ int networkTableRefCount = networkTableRefUriList.size()
+ execution.setVariable(Prefix + "networkTableRefCount", networkTableRefCount)
+ utils.log("DEBUG", Prefix + "networkTableRefCount - " + networkTableRefCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkTableRefCount > 0) {
+ execution.setVariable(Prefix + "networkTableRefUriList", networkTableRefUriList)
+ utils.log("DEBUG", " networkTableRefUri List - " + networkTableRefUriList, isDebugEnabled)
+
+ // AII loop call using list vpnBindings
+ String networkTableRefs = ""
+ for (i in 0..networkTableRefUriList.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using tableRef
+ String queryNetworkTableRefAAIRequest = ""
+
+ String aai_uri = aaiUriUtil.getNetworkTableReferencesUri(execution)
+
+ // Note: By default, the network policy url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (networkTableRefUriList[i].charAt(networkTableRefUriList[i].length()-1) == '/') {
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i].substring(0, networkTableRefUriList[i].length()-1)
+ } else {
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i]
+ }
+ } else {
+ // using uri value in URN mapping
+ String networkTableRefId = networkTableRefUriList[i].substring(networkTableRefUriList[i].indexOf("/route-table-reference/")+23, networkTableRefUriList[i].length())
+
+ if (networkTableRefId.charAt(networkTableRefId.length()-1) == '/') {
+ networkTableRefId = networkTableRefId.substring(0, networkTableRefId.length()-1)
+ }
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}${aai_uri}/" + networkTableRefId
+
+ }
+
+
+ utils.logAudit(queryNetworkTableRefAAIRequest)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
+ utils.log("DEBUG", Prefix + "queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryNetworkTableRefAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String networkTableRef = ""
+ if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) {
+ networkTableRef = utils.getNodeText1(aaiResponseAsString, "route-table-reference-fqdn")
+ networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Response from QueryAAINetworkTableRef - " + returnCode
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "tableRefCollection", networkTableRefs)
+ utils.log("DEBUG", Prefix + "tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <route-table-references xmlns="${schemaVersion}">
+ <route-table-reference-fqdn/>
+ </route-table-references>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "tableRefCollection", "<routeTableFqdns/>")
+ utils.log("DEBUG", " No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void callRESTUpdateContrailAAINetwork(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTUpdateContrailAAINetwork() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkId = execution.getVariable(Prefix + "networkId")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String requeryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
+ String createNetworkResponse = execution.getVariable(Prefix + "createNetworkResponse")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId
+
+ utils.logAudit(updateContrailAAIUrlRequest)
+ execution.setVariable(Prefix + "updateContrailAAIUrlRequest", updateContrailAAIUrlRequest)
+ utils.log("DEBUG", Prefix + "updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled)
+
+ //Prepare payload (PUT)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion)
+ String payloadXml = utils.formatXml(payload)
+ utils.logAudit(payloadXml)
+ execution.setVariable(Prefix + "updateContrailAAIPayloadRequest", payloadXml)
+ utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled)
+
+ 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");
+
+ APIResponse response = client.httpPut(payload)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode)
+
+ utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiUpdateContrailResponseAsString)
+ execution.setVariable(Prefix + "updateContrailAAIResponse", aaiUpdateContrailResponseAsString)
+ utils.log("DEBUG", " AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString, isDebugEnabled)
+ // Point-of-no-return is set to false, rollback not needed.
+ String rollbackEnabled = execution.getVariable(Prefix + "rollbackEnabled")
+ if (rollbackEnabled == "true") {
+ execution.setVariable(Prefix + "isPONR", false)
+ } else {
+ execution.setVariable(Prefix + "isPONR", true)
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ if (aaiUpdateContrailResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiUpdateContrailResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode
+ utils.log("DEBUG", errorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage)
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCreateNetworkRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareCreateNetworkRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId == null) {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ String messageId = execution.getVariable(Prefix + "messageId")
+ String source = execution.getVariable(Prefix + "source")
+
+ String requestInput = execution.getVariable(Prefix + "networkRequest")
+ String queryIdResponse = execution.getVariable(Prefix + "queryIdAAIResponse")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionPo")
+ String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled")
+
+ // Prepare Network request
+ String routeCollection = execution.getVariable(Prefix + "routeCollection")
+ String policyCollection = execution.getVariable(Prefix + "networkCollection")
+ String tableCollection = execution.getVariable(Prefix + "tableRefCollection")
+ String createNetworkRequest = networkUtils.CreateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyCollection, tableCollection, cloudRegionId, backoutOnFailure, source )
+ // Format Response
+ String buildDeleteNetworkRequestAsString = utils.formatXml(createNetworkRequest)
+ buildDeleteNetworkRequestAsString = buildDeleteNetworkRequestAsString.replace(":w1aac13n0", "").replace("w1aac13n0:", "")
+ utils.logAudit(buildDeleteNetworkRequestAsString)
+
+ execution.setVariable(Prefix + "createNetworkRequest", buildDeleteNetworkRequestAsString)
+ utils.log("DEBUG", Prefix + "createNetworkRequest - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareCreateNetworkRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+
+ String networkId = execution.getVariable(Prefix + "networkId")
+ String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "assign", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
+
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ utils.logAudit(sndcTopologyCreateRequesAsString)
+ execution.setVariable(Prefix + "assignSDNCRequest", sndcTopologyCreateRequesAsString)
+ utils.log("DEBUG", Prefix + "assignSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSDNCRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+
+ String networkId = execution.getVariable(Prefix + "networkId")
+ String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
+
+ // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "assign", "CreateNetworkInstance", cloudRegionId, networkId, null)
+
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ utils.logAudit(sndcTopologyCreateRequesAsString)
+ execution.setVariable(Prefix + "assignSDNCRequest", sndcTopologyCreateRequesAsString)
+ utils.log("DEBUG", Prefix + "assignSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCActivateRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCActivateRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String networkId = execution.getVariable(Prefix + "networkId")
+ String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
+
+ // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "activate", "ActivateNetworkInstance", cloudRegionId, networkId, null)
+
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ utils.logAudit(sndcTopologyCreateRequesAsString)
+ execution.setVariable(Prefix + "activateSDNCRequest", sndcTopologyCreateRequesAsString)
+ utils.log("DEBUG", Prefix + "activateSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCActivateRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void validateCreateNetworkResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateNetworkResponse() of DoCreateNetworkInstance *****", isDebugEnabled)
+
+ try {
+ String returnCode = execution.getVariable(Prefix + "networkReturnCode")
+ String networkResponse = execution.getVariable(Prefix + "createNetworkResponse")
+ if (networkResponse==null) {
+ networkResponse="" // reset
+ }
+
+ utils.log("DEBUG", " Network Adapter create responseCode: " + returnCode, isDebugEnabled)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ execution.setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ utils.logAudit(networkResponse)
+ execution.setVariable(Prefix + "createNetworkResponse", networkResponse)
+ utils.log("DEBUG", " Network Adapter create Success Response - " + "\n" + networkResponse, isDebugEnabled)
+
+ // prepare rollback data
+ String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
+ rollbackData = rollbackData.replace("rollback>", "networkRollback>")
+ String rollbackNetwork =
+ """<rollbackNetworkRequest>
+ ${rollbackData}
+ </rollbackNetworkRequest>"""
+ String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkXml)
+ utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled)
+
+ } else { // network error
+ if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) { //4xx, 5xx
+ if (networkResponse.contains("createNetworkError")) {
+ networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '')
+ errorMessage = utils.getNodeText1(networkResponse, "message")
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ } else { // CatchAll exception
+ if (returnCode == "500") {
+ errorMessage = "JBWEB000065: HTTP Status 500."
+ } else {
+ errorMessage = "Return code is " + returnCode
+ }
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ }
+
+ } else { // CatchAll exception
+ String dataErrorMessage = "Received error from Network Adapter. Return code is: " + returnCode
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. validateCreateNetworkResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void validateSDNCResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateSDNCResponse() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ String response = execution.getVariable(Prefix + "assignSDNCResponse")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String assignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "assignSDNCResponse"))
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "assignSDNCResponse", assignSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, Prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncRollbackNeeded", true)
+ utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void validateRpcSDNCActivateResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRpcSDNCActivateResponse() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ String response = execution.getVariable(Prefix + "activateSDNCResponse")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String assignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "activateSDNCResponse"))
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "activateSDNCResponse", assignSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, Prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncActivateRollbackNeeded", true)
+ utils.log("DEBUG", "Successfully Validated Rpc SDNC Activate Response", isDebugEnabled)
+
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated Rpc SDNC Activate Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+
+ public void prepareSDNCRollbackRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRollbackRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
+ String networkId = execution.getVariable(Prefix + "networkId")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
+
+ // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
+ String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
+ utils.log("DEBUG", " Preparing request for SDNC Topology 'rollback-NetworkActivateRequest' rollback . . . - " + "\n" + sndcTopologyRollbackRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCRollbackRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCRollbackRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
+ String networkId = execution.getVariable(Prefix + "networkId")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
+
+ // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "unassign", "DeleteNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ utils.log("DEBUG", " Preparing request for SDNC Topology 'unassign-DeleteNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCRollbackRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCActivateRollback(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCActivateRollback() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String activateSDNCResponse = execution.getVariable(Prefix + "activateSDNCResponse")
+ String networkId = execution.getVariable(Prefix + "networkId")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
+
+ // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "deactivate", "DeleteNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology 'deactivate-DeleteNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCActivateRollback() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRollbackData() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
+ if (rollbackSDNCRequest != null) {
+ if (rollbackSDNCRequest != "") {
+ rollbackData.put("rollbackSDNCRequest", execution.getVariable(Prefix + "rollbackSDNCRequest"))
+ }
+ }
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
+ }
+ }
+ String rollbackActivateSDNCRequest = execution.getVariable(Prefix + "rollbackActivateSDNCRequest")
+ if (rollbackActivateSDNCRequest != null) {
+ if (rollbackActivateSDNCRequest != "") {
+ rollbackData.put("rollbackActivateSDNCRequest", execution.getVariable(Prefix + "rollbackActivateSDNCRequest"))
+ }
+ }
+ execution.setVariable("rollbackData", rollbackData)
+ utils.log("DEBUG", "** rollbackData : " + rollbackData, isDebugEnabled)
+
+ execution.setVariable("WorkflowException", execution.getVariable(Prefix + "WorkflowException"))
+ utils.log("DEBUG", "** WorkflowException : " + execution.getVariable("WorkflowException"), isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void postProcessResponse(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ //Conditions:
+ // 1. Silent Success: execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"
+ // 2. Success: execution.getVariable("WorkflowException") == null (NULL)
+ // 3. WorkflowException: execution.getVariable("WorkflowException") != null (NOT NULL)
+
+ utils.log("DEBUG", " ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"), isDebugEnabled)
+ // successful flow
+ if (execution.getVariable(Prefix + "isException") == false) {
+ // set rollback data
+ execution.setVariable("orchestrationStatus", "")
+ execution.setVariable("networkId", execution.getVariable(Prefix + "networkId"))
+ execution.setVariable("networkName", execution.getVariable(Prefix + "networkName"))
+ prepareSuccessRollbackData(execution) // populate rollbackData
+ execution.setVariable("WorkflowException", null)
+ execution.setVariable(Prefix + "Success", true)
+ utils.log("DEBUG", " ***** postProcessResponse(), GOOD !!!", isDebugEnabled)
+ } else {
+ // inside sub-flow logic
+ execution.setVariable(Prefix + "Success", false)
+ execution.setVariable("rollbackData", null)
+ String exceptionMessage = " Exception encountered in MSO Bpmn. "
+ if (execution.getVariable("workflowException") != null) { // Output of Rollback flow.
+ utils.log("DEBUG", " ***** workflowException: " + execution.getVariable("workflowException"), isDebugEnabled)
+ WorkflowException wfex = execution.getVariable("workflowException")
+ exceptionMessage = wfex.getErrorMessage()
+ } else {
+ if (execution.getVariable(Prefix + "WorkflowException") != null) {
+ WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException")
+ exceptionMessage = pwfex.getErrorMessage()
+ }
+ }
+ // going to the Main flow: a-la-carte or macro
+ utils.log("DEBUG", " ***** postProcessResponse(), BAD !!!", isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ } catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+
+ }
+
+
+
+ }
+
+ public void prepareSuccessRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSuccessRollbackData() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ if (execution.getVariable("sdncVersion") == '1702') {
+ prepareRpcSDNCRollbackRequest(execution)
+ prepareRpcSDNCActivateRollback(execution)
+ } else {
+ prepareSDNCRollbackRequest(execution)
+ }
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
+ if (rollbackSDNCRequest != null) {
+ if (rollbackSDNCRequest != "") {
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ }
+ }
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+ }
+ }
+ String rollbackActivateSDNCRequest = execution.getVariable(Prefix + "rollbackActivateSDNCRequest")
+ if (rollbackActivateSDNCRequest != null) {
+ if (rollbackActivateSDNCRequest != "") {
+ rollbackData.put("rollbackActivateSDNCRequest", rollbackActivateSDNCRequest)
+ }
+ }
+ execution.setVariable("rollbackData", rollbackData)
+
+ utils.log("DEBUG", "** 'rollbackData' for Full Rollback : " + rollbackData, isDebugEnabled)
+ execution.setVariable("WorkflowException", null)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void setExceptionFlag(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside setExceptionFlag() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ execution.setVariable(Prefix + "isException", true)
+
+ if (execution.getVariable("SavedWorkflowException1") != null) {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
+ } else {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
+ }
+ utils.log("DEBUG", Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+
+ } catch(Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Exception in processJavaException method - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
new file mode 100644
index 0000000..0ad42f9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
@@ -0,0 +1,387 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>DoCreateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class DoCreateNetworkInstanceRollback extends AbstractServiceTaskProcessor {
+ String Prefix="CRENWKIR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ def className = getClass().getSimpleName()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", null)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", null)
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", null)
+ execution.setVariable(Prefix + "WorkflowException", null)
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ execution.setVariable(Prefix + "rollbackNetworkResponse", "")
+ execution.setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackSDNCRequest", "")
+ execution.setVariable(Prefix + "rollbackSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", "")
+ execution.setVariable(Prefix + "rollbackActivateSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackActivateSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "fullRollback", false)
+ execution.setVariable(Prefix + "networkId", "")
+ execution.setVariable(Prefix + "urlRollbackPoNetwork", "")
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + className + ".groovy ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // GET Incoming request/variables
+ String rollbackNetworkRequest = null
+ String rollbackSDNCRequest = null
+ String rollbackActivateSDNCRequest = null
+
+ // Partial Rollback
+ Map<String, String> rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData != null && rollbackData instanceof Map) {
+
+ if(rollbackData.containsKey("rollbackSDNCRequest")) {
+ rollbackSDNCRequest = rollbackData["rollbackSDNCRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackNetworkRequest")) {
+ rollbackNetworkRequest = rollbackData["rollbackNetworkRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackActivateSDNCRequest")) {
+ rollbackActivateSDNCRequest = rollbackData["rollbackActivateSDNCRequest"]
+ }
+
+ }
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", rollbackSDNCRequest)
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", rollbackActivateSDNCRequest)
+ utils.log("DEBUG", "'rollbackData': " + '\n' + execution.getVariable("rollbackData"), isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValuePO",encodedString)
+ execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
+
+ } catch (IOException ex) {
+ String exceptionMessage = "Exception Encountered in DoCreateNetworkInstance, PreProcessRequest() - "
+ String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage , isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ if (execution.getVariable("SavedWorkflowException1") != null) {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
+ } else {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
+ }
+ utils.log("DEBUG", "*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+ if(execution.getVariable(Prefix + "WorkflowException") != null) {
+ // called by: DoCreateNetworkInstance, partial rollback
+ execution.setVariable(Prefix + "fullRollback", false)
+
+ } else {
+ // called by: Macro - Full Rollback, WorkflowException = null
+ execution.setVariable(Prefix + "fullRollback", true)
+
+ }
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callPONetworkAdapter (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callPONetworkAdapter() of " + className + " ***** ", isDebugEnabled)
+
+ try {
+ String poUrl = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
+ String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
+ String networkId = utils.getNodeText1(rollbackSDNCRequest, "network-id")
+
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+
+ String urlRollbackPoNetwork = poUrl+ "/" + networkId + "/rollback"
+ utils.log("DEBUG", "'urlRollbackPoNetwork': " + urlRollbackPoNetwork, isDebugEnabled)
+ execution.setVariable(Prefix + "urlRollbackPoNetwork", urlRollbackPoNetwork)
+
+ RESTConfig config = new RESTConfig(urlRollbackPoNetwork)
+ RESTClient client = new RESTClient(config).
+ addHeader("Content-Type", "application/xml").
+ addAuthorizationHeader(execution.getVariable("BasicAuthHeaderValuePO"));
+
+ APIResponse response = client.httpDelete(rollbackNetworkRequest)
+ String responseCode = response.getStatusCode()
+ String responseBody = response.getResponseBodyAsString()
+
+ execution.setVariable(Prefix + "rollbackNetworkReturnCode", responseCode)
+ execution.setVariable(Prefix + "rollbackNetworkResponse", responseBody)
+
+ utils.log("DEBUG", " Network Adapter rollback responseCode: " + responseCode, isDebugEnabled)
+ utils.log("DEBUG", " Network Adapter rollback responseBody: " + responseBody, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Exception Encountered in callPONetworkAdapter() of DoCreateNetworkInstanceRollback flow - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ public void validateRollbackResponses (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRollbackResponses() of DoCreateNetworkInstanceRollback ***** ", isDebugEnabled)
+
+ try {
+ // validate PO network rollback response
+ String rollbackNetworkErrorMessages = ""
+ String rollbackNetworkReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackNetworkRequest") != null) {
+ rollbackNetworkReturnCode = execution.getVariable(Prefix + "rollbackNetworkReturnCode")
+ String rollbackNetworkResponse = execution.getVariable(Prefix + "rollbackNetworkResponse")
+ utils.log("DEBUG", " NetworkRollback Code - " + rollbackNetworkReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " NetworkRollback Response - " + rollbackNetworkResponse, isDebugEnabled)
+ if (rollbackNetworkReturnCode != "200") {
+ rollbackNetworkErrorMessages = " + PO Network rollback failed. "
+ } else {
+ rollbackNetworkErrorMessages = " + PO Network rollback completed."
+ }
+ }
+
+ // validate SDNC rollback response
+ String rollbackSdncErrorMessages = ""
+ String rollbackSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackSDNCRequest") != null) {
+ rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode")
+ String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse")
+ String rollbackSDNCReturnInnerCode = ""
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ rollbackSDNCResponse = sdncAdapterUtils.decodeXML(rollbackSDNCResponse)
+ rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+ rollbackSDNCReturnInnerCode = utils.getNodeText1(rollbackSDNCResponse, "response-code")
+ if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") {
+ rollbackSdncErrorMessages = " + SNDC assign rollback completed."
+ } else {
+ rollbackSdncErrorMessages = " + SDNC assign rollback failed. "
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SNDC assign rollback completed."
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SDNC assign rollback failed. "
+ }
+ utils.log("DEBUG", " SDNC assign rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC assign rollback Response - " + rollbackSDNCResponse, isDebugEnabled)
+ }
+
+ // validate SDNC activate rollback response
+ String rollbackActivateSdncErrorMessages = ""
+ String rollbackActivateSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackActivateSDNCRequest") != null) {
+ rollbackActivateSDNCReturnCode = execution.getVariable(Prefix + "rollbackActivateSDNCReturnCode")
+ String rollbackActivateSDNCResponse = execution.getVariable(Prefix + "rollbackActivateSDNCResponse")
+ String rollbackActivateSDNCReturnInnerCode = ""
+ rollbackActivateSDNCResponse = sdncAdapterUtils.decodeXML(rollbackActivateSDNCResponse)
+ rollbackActivateSDNCResponse = rollbackActivateSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackActivateSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackActivateSDNCResponse, "response-code")) {
+ rollbackActivateSDNCReturnInnerCode = utils.getNodeText1(rollbackActivateSDNCResponse, "response-code")
+ if (rollbackActivateSDNCReturnInnerCode == "200" || rollbackActivateSDNCReturnInnerCode == "" || rollbackActivateSDNCReturnInnerCode == "0") {
+ rollbackActivateSdncErrorMessages = " + SNDC activate rollback completed."
+ } else {
+ rollbackActivateSdncErrorMessages = " + SDNC activate rollback failed. "
+ }
+ } else {
+ rollbackActivateSdncErrorMessages = " + SNDC activate rollback completed."
+ }
+ } else {
+ rollbackActivateSdncErrorMessages = " + SDNC activate rollback failed. "
+ }
+ utils.log("DEBUG", " SDNC activate rollback Code - " + rollbackActivateSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC activate rollback Response - " + rollbackActivateSDNCResponse, isDebugEnabled)
+ }
+
+
+ String statusMessage = ""
+ int errorCode = 7000
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+ if (execution.getVariable(Prefix + "fullRollback") == false) {
+ // original WorkflowException,
+ WorkflowException wfe = execution.getVariable(Prefix + "WorkflowException")
+ if (wfe != null) {
+ // rollback due to failure in DoCreate - Partial rollback
+ statusMessage = wfe.getErrorMessage()
+ errorCode = wfe.getErrorCode()
+ } else {
+ statusMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ errorCode = '7000'
+ }
+
+ // set if all rolledbacks are successful
+ if (rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200" && rollbackActivateSDNCReturnCode == "200") {
+ execution.setVariable("rolledBack", true)
+ execution.setVariable("wasDeleted", true)
+
+ } else {
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("wasDeleted", true)
+ }
+
+ statusMessage = statusMessage + rollbackActivateSdncErrorMessages + rollbackNetworkErrorMessages + rollbackSdncErrorMessages
+ utils.log("DEBUG", "Final DoCreateNetworkInstanceRollback status message: " + statusMessage, isDebugEnabled)
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, errorCode, statusMessage);
+ execution.setVariable("workflowException", exception);
+
+ } else {
+ // rollback due to failures in Main flow (Macro) - Full rollback
+ // WorkflowException = null
+ if (rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200" && rollbackActivateSDNCReturnCode == "200") {
+ execution.setVariable("rollbackSuccessful", true)
+ execution.setVariable("rollbackError", false)
+ } else {
+ String exceptionMessage = "Network Create Rollback was not Successful. "
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ execution.setVariable("rollbackSuccessful", false)
+ execution.setVariable("rollbackError", true)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+
+ } catch (Exception ex) {
+ String errorMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstanceRollback flow. validateRollbackResponses() - " + errorMessage + ": " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Exception in processJavaException method - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
new file mode 100644
index 0000000..be26247
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
@@ -0,0 +1,506 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>DoCreateServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId
+ * @param - subscriptionServiceType
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceModelInfo
+ * @param - productFamilyId
+ * @param - disableRollback
+ * @param - failExists - TODO
+ * @param - serviceInputParams - Deferred/TODO
+ * @param - sdncVersion ("1610")
+ *
+ * Outputs:
+ * @param - rollbackData (localRB->null)
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ * @param - WorkflowException
+ * @param - serviceInstanceName - TODO (GET from AAI if null in input)
+ *
+ */
+public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DCRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ String msg = ""
+ utils.log("DEBUG"," ***** preProcessRequest *****", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix", Prefix)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+
+ //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData & SDNC assignToplology
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ //requestDetails.modelInfo. for AAI PUT servieInstanceData & SDNC assignTopology
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+
+ //requestDetails.requestParameters. for SDNC assignTopology
+ String productFamilyId = execution.getVariable("productFamilyId") //AAI productFamilyId
+
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(serviceModelInfo)) {
+ msg = "Input serviceModelInfo is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (productFamilyId == null) {
+ execution.setVariable("productFamilyId", "")
+ }
+
+ String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "URN_mso_workflow_sdncadapter_callback is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ utils.log("DEBUG","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+
+ String personaModelId = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantId")
+ String personaModelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion")
+
+ if (personaModelId == null) {
+ personaModelId = ""
+ }
+ if (personaModelVersion == null) {
+ personaModelVersion = ""
+ }
+ if (serviceInstanceName == null) {
+ execution.setVariable("serviceInstanceName", "")
+ serviceInstanceName = ""
+ }
+
+ //AAI PUT
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String serviceInstanceData =
+ """<service-instance xmlns=\"${namespace}\">
+ <service-instance-name>${serviceInstanceName}</service-instance-name>
+ <orchestration-status>active</orchestration-status>
+ <persona-model-id>${personaModelId}</persona-model-id>
+ <persona-model-version>${personaModelVersion}</persona-model-version>
+ </service-instance>""".trim()
+
+ execution.setVariable("serviceInstanceData", serviceInstanceData)
+ utils.logAudit(serviceInstanceData)
+ utils.log("DEBUG", " 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData, isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ //TODO: Will be able to replace with call to GenericGetService
+ public void getAAICustomerById (Execution execution) {
+ // https://{aaiEP}/aai/v8/business/customers/customer/{globalCustomerId}
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ String msg = ""
+ try {
+
+ String globalCustomerId = execution.getVariable("globalSubscriberId") //VID to AAI name map
+ utils.log("DEBUG"," ***** getAAICustomerById ***** globalCustomerId:" + globalCustomerId, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ if (isBlank(aai_endpoint) || isBlank(aai_uri))
+ {
+ msg = "AAI URL is invalid. Endpoint:" + aai_endpoint + aai_uri
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ String getAAICustomerUrl = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8")
+
+ utils.logAudit(getAAICustomerUrl)
+ utils.log("DEBUG", "getAAICustomerById Url:" + getAAICustomerUrl, isDebugEnabled)
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getAAICustomerUrl)
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msg = "getAAICustomerById ResponseCode:" + returnCode + " ResponseString:" + aaiResponseAsString
+ utils.log("DEBUG",msg, isDebugEnabled)
+ utils.logAudit(msg)
+
+ if (returnCode=='200') {
+ // Customer found by ID. FLow to proceed.
+ utils.log("DEBUG",msg, isDebugEnabled)
+
+ //TODO Deferred
+ //we might verify that service-subscription with matching name exists
+ //and throw error if not. If not checked, we will get exception in subsequent step on Create call
+ //in 1610 we assume both customer & service subscription were pre-created
+
+ } else {
+ if (returnCode=='404') {
+ msg = "GlobalCustomerId:" + globalCustomerId + " not found (404) in AAI"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ utils.log("ERROR", aaiResponseAsString)
+ WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", workflowException)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ msg = "Error in getAAICustomerById ResponseCode:" + returnCode
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in getAAICustomerById. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *****Exit getAAICustomerById *****", isDebugEnabled)
+
+ }
+
+ public void postProcessAAIGET(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIGET ***** ", isDebugEnabled)
+ String msg = ""
+
+ try {
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
+ if(succInAAI != true){
+ utils.log("DEBUG","Error getting Service-instance from AAI", + serviceInstanceName, isDebugEnabled)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ else
+ {
+ msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ else
+ {
+ boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
+ if(foundInAAI == true){
+ utils.log("DEBUG","Found Service-instance in AAI", isDebugEnabled)
+ msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
+ }
+
+ public void postProcessAAIPUT(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIPUT ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
+ if(succInAAI != true){
+ utils.log("DEBUG","Error putting Service-instance in AAI", + serviceInstanceId, isDebugEnabled)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ }
+ else
+ {
+ //start rollback set up
+ RollbackData rollbackData = new RollbackData()
+ def disableRollback = execution.getVariable("disableRollback")
+ rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString())
+ rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true")
+ rollbackData.put("SERVICEINSTANCE", "serviceInstanceId", serviceInstanceId)
+ rollbackData.put("SERVICEINSTANCE", "subscriptionServiceType", execution.getVariable("subscriptionServiceType"))
+ rollbackData.put("SERVICEINSTANCE", "globalSubscriberId", execution.getVariable("globalSubscriberId"))
+ execution.setVariable("rollbackData", rollbackData)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIDEL. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIPUT *** ", isDebugEnabled)
+ }
+
+ public void preProcessSDNCAssignRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ String msg = ""
+ utils.log("DEBUG"," ***** preProcessSDNCAssignRequest *****", isDebugEnabled)
+
+ try {
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ def serviceInstanceName = execution.getVariable("serviceInstanceName")
+ def callbackURL = execution.getVariable("sdncCallbackUrl")
+ def requestId = execution.getVariable("msoRequestId")
+ def serviceId = execution.getVariable("productFamilyId")
+ def subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ def globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+ def modelInvariantId = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantId")
+ def modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion")
+ def modelUUId = jsonUtil.getJsonValue(serviceModelInfo, "modelVersionId")
+ def modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName")
+ def sdncRequestId = UUID.randomUUID().toString()
+
+ if (modelInvariantId == null) {
+ modelInvariantId = ""
+ }
+ if (modelVersion == null) {
+ modelVersion = ""
+ }
+ if (modelUUId == null) {
+ modelUUId = ""
+ }
+ if (modelName == null) {
+ modelName = ""
+ }
+
+ String sdncAssignRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${sdncRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ <request-action>CreateServiceInstance</request-action>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <subscription-service-type>${subscriptionServiceType}</subscription-service-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantId}</model-invariant-uuid>
+ <model-uuid>${modelUUId}</model-uuid>
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ </service-information>
+ <service-request-input>
+ <service-instance-name>${serviceInstanceName}</service-instance-name>
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.log("DEBUG","sdncAssignRequest:\n" + sdncAssignRequest, isDebugEnabled)
+ sdncAssignRequest = utils.formatXml(sdncAssignRequest)
+ execution.setVariable("sdncAssignRequest", sdncAssignRequest)
+ utils.logAudit("sdncAssignRequest: " + sdncAssignRequest)
+
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncRollbackRequest = sdncAssignRequest.replace(">assign<", ">delete<").replace(">CreateServiceInstance<", ">DeleteServiceInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("SERVICEINSTANCE", "sdncRollbackRequest", sdncRollbackRequest)
+ execution.setVariable("rollbackData", rollbackData)
+
+ utils.log("DEBUG","sdncRollbackRequest:\n" + sdncRollbackRequest, isDebugEnabled)
+ utils.log("DEBUG","rollbackData:\n" + rollbackData.toString(), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCAssignRequest. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *****Exit preProcessSDNCAssignRequest *****", isDebugEnabled)
+ }
+
+ public void postProcessSDNCAssign (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessSDNCAssign ***** ", isDebugEnabled)
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ String response = execution.getVariable("sdncAdapterResponse")
+ utils.logAudit("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ utils.log("DEBUG","Good response from SDNC Adapter for service-instance topology assign: \n" + response, isDebugEnabled)
+
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("SERVICEINSTANCE", "rollbackSDNC", "true")
+ execution.setVariable("rollbackData", rollbackData)
+
+ }else{
+ utils.log("DEBUG","Bad Response from SDNC Adapter for service-instance assign", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessSDNCAssign. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessSDNCAssign *** ", isDebugEnabled)
+ }
+
+ public void preProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** preProcessRollback ***** ", isDebugEnabled)
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ utils.log("DEBUG", "BPMN Error during preProcessRollback", isDebugEnabled)
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit preProcessRollback *** ", isDebugEnabled)
+ }
+
+ public void postProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessRollback ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Setting prevException to WorkflowException: ", isDebugEnabled)
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ utils.log("DEBUG", "BPMN Error during postProcessRollback", isDebugEnabled)
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit postProcessRollback *** ", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
new file mode 100644
index 0000000..bc34987
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
@@ -0,0 +1,231 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+/**
+ * This groovy class supports the <class>DoCreateServiceInstanceRollback.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - rollbackData with
+ * globalCustomerId
+ * subscriptionServiceType
+ * serviceInstanceId
+ * disableRollback
+ * rollbackAAI
+ * rollbackSDNC
+ * sdncRollbackRequest
+ *
+ *
+ * Outputs:
+ * @param - rollbackError
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ *
+ */
+public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcessor{
+
+ String Prefix="DCRESIRB_"
+
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+ utils.log("DEBUG"," ***** preProcessRequest *****", isDebugEnabled)
+ execution.setVariable("rollbackAAI",false)
+ execution.setVariable("rollbackSDNC",false)
+
+ try {
+ def rollbackData = execution.getVariable("rollbackData")
+ utils.log("DEBUG", "RollbackData:" + rollbackData, isDebugEnabled)
+
+ if (rollbackData != null) {
+ if (rollbackData.hasType("SERVICEINSTANCE")) {
+
+ def serviceInstanceId = rollbackData.get("SERVICEINSTANCE", "serviceInstanceId")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ def subscriptionServiceType = rollbackData.get("SERVICEINSTANCE", "subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+
+ def globalSubscriberId = rollbackData.get("SERVICEINSTANCE", "globalSubscriberId")
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+
+ def rollbackAAI = rollbackData.get("SERVICEINSTANCE", "rollbackAAI")
+ if ("true".equals(rollbackAAI))
+ {
+ execution.setVariable("rollbackAAI",true)
+ }
+
+ def rollbackSDNC = rollbackData.get("SERVICEINSTANCE", "rollbackSDNC")
+ if ("true".equals(rollbackSDNC))
+ {
+ execution.setVariable("rollbackSDNC", true)
+ }
+
+ if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackSDNC") != true)
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ def sdncRollbackRequest = rollbackData.get("SERVICEINSTANCE", "sdncRollbackRequest")
+ execution.setVariable("sdncRollbackRequest", sdncRollbackRequest)
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ if (execution.getVariable("disableRollback").equals("true" ))
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in Create ServiceInstance Rollback preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void validateSDNCResponse(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** validateSDNCResponse ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ String response = execution.getVariable("sdncAdapterResponse")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ utils.log("DEBUG", "SDNC Adapter for service-instance delete for rollback successful. response", isDebugEnabled)
+ }else{
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("rollbackError", "Error Response from SDNC Adapter for service-instance delete for rollback")
+ utils.log("DEBUG","Error Response from SDNC Adapter for service-instance delete for rollback", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in Create ServiceInstance Rollback validateSDNCResponse " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit validateSDNCResponse ***** ", isDebugEnabled)
+ }
+
+ public void postProcessRequest(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessRequest ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ execution.setVariable("rollbackData", null)
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean rollbackAAI = execution.getVariable("rollbackAAI")
+ boolean rollbackSDNC = execution.getVariable("rollbackSDNC")
+ if (rollbackAAI == true || rollbackSDNC == true)
+ {
+ execution.setVariable("rolledBack", true)
+ }
+ if (rollbackAAI == true)
+ {
+ boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
+ if(succInAAI != true){
+ execution.setVariable("rolledBack", false) //both sdnc and aai must be successful to declare rollback Succesful
+ execution.setVariable("rollbackError", "Error deleting service-instance in AAI for rollback")
+ utils.log("DEBUG","Error deleting service-instance in AAI for rollback", + serviceInstanceId, isDebugEnabled)
+ }
+ }
+ utils.log("DEBUG","*** Exit postProcessRequest ***", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ } catch (Exception ex) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+
+ }
+
+ public void processRollbackException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** processRollbackException ***** ", isDebugEnabled)
+ try{
+ utils.log("DEBUG", "Caught an Exception in DoCreateServiceInstanceRollback", isDebugEnabled)
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught exception in ServiceInstance Create Rollback")
+ execution.setVariable("WorkflowException", null)
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "BPMN Error during processRollbackExceptions Method: ", isDebugEnabled)
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processRollbackExceptions Method: " + e.getMessage(), isDebugEnabled)
+ }
+
+ utils.log("DEBUG", " Exit processRollbackException", isDebugEnabled)
+ }
+
+ public void processRollbackJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** processRollbackJavaException ***** ", isDebugEnabled)
+ try{
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught Java exception in ServiceInstance Create Rollback")
+ utils.log("DEBUG", "Caught Exception in processRollbackJavaException", isDebugEnabled)
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception in processRollbackJavaException " + e.getMessage(), isDebugEnabled)
+ }
+ utils.log("DEBUG", "***** Exit processRollbackJavaException *****", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
new file mode 100644
index 0000000..739a9dd
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -0,0 +1,1678 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.springframework.web.util.UriUtils
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.NamedNodeMap
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+import org.xml.sax.InputSource
+
+
+
+public class DoCreateVfModule extends VfModuleBase {
+
+ String Prefix="DCVFM_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * 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{
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+
+ execution.setVariable("DCVFM_vnfParamsExistFlag", false)
+ execution.setVariable("DCVFM_oamManagementV4Address", "")
+ execution.setVariable("DCVFM_oamManagementV6Address", "")
+
+ String request = execution.getVariable("DoCreateVfModuleRequest")
+
+ if (request == null || request.isEmpty()) {
+ // Building Block-type request
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+
+ //tenantId
+ def tenantId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.tenantId")
+ execution.setVariable("DCVFM_tenantId", tenantId)
+ rollbackData.put("VFMODULE", "tenantid", tenantId)
+ //volumeGroupId
+ def volumeGroupId = execution.getVariable("volumeGroupId")
+ execution.setVariable("DCVFM_volumeGroupId", volumeGroupId)
+ //volumeGroupName
+ def volumeGroupName = execution.getVariable("volumeGroupName")
+ execution.setVariable("DCVFM_volumeGroupName", volumeGroupName)
+ //cloudSiteId
+ def cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("DCVFM_cloudSiteId", cloudSiteId)
+ rollbackData.put("VFMODULE", "aiccloudregion", cloudSiteId)
+ logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled)
+ //vnfType
+ def vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DCVFM_vnfType", vnfType)
+ rollbackData.put("VFMODULE", "vnftype", vnfType)
+ logDebug("vnfType: " + vnfType, isDebugLogEnabled)
+ //vnfName
+ def vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DCVFM_vnfName", vnfName)
+ rollbackData.put("VFMODULE", "vnfname", vnfName)
+ logDebug("vnfName: " + vnfName, isDebugLogEnabled)
+ //vnfId
+ def vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DCVFM_vnfId", vnfId)
+ rollbackData.put("VFMODULE", "vnfid", vnfId)
+ logDebug("vnfId: " + vnfId, isDebugLogEnabled)
+ //vfModuleName
+ def vfModuleName = execution.getVariable("vfModuleName")
+ execution.setVariable("DCVFM_vfModuleName", vfModuleName)
+ rollbackData.put("VFMODULE", "vfmodulename", vfModuleName)
+ logDebug("vfModuleName: " + vfModuleName, isDebugLogEnabled)
+ //vfModuleModelName
+ def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo.modelName")
+ execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName)
+ rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName)
+ logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled)
+ //modelCustomizationUuid
+ def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo.modelCustomizationId")
+ execution.setVariable("DCVFM_modelCustomizationUuid", modelCustomizationUuid)
+ rollbackData.put("VFMODULE", "modelcustomizationuuid", modelCustomizationUuid)
+ logDebug("modelCustomizationUuid: " + modelCustomizationUuid, isDebugLogEnabled)
+ //vfModuleId
+ def vfModuleId = execution.getVariable("vfModuleId")
+ execution.setVariable("DCVFM_vfModuleId", vfModuleId)
+ logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled)
+ def requestId = execution.getVariable("requestId")
+ execution.setVariable("DCVFM_requestId", requestId)
+ logDebug("requestId: " + requestId, isDebugLogEnabled)
+ // Set mso-request-id to request-id for VNF Adapter interface
+ execution.setVariable("mso-request-id", requestId)
+ //serviceId
+ def serviceId = execution.getVariable("serviceId")
+ execution.setVariable("DCVFM_serviceId", serviceId)
+ logDebug("serviceId: " + serviceId, isDebugLogEnabled)
+ //serviceInstanceId
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
+ rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
+ logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled)
+ //source - HARDCODED
+ def source = "VID"
+ execution.setVariable("DCVFM_source", source)
+ rollbackData.put("VFMODULE", "source", source)
+ logDebug("source: " + source, isDebugLogEnabled)
+ //backoutOnFailure
+ def disableRollback = execution.getVariable("disableRollback")
+ def backoutOnFailure = true
+ if (disableRollback != null && disableRollback.equals("true")) {
+ backoutOnFailure = false
+ }
+ execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
+ logDebug("backoutOnFailure: " + backoutOnFailure, isDebugLogEnabled)
+ //isBaseVfModule
+ def isBaseVfModule = execution.getVariable("isBaseVfModule")
+ execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule)
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
+ logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled)
+ //personaModelId
+ execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo.modelInvariantId"))
+ //personaModelVersion
+ execution.setVariable("DCVFM_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo.modelVersion"))
+ //Get or Generate UUID
+ String uuid = execution.getVariable("DCVFM_uuid")
+ if(uuid == null){
+ uuid = UUID.randomUUID()
+ logDebug("Generated messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }else{
+ logDebug("Found messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }
+ //isVidRequest
+ String isVidRequest = execution.getVariable("isVidRequest")
+ // default to true
+ if (isVidRequest == null || isVidRequest.isEmpty()) {
+ execution.setVariable("isVidRequest", "true")
+ }
+
+ String vnfParamsChildNodes = execution.getVariable("vfModuleInputParams")
+
+ }
+ else {
+ // The info is inside the request
+ utils.logAudit("DoCreateVfModule request: " + request)
+
+ //tenantId
+ def tenantId = ""
+ if (utils.nodeExists(request, "tenant-id")) {
+ tenantId = utils.getNodeText(request, "tenant-id")
+ }
+ execution.setVariable("DCVFM_tenantId", tenantId)
+ rollbackData.put("VFMODULE", "tenantid", tenantId)
+ //volumeGroupId
+ def volumeGroupId = ""
+ if (utils.nodeExists(request, "volume-group-id")) {
+ volumeGroupId = utils.getNodeText(request, "volume-group-id")
+ }
+ execution.setVariable("DCVFM_volumeGroupId", volumeGroupId)
+ //volumeGroupId
+ def volumeGroupName = ""
+ if (utils.nodeExists(request, "volume-group-name")) {
+ volumeGroupName = utils.getNodeText(request, "volume-group-name")
+ }
+ execution.setVariable("DCVFM_volumeGroupName", volumeGroupName)
+ //cloudSiteId
+ def cloudSiteId = ""
+ if (utils.nodeExists(request, "aic-cloud-region")) {
+ cloudSiteId = utils.getNodeText(request, "aic-cloud-region")
+ }
+ execution.setVariable("DCVFM_cloudSiteId", cloudSiteId)
+ rollbackData.put("VFMODULE", "aiccloudregion", cloudSiteId)
+ logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled)
+ //vnfType
+ def vnfType = ""
+ if (utils.nodeExists(request, "vnf-type")) {
+ vnfType = utils.getNodeText(request, "vnf-type")
+ }
+ execution.setVariable("DCVFM_vnfType", vnfType)
+ rollbackData.put("VFMODULE", "vnftype", vnfType)
+ logDebug("vnfType: " + vnfType, isDebugLogEnabled)
+ //vnfName
+ def vnfName = ""
+ if (utils.nodeExists(request, "vnf-name")) {
+ vnfName = utils.getNodeText(request, "vnf-name")
+ }
+ execution.setVariable("DCVFM_vnfName", vnfName)
+ rollbackData.put("VFMODULE", "vnfname", vnfName)
+ logDebug("vnfName: " + vnfName, isDebugLogEnabled)
+ //vnfId
+ def vnfId = ""
+ if (utils.nodeExists(request, "vnf-id")) {
+ vnfId = utils.getNodeText(request, "vnf-id")
+ }
+ execution.setVariable("DCVFM_vnfId", vnfId)
+ rollbackData.put("VFMODULE", "vnfid", vnfId)
+ logDebug("vnfId: " + vnfId, isDebugLogEnabled)
+ //vfModuleName
+ def vfModuleName = ""
+ if (utils.nodeExists(request, "vf-module-name")) {
+ vfModuleName = utils.getNodeText(request, "vf-module-name")
+ }
+ execution.setVariable("DCVFM_vfModuleName", vfModuleName)
+ rollbackData.put("VFMODULE", "vfmodulename", vfModuleName)
+ logDebug("vfModuleName: " + vfModuleName, isDebugLogEnabled)
+ //vfModuleModelName
+ def vfModuleModelName = ""
+ if (utils.nodeExists(request, "vf-module-model-name")) {
+ vfModuleModelName = utils.getNodeText(request, "vf-module-model-name")
+ }
+ execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName)
+ rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName)
+ logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled)
+ //modelCustomizationUuid
+ def modelCustomizationUuid = ""
+ if (utils.nodeExists(request, "model-customization-id")) {
+ modelCustomizationUuid = utils.getNodeText(request, "model-customization-id")
+ }
+ execution.setVariable("DCVFM_modelCustomizationUuid", modelCustomizationUuid)
+ rollbackData.put("VFMODULE", "modelcustomizationuuid", modelCustomizationUuid)
+ logDebug("modelCustomizationUuid: " + modelCustomizationUuid, isDebugLogEnabled)
+ //vfModuleId
+ def vfModuleId = ""
+ if (utils.nodeExists(request, "vf-module-id")) {
+ vfModuleId = utils.getNodeText(request, "vf-module-id")
+ }
+ execution.setVariable("DCVFM_vfModuleId", vfModuleId)
+ logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled)
+ def requestId = ""
+ if (utils.nodeExists(request, "request-id")) {
+ requestId = utils.getNodeText(request, "request-id")
+ }
+ execution.setVariable("DCVFM_requestId", requestId)
+ logDebug("requestId: " + requestId, isDebugLogEnabled)
+ //serviceId
+ def serviceId = ""
+ if (utils.nodeExists(request, "service-id")) {
+ serviceId = utils.getNodeText(request, "service-id")
+ }
+ execution.setVariable("DCVFM_serviceId", serviceId)
+ logDebug("serviceId: " + serviceId, isDebugLogEnabled)
+ //serviceInstanceId
+ def serviceInstanceId = ""
+ if (utils.nodeExists(request, "service-instance-id")) {
+ serviceInstanceId = utils.getNodeText(request, "service-instance-id")
+ }
+ execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
+ rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
+ logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled)
+ //source
+ def source = ""
+ if (utils.nodeExists(request, "source")) {
+ source = utils.getNodeText(request, "source")
+ }
+ execution.setVariable("DCVFM_source", source)
+ rollbackData.put("VFMODULE", "source", source)
+ logDebug("source: " + source, isDebugLogEnabled)
+ //backoutOnFailure
+ NetworkUtils networkUtils = new NetworkUtils()
+ def backoutOnFailure = networkUtils.isRollbackEnabled(execution,request)
+ execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
+ logDebug("backoutOnFailure: " + backoutOnFailure, isDebugLogEnabled)
+ //isBaseVfModule
+ def isBaseVfModule = "false"
+ if (utils.nodeExists(request, "is-base-vf-module")) {
+ isBaseVfModule = utils.getNodeText(request, "is-base-vf-module")
+ }
+ execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule)
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = ""
+ if (utils.nodeExists(request, "asdc-service-model-version")) {
+ asdcServiceModelVersion = utils.getNodeText(request, "asdc-service-model-version")
+ }
+ execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
+ logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled)
+
+ //personaModelId
+ def personaModelId = ""
+ if (utils.nodeExists(request, "persona-model-id")) {
+ personaModelId = utils.getNodeText(request, "persona-model-id")
+ }
+ execution.setVariable("DCVFM_personaModelId", personaModelId)
+ logDebug("personaModelId: " + personaModelId, isDebugLogEnabled)
+
+ //personaModelVersion
+ def personaModelVersion = ""
+ if (utils.nodeExists(request, "persona-model-version")) {
+ personaModelVersion = utils.getNodeText(request, "persona-model-version")
+ }
+ execution.setVariable("DCVFM_personaModelVersion", personaModelVersion)
+ logDebug("personaModelVersion: " + personaModelVersion, isDebugLogEnabled)
+
+ // Process the parameters
+
+ String vnfParamsChildNodes = utils.getChildNodes(request, "vnf-params")
+ if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
+ utils.log("DEBUG", "Request contains NO VNF Params", isDebugLogEnabled)
+ }else{
+ utils.log("DEBUG", "Request does contain VNF Params", isDebugLogEnabled)
+ execution.setVariable("DCVFM_vnfParamsExistFlag", true)
+
+ InputSource xmlSource = new InputSource(new StringReader(request));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document xml = docBuilder.parse(xmlSource)
+ //Get params, build map
+ Map<String, String> paramsMap = new HashMap<String, String>()
+ NodeList paramsList = xml.getElementsByTagNameNS("*", "param")
+
+ for (int z = 0; z < paramsList.getLength(); z++) {
+ Node node = paramsList.item(z)
+ String paramValue = node.getTextContent()
+ NamedNodeMap e = node.getAttributes()
+ String paramName = e.getNamedItem("name").getTextContent()
+ paramsMap.put(paramName, paramValue)
+ }
+ execution.setVariable("DCVFM_vnfParamsMap", paramsMap)
+ }
+ }
+
+ //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", "")
+ execution.setVariable("DCVFM_contrailNetworkPolicyFqdnList", "")
+ rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "false")
+ rollbackData.put("VFMODULE", "rollbackUpdateAAIVfModule", "false")
+ rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "false")
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "false")
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestAssign", "false")
+ rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "false")
+ rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "false")
+ rollbackData.put("VFMODULE", "rollbackUpdateVnfAAI", "false")
+
+ String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("DCVFM_sdncCallbackUrl", sdncCallbackUrl)
+ utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
+ logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugLogEnabled)
+
+
+ execution.setVariable("RollbackData", rollbackData)
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
+ }
+
+ 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") + "?depth=1"
+ utils.logAudit("AAI endPoint: " + endPoint)
+
+ try {
+ RESTConfig config = new RESTConfig(endPoint);
+ def responseData = ''
+ def aaiRequestId = UUID.randomUUID().toString()
+ RESTClient client = new RESTClient(config).
+ addHeader('X-TransactionId', aaiRequestId).
+ addHeader('X-FromAppId', 'MSO').
+ addHeader('Content-Type', 'application/xml').
+ addHeader('Accept','application/xml');
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ APIResponse response = client.httpGet()
+ utils.logAudit("createVfModule - invoking httpGet() to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+ }
+
+ utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
+ utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DCVFM_queryAAIVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ 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("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://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>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")
+ //modelCustomizationUuid
+ def modelCustomizationUuid = execution.getVariable("DCVFM_modelCustomizationUuid")
+
+ def messageId = execution.getVariable('mso-request-id') + '-' +
+ System.currentTimeMillis()
+
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ 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>
+ <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid>
+ <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("mso-request-id")
+
+ if (requestId == null) {
+ createWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
+ }
+
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ createWorkflowException(execution, 1002, processKey + " request message has no 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("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://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>VNFActivateRequest</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${svcInstId}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${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")
+ List contrailNetworkPolicyFqdnList = []
+ for (int i = 0; i< entries.getLength(); i++) {
+ Node node = entries.item(i)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element element = (Element) node
+ String key = element.getElementsByTagNameNS("*", "key").item(0).getTextContent()
+ if (key.equals("contrail-service-instance-fqdn")) {
+ String contrailServiceInstanceFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained contrailServiceInstanceFqdn: " + contrailServiceInstanceFqdn, isDebugLogEnabled)
+ execution.setVariable("DCVFM_contrailServiceInstanceFqdn", contrailServiceInstanceFqdn)
+ }
+ else if (key.endsWith("contrail_network_policy_fqdn")) {
+ String contrailNetworkPolicyFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn, isDebugLogEnabled)
+ contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn)
+ }
+ else if (key.equals("oam_management_v4_address")) {
+ String oamManagementV4Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained oamManagementV4Address: " + oamManagementV4Address, isDebugLogEnabled)
+ execution.setVariable("DCVFM_oamManagementV4Address", oamManagementV4Address)
+ }
+ else if (key.equals("oam_management_v6_address")) {
+ String oamManagementV6Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained oamManagementV6Address: " + oamManagementV6Address, isDebugLogEnabled)
+ execution.setVariable("DCVFM_oamManagementV6Address", oamManagementV6Address)
+ }
+
+ }
+ }
+ if (!contrailNetworkPolicyFqdnList.isEmpty()) {
+ execution.setVariable("DCVFM_contrailNetworkPolicyFqdnList", contrailNetworkPolicyFqdnList)
+ }
+ }
+ }else{
+ logDebug("Received a BAD Response from VNF Adapter for CREATE_VF_MODULE Call.", isDebugLogEnabled)
+ 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("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://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <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)
+
+ }
+
+ public void createNetworkPoliciesInAAI(Execution execution) {
+ def method = getClass().getSimpleName() + '.createNetworkPoliciesInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED createNetworkPoliciesInAAI ======== ", isDebugLogEnabled)
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList")
+ int fqdnCount = fqdnList.size()
+ def rollbackData = execution.getVariable("RollbackData")
+
+ execution.setVariable("DCVFM_networkPolicyFqdnCount", fqdnCount)
+ logDebug("DCVFM_networkPolicyFqdnCount - " + fqdnCount, isDebugLogEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ if (fqdnCount > 0) {
+
+ // AII loop call over contrail network policy fqdn list
+ for (i in 0..fqdnCount-1) {
+
+ int counting = i+1
+ String fqdn = fqdnList[i]
+
+ // Query AAI for this network policy FQDN
+
+ String queryNetworkPolicyByFqdnAAIRequest = "${aai_endpoint}${aai_uri}?network-policy-fqdn=" + UriUtils.encode(fqdn, "UTF-8")
+ utils.logAudit("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+
+ def aaiRequestId = UUID.randomUUID().toString()
+ RESTConfig config = new RESTConfig(queryNetworkPolicyByFqdnAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ int returnCode = response.getStatusCode()
+ execution.setVariable("DCVFM_aaiQqueryNetworkPolicyByFqdnReturnCode", returnCode)
+ logDebug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugLogEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ // This network policy FQDN already exists in AAI
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable("DCVFM_queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ logDebug(" QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugLogEnabled)
+
+ } else {
+ if (returnCode == 404) {
+ // This network policy FQDN is not in AAI yet. Add it now
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ logDebug("This network policy FQDN is not in AAI yet: " + fqdn, isDebugLogEnabled)
+ utils.logAudit("Network policy FQDN is not in AAI yet")
+ // Add the network policy with this FQDN to AAI
+ def networkPolicyId = UUID.randomUUID().toString()
+ logDebug("Adding network-policy with network-policy-id " + networkPolicyId, isDebugLogEnabled)
+
+ String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ logDebug('AAI namespace is: ' + aaiNamespace, isDebugLogEnabled)
+ String payload = """<network-policy xmlns="${aaiNamespace}">
+ <network-policy-id>${networkPolicyId}</network-policy-id>
+ <network-policy-fqdn>${fqdn}</network-policy-fqdn>
+ <heat-stack-id>${execution.getVariable("DCVFM_heatStackId")}</heat-stack-id>
+ </network-policy>""" as String
+
+ execution.setVariable("DCVFM_addNetworkPolicyAAIRequestBody", payload)
+
+ String addNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8")
+ utils.logAudit("AAI request endpoint: " + addNetworkPolicyAAIRequest)
+ logDebug("AAI request endpoint: " + addNetworkPolicyAAIRequest, isDebugLogEnabled)
+
+ def aaiRequestIdPut = UUID.randomUUID().toString()
+ RESTConfig configPut = new RESTConfig(addNetworkPolicyAAIRequest);
+ RESTClient clientPut = new RESTClient(configPut).addHeader("X-TransactionId", aaiRequestIdPut)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ logDebug("invoking PUT call to AAI with payload:"+System.lineSeparator()+payload, isDebugLogEnabled)
+ utils.logAudit("Sending PUT call to AAI with Endpoint /n" + addNetworkPolicyAAIRequest + " with payload /n" + payload)
+ APIResponse responsePut = clientPut.httpPut(payload)
+ int returnCodePut = responsePut.getStatusCode()
+ execution.setVariable("DCVFM_aaiAddNetworkPolicyReturnCode", returnCodePut)
+ logDebug(" ***** AAI add network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodePut, isDebugLogEnabled)
+
+ String aaiResponseAsStringPut = responsePut.getResponseBodyAsString()
+ if (isOneOf(returnCodePut, 200, 201)) {
+ logDebug("The return code from adding network policy is: " + returnCodePut, isDebugLogEnabled)
+ // This network policy was created in AAI successfully
+ utils.logAudit(aaiResponseAsStringPut)
+ execution.setVariable("DCVFM_addNetworkPolicyAAIResponse", aaiResponseAsStringPut)
+ logDebug(" AddAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsStringPut, isDebugLogEnabled)
+ rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "true")
+ rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn" + i, fqdn)
+ execution.setVariable("RollbackData", rollbackData)
+
+ } else {
+ // aai all errors
+ String putErrorMessage = "Unable to add network-policy to AAI createNetworkPoliciesInAAI - " + returnCodePut
+ logDebug(putErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, putErrorMessage)
+ }
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Response from createNetworkPoliciesInAAI - " + returnCode
+ logDebug(dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+
+ } else {
+ logDebug("No contrail network policies to query/create", isDebugLogEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateVfModule flow. createNetworkPoliciesInAAI() - " + ex.getMessage()
+ logDebug(exceptionMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def rollbackData = execution.getVariable("RollbackData")
+ def vnfId = execution.getVariable('DCVFM_vnfId')
+ def oamManagementV4Address = execution.getVariable("DCVFM_oamManagementV4Address")
+ def oamManagementV6Address = execution.getVariable("DCVFM_oamManagementV6Address")
+ def ipv4OamAddressElement = ''
+ def managementV6AddressElement = ''
+
+ if (oamManagementV4Address != null && !oamManagementV4Address.isEmpty()) {
+ ipv4OamAddressElement = '<ipv4-oam-address>' + oamManagementV4Address + '</ipv4-oam-address>'
+ }
+
+ if (oamManagementV6Address != null && !oamManagementV6Address.isEmpty()) {
+ managementV6AddressElement = '<management-v6-address>' + oamManagementV6Address + '</management-v6-address>'
+ }
+
+ rollbackData.put("VFMODULE", "oamManagementV4Address", oamManagementV4Address)
+
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable('DCVM_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Post process a result from invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void postProcessUpdateAAIGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.postProcessUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def rollbackData = execution.getVariable("RollbackData")
+
+ rollbackData.put("VFMODULE", "rollbackUpdateVnfAAI", "true")
+
+ def vnfId = execution.getVariable('DCVFM_vnfId')
+ def oamManagementV4Address = execution.getVariable("DCVFM_oamManagementV4Address")
+ def oamManagementV6Address = execution.getVariable("DCVFM_oamManagementV6Address")
+ def ipv4OamAddressElement = ''
+ def managementV6AddressElement = ''
+
+ if (oamManagementV4Address != null && !oamManagementV4Address.isEmpty()) {
+ rollbackData.put("VFMODULE", "oamManagementV4Address", oamManagementV4Address)
+ }
+
+ if (oamManagementV6Address != null && !oamManagementV6Address.isEmpty()) {
+ rollbackData.put("VFMODULE", "oamManagementV6Address", oamManagementV6Address)
+ }
+
+ execution.setVariable("RollbackData", rollbackData)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in postProcessUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
new file mode 100644
index 0000000..391b76a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
@@ -0,0 +1,487 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+
+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", "msorequestid")
+ execution.setVariable("DCVFMR_requestId", requestId)
+ List createdNetworkPolicyFqdnList = []
+ int i = 0
+ while (i < 100) {
+ String fqdn = rollbackData.get("VFMODULE", "contrailNetworkPolicyFqdn" + i)
+ if (fqdn == null) {
+ break
+ }
+ createdNetworkPolicyFqdnList.add(fqdn)
+ logDebug("got fqdn # " + i + ": " + fqdn, isDebugEnabled)
+ i = i + 1
+
+ }
+
+ execution.setVariable("DCVFMR_createdNetworkPolicyFqdnList", createdNetworkPolicyFqdnList)
+ String oamManagementV4Address = rollbackData.get("VFMODULE", "oamManagementV4Address")
+ execution.setVariable("DCVFMR_oamManagementV4Address", oamManagementV4Address)
+ String oamManagementV6Address = rollbackData.get("VFMODULE", "oamManagementV6Address")
+ execution.setVariable("DCVFMR_oamManagementV6Address", oamManagementV6Address)
+ //String serviceInstanceId = rollbackData.get("VFMODULE", "msoserviceinstanceid")
+ //execution.setVariable("DCVFMR_serviceInstanceId", serviceInstanceId)
+ execution.setVariable("DCVFMR_rollbackPrepareUpdateVfModule", rollbackData.get("VFMODULE", "rollbackPrepareUpdateVfModule"))
+ execution.setVariable("DCVFMR_rollbackUpdateAAIVfModule", rollbackData.get("VFMODULE", "rollbackUpdateAAIVfModule"))
+ execution.setVariable("DCVFMR_rollbackVnfAdapterCreate", rollbackData.get("VFMODULE", "rollbackVnfAdapterCreate"))
+ execution.setVariable("DCVFMR_rollbackSDNCRequestAssign", rollbackData.get("VFMODULE", "rollbackSDNCRequestAssign"))
+ execution.setVariable("DCVFMR_rollbackSDNCRequestActivate", rollbackData.get("VFMODULE", "rollbackSDNCRequestActivate"))
+ execution.setVariable("DCVFMR_rollbackCreateAAIVfModule", rollbackData.get("VFMODULE", "rollbackCreateAAIVfModule"))
+ execution.setVariable("DCVFMR_rollbackCreateNetworkPoliciesAAI", rollbackData.get("VFMODULE", "rollbackCreateNetworkPoliciesAAI"))
+ execution.setVariable("DCVFMR_rollbackUpdateVnfAAI", rollbackData.get("VFMODULE", "rollbackUpdateVnfAAI"))
+
+ // formulate the request for PrepareUpdateAAIVfModule
+ String request = """<PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>${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("DoCreateVfModuleRollback PrepareUpdateAAIVfModule Request: " + request)
+ 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 {
+ serviceInstanceIdToSdnc = vfModuleId
+ }
+
+ def doSDNCActivateRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestActivate")
+ def doSDNCAssignRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestAssign")
+
+ def action = ""
+ def requestAction = ""
+
+ if (doSDNCActivateRollback.equals("true")) {
+ action = "delete"
+ requestAction = "DisconnectVNFRequest"
+ }
+ else if (doSDNCAssignRollback.equals("true")) {
+ action = "rollback"
+ requestAction = "VNFActivateRequest"
+ }
+ else
+ return
+
+
+ String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${vfModuleId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>${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)
+ utils.logAudit("DoCreateVfModuleRollback sdncAdapterWorkflow Request: " + 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")
+ String requestId = UUID.randomUUID().toString()
+ String origRequestId = execution.getVariable("DCVFMR_requestId")
+ String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId")
+ String aicCloudRegion = execution.getVariable("DCVFMR_cloudSiteId")
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ String vfModuleStackId = execution.getVariable("DCVFMR_heatStackId")
+ String tenantId = execution.getVariable("DCVFMR_tenantId")
+ def messageId = execution.getVariable('mso-request-id') + '-' +
+ System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = 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("PrepareUpdateAAIVfModule vnfAdapterRestV1 Request: " + 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")
+ 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)
+ utils.logAudit("UpdateAAIVfModule Request: " + 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")
+ 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)
+ utils.logAudit("DeleteAAIVfModule Request: " + 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);
+ 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")
+ }
+ }
+
+ public void deleteNetworkPoliciesFromAAI(Execution execution) {
+ def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED deleteNetworkPoliciesFromAAI ======== ", isDebugLogEnabled)
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable(Prefix + "createdNetworkPolicyFqdnList")
+ if (fqdnList == null) {
+ logDebug("No network policies to delete", isDebugLogEnabled)
+ return
+ }
+ int fqdnCount = fqdnList.size()
+
+ execution.setVariable(Prefix + "networkPolicyFqdnCount", fqdnCount)
+ logDebug("networkPolicyFqdnCount - " + fqdnCount, isDebugLogEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ if (fqdnCount > 0) {
+ // AII loop call over contrail network policy fqdn list
+ for (i in 0..fqdnCount-1) {
+
+ int counting = i+1
+ String fqdn = fqdnList[i]
+
+ // Query AAI for this network policy FQDN
+
+ String queryNetworkPolicyByFqdnAAIRequest = "${aai_endpoint}${aai_uri}?network-policy-fqdn=" + UriUtils.encode(fqdn, "UTF-8")
+ utils.logAudit("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+ logDebug("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest, isDebugLogEnabled)
+
+ def aaiRequestId = UUID.randomUUID().toString()
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyByFqdnAAIRequest)
+ int returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQueryNetworkPolicyByFqdnReturnCode", returnCode)
+ logDebug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugLogEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ // This network policy FQDN exists in AAI - need to delete it now
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ logDebug("QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugLogEnabled)
+ // Retrieve the network policy id for this FQDN
+ def networkPolicyId = utils.getNodeText1(aaiResponseAsString, "network-policy-id")
+ logDebug("Deleting network-policy with network-policy-id " + networkPolicyId, isDebugLogEnabled)
+
+ // Retrieve the resource version for this network policy
+ def resourceVersion = utils.getNodeText1(aaiResponseAsString, "resource-version")
+ logDebug("Deleting network-policy with resource-version " + resourceVersion, isDebugLogEnabled)
+
+ String delNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8") +
+ "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+
+ utils.logAudit("AAI request endpoint: " + delNetworkPolicyAAIRequest)
+ logDebug("AAI request endpoint: " + delNetworkPolicyAAIRequest, isDebugLogEnabled)
+
+ def aaiRequestIdDel = UUID.randomUUID().toString()
+ logDebug("invoking DELETE call to AAI", isDebugLogEnabled)
+ utils.logAudit("Sending DELETE call to AAI with Endpoint /n" + delNetworkPolicyAAIRequest)
+
+ APIResponse responseDel = aaiUriUtil.executeAAIDeleteCall(execution, delNetworkPolicyAAIRequest)
+
+ int returnCodeDel = responseDel.getStatusCode()
+ execution.setVariable(Prefix + "aaiDeleteNetworkPolicyReturnCode", returnCodeDel)
+ logDebug(" ***** AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodeDel, isDebugLogEnabled)
+
+ if (isOneOf(returnCodeDel, 200, 201, 204)) {
+ logDebug("The return code from deleting network policy is: " + returnCodeDel, isDebugLogEnabled)
+ // This network policy was deleted from AAI successfully
+ logDebug(" DelAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : ", isDebugLogEnabled)
+
+ } else {
+ // aai all errors
+ String delErrorMessage = "Unable to delete network-policy to AAI deleteNetworkPoliciesFromAAI - " + returnCodeDel
+ logDebug(delErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, delErrorMessage)
+ }
+ } else if (returnCode == 404) {
+ // This network policy FQDN is not in AAI. No need to delete.
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ logDebug("This network policy FQDN is not in AAI: " + fqdn, isDebugLogEnabled)
+ utils.logAudit("Network policy FQDN is not in AAI")
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Response from deleteNetworkPoliciesFromAAI - " + returnCode
+ logDebug(dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+
+
+
+ } // end loop
+
+
+ } else {
+ logDebug("No contrail network policies to query/create", isDebugLogEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateVfModuleRollback flow. deleteNetworkPoliciesFromAAI() - " + ex.getMessage()
+ logDebug(exceptionMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessUpdateAAIGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessUpdateAAIGenericVnf((' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DCVFMR_vnfId')
+ def oamManagementV4Address = execution.getVariable(Prefix + 'oamManagementV4Address')
+ def oamManagementV6Address = execution.getVariable(Prefix + 'oamManagementV6Address')
+ def ipv4OamAddressElement = ''
+ def managementV6AddressElement = ''
+
+ if (oamManagementV4Address != null) {
+ ipv4OamAddressElement = '<ipv4-oam-address>' + 'DELETE' + '</ipv4-oam-address>'
+ }
+
+ if (oamManagementV6Address != null) {
+ managementV6AddressElement = '<management-v6-address>' + 'DELETE' + '</management-v6-address>'
+ }
+
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable(Prefix + 'updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in preProcessUpdateAAIGenericVnf((): ' + e.getMessage())
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy
new file mode 100644
index 0000000..f54fa5c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/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 org.openecomp.mso.bpmn.infrastructure.scripts
+
+import static org.camunda.spin.Spin.XML
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+class DoCreateVfModuleVolumeV1 extends VfModuleBase {
+
+ 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, 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("mso-request-id")
+ if (requestId == null || requestId == "") {
+ requestId = utils.getNodeText1(volumeRequest, "request-id")
+ }
+
+ //def serviceId = execution.getVariable("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 modelCustomizationId = getNodeTextForce(volumeRequest, "model-customization-id")
+
+ 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, modelCustomizationId)
+ 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')
+ def modelCustomizationId = getNodeTextForce(volumeRequest, "model-customization-id")
+
+ 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 = createCallbackURL(execution, "VNFAResponse", messageId)
+ 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>
+ <modelCustomizationUuid>${modelCustomizationId}</modelCustomizationUuid>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>${vnfId}</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>${vnfName}</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>${volumeGroupId}</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>${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)
+ utils.log('DEBUG', vnfSubCreateWorkflowRequestAsString, isDebugEnabled)
+ 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 modelCustomizationId = getNodeTextForce(requeryAAIVolGrpNameResponse, "vf-module-persona-model-customization-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, modelCustomizationId)
+ 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://org.openecomp.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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:mso-bpel-name>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/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy
new file mode 100644
index 0000000..23763c6
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -0,0 +1,414 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+
+
+/**
+ * This class supports the DoCreateVnf building block subflow
+ * with the creation of a generic vnf for
+ * infrastructure.
+ *
+ */
+class DoCreateVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="DoCVNF_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoCreateVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ // DISABLE SDNC INTERACTION FOR NOW
+ execution.setVariable("SDNCInteractionEnabled", false)
+
+
+ /*******************/
+ try{
+ // Get Variables
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("DoCVNF_requestId", requestId)
+ execution.setVariable("mso-request-id", requestId)
+ utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DoCVNF_serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DoCVNF_vnfType", vnfType)
+ utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled)
+
+ String vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DoCVNF_vnfName", vnfName)
+ utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+ String serviceId = execution.getVariable("productFamilyId")
+ execution.setVariable("DoCVNF_serviceId", serviceId)
+ utils.log("DEBUG", "Incoming Service Id is: " + serviceId, isDebugEnabled)
+
+ String source = "VID"
+ execution.setVariable("DoCVNF_source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ String suppressRollback = execution.getVariable("disableRollback")
+ execution.setVariable("DoCVNF_suppressRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String modelInvariantId = jsonUtil.getJsonValue(vnfModelInfo, "modelInvariantId")
+ execution.setVariable("DoCVNF_modelInvariantId", modelInvariantId)
+ utils.log("DEBUG", "Incoming Invariant Id is: " + modelInvariantId, isDebugEnabled)
+
+ String modelVersionId = jsonUtil.getJsonValue(vnfModelInfo, "modelVersionId")
+ if (modelVersionId == null) {
+ modelVersionId = ""
+ }
+ execution.setVariable("DoCVNF_modelVersionId", modelVersionId)
+ utils.log("DEBUG", "Incoming Version Id is: " + modelVersionId, isDebugEnabled)
+
+ String modelVersion = jsonUtil.getJsonValue(vnfModelInfo, "modelVersion")
+ execution.setVariable("DoCVNF_modelVersion", modelVersion)
+ utils.log("DEBUG", "Incoming Model Version is: " + modelVersion, isDebugEnabled)
+
+ String modelName = jsonUtil.getJsonValue(vnfModelInfo, "modelName")
+ execution.setVariable("DoCVNF_modelName", modelName)
+ utils.log("DEBUG", "Incoming Model Name is: " + modelName, isDebugEnabled)
+
+ String modelCustomizationId = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationId")
+ if (modelCustomizationId == null) {
+ modelCustomizationId = ""
+ }
+ execution.setVariable("DoCVNF_modelCustomizationId", modelCustomizationId)
+ utils.log("DEBUG", "Incoming Model Customization Id is: " + modelCustomizationId, isDebugEnabled)
+
+ String cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
+ execution.setVariable("DoCVNF_cloudSiteId", cloudSiteId)
+ utils.log("DEBUG", "Incoming Cloud Site Id is: " + cloudSiteId, isDebugEnabled)
+
+ String tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId")
+ execution.setVariable("DoCVNF_tenantId", tenantId)
+ utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("DoCVNF_requestInfo", requestInfo)
+ //TODO: Orch Status - TBD, will come from SDN-C Response in 1702
+ String orchStatus = "Created"
+ execution.setVariable("DoCVNF_orchStatus", orchStatus)
+
+ //TODO: Equipment Role - Should come from SDN-C Response in 1702
+ String equipmentRole = " "
+ execution.setVariable("DoCVNF_equipmentRole", equipmentRole)
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = execution.getVariable("vnfId")
+ if (isBlank(vnfId)) {
+ vnfId = UUID.randomUUID().toString()
+ utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+ }
+ }
+ execution.setVariable("DoCVNF_vnfId", vnfId)
+
+ // Setting for Sub Flow Calls
+ execution.setVariable("DoCVNF_type", "generic-vnf")
+ execution.setVariable("GENGS_type", "service-instance")
+
+ String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("DoCVNF_sdncCallbackUrl", sdncCallbackUrl)
+ utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
+ logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugEnabled)
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnf PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void prepareCreateGenericVnf (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DoCreateVnf PrepareCreateGenericVnf Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ def vnfName = execution.getVariable("DoCVNF_vnfName")
+ def vnfType = execution.getVariable("DoCVNF_vnfType")
+ def serviceId = execution.getVariable("DoCVNF_serviceId")
+ def orchStatus = execution.getVariable("DoCVNF_orchStatus")
+ def modelInvariantId = execution.getVariable("DoCVNF_modelInvariantId")
+ def modelVersion = execution.getVariable("DoCVNF_modelVersion")
+ def modelCustomizationId = execution.getVariable("DoCVNF_modelCustomizationId")
+ // TODO: 1702 Variable
+ def equipmentRole = execution.getVariable("DoCVNF_equipmentRole")
+
+ //Get Service Instance Info
+ def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+ String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
+
+ int custStart = siRelatedLink.indexOf("customer/")
+ int custEnd = siRelatedLink.indexOf("/service-subscriptions")
+ String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
+ int serviceStart = siRelatedLink.indexOf("service-subscription/")
+ int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+ String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+
+ //Get Namespace
+ AaiUtil aaiUtil = new AaiUtil(this)
+ def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+ String namespace = aaiUtil.getNamespaceFromUri(aai_uri)
+
+ String payload =
+ """<generic-vnf xmlns="${namespace}">
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-name>${vnfName}</vnf-name>
+ <service-id>${serviceId}</service-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <orchestration-status>${orchStatus}</orchestration-status>
+ <persona-model-id>${modelInvariantId}</persona-model-id>
+ <persona-model-version>${modelVersion}</persona-model-version>
+ <persona-model-customization-id>${modelCustomizationId}</persona-model-customization-id>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>${siRelatedLink}</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>${globalCustId}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>${serviceType}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>${serviceInstanceId}</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </generic-vnf>"""
+
+ execution.setVariable("DoCVNF_genericVnfPayload", payload)
+
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoCreateVnf PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PrepareCreateGenericVnf Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnf PrepareCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+ public void preProcessSDNCAssignRequest(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ def vnfId = execution.getVariable("DoCVNF_vnfId")
+ def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+ logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled)
+ utils.logAudit("NEW VNF ID: " + vnfId)
+
+ try{
+ //Build SDNC Request
+
+ String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("DoCVNF_assignSDNCRequest", assignSDNCRequest)
+ logDebug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessSDNCAssignRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void preProcessSDNCActivateRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ try{
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ String serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+
+ String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate")
+
+ execution.setVariable("DoCVNF_activateSDNCRequest", activateSDNCRequest)
+ logDebug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+
+ }catch(Exception e){
+ log.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ }
+
+ public String buildSDNCRequest(Execution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable("DoCVNF_sdncCallbackUrl")
+ def requestId = execution.getVariable("DoCVNF_requestId")
+ def serviceId = execution.getVariable("DoCVNF_serviceId")
+ def vnfType = execution.getVariable("DoCVNF_vnfType")
+ def vnfName = execution.getVariable("DoCVNF_vnfName")
+ def tenantId = execution.getVariable("DoCVNF_tenantId")
+ def source = execution.getVariable("DoCVNF_source")
+ def vnfId = execution.getVariable("DoCVNF_vnfId")
+ def cloudSiteId = execution.getVariable("DoCVNF_cloudSiteId")
+ def modelInvariantId = execution.getVariable("DoCVNF_modelInvariantId")
+ def modelVersionId = execution.getVariable("DoCVNF_modelVersionId")
+ def modelVersion = execution.getVariable("DoCVNF_modelVersion")
+ def modelName = execution.getVariable("DoCVNF_modelName")
+
+ String sdncVNFParamsXml = ""
+
+ if(execution.getVariable("DoCVNF_vnfParamsExistFlag") == true){
+ sdncVNFParamsXml = buildSDNCParamsXml(execution)
+ }else{
+ sdncVNFParamsXml = ""
+ }
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>VNFActivateRequest</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>${svcInstId}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantId}</model-invariant-uuid>
+ <model-uuid>${modelVersionId}</model-uuid>
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>
+ </vnf-information>
+ <vnf-request-information>
+ <vnf-name>${vnfName}</vnf-name>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ <tenant>${tenantId}</tenant>
+ ${sdncVNFParamsXml}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.logAudit("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(Execution execution, String response, String method){
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ utils.logAudit("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ utils.logAudit("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
+
+ }else{
+ logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+ }
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
new file mode 100644
index 0000000..e1fca3d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
@@ -0,0 +1,241 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.UUID;
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+
+/**
+ * This class supports the macro VID Flow
+ * with the creation of a generic vnf and related VF modules.
+ */
+class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
+
+ String Prefix="DCVAM_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ CatalogDbUtils cutils = new CatalogDbUtils()
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoCreateVnfAndModules PreProcessRequest Process*** ", isDebugEnabled)
+
+ try{
+ // Get Variables
+
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("mso-request-id", requestId)
+ utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfType = execution.getVariable("vnfType")
+ utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled)
+
+ String vnfName = execution.getVariable("vnfName")
+ execution.setVariable("CREVI_vnfName", vnfName)
+ utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+ String productFamilyId = execution.getVariable("productFamilyId")
+ utils.log("DEBUG", "Incoming Product Family Id is: " + productFamilyId, isDebugEnabled)
+
+ String source = "VID"
+ execution.setVariable("source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ String disableRollback = execution.getVariable("disableRollback")
+ utils.log("DEBUG", "Incoming Disable Rollback is: " + disableRollback, isDebugEnabled)
+
+ String asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ utils.log("DEBUG", "Incoming asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugEnabled)
+
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = execution.getVariable("vnfId")
+ if (isBlank(vnfId)) {
+ vnfId = UUID.randomUUID().toString()
+ utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+ }
+ }
+ execution.setVariable("vnfId", vnfId)
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnfAndModules PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnfAndModules PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void queryCatalogDB (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DoCreateVnfAndModules QueryCatalogDB Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String vnfModelCustomizationUuid = jsonUtil.getJsonValueForKey(vnfModelInfo, "modelCustomizationId")
+ utils.log("DEBUG", "querying Catalog DB by vnfModelCustomizationUuid: " + vnfModelCustomizationUuid)
+ String catalogDbEndpoint = execution.getVariable("URN_mso_catalog_db_endpoint")
+
+ JSONArray vnfs = cutils.getAllVnfsByVnfModelCustomizationUuid(catalogDbEndpoint,
+ vnfModelCustomizationUuid)
+ utils.log("DEBUG", "obtained VNF list")
+ // Only one match here
+ JSONObject vnf = vnfs[0]
+ JSONArray vfModules = vnf.getJSONArray("vfModules")
+ JSONArray addOnModules = new JSONArray()
+
+ // Set up base Vf Module info
+ for (int i = 0; i < vfModules.length(); i++) {
+ utils.log("DEBUG", "handling VF Module ")
+ JSONObject vfModule = vfModules[i]
+ String isBase = jsonUtil.getJsonValueForKey(vfModule, "isBase")
+ if (isBase.equals("true")) {
+ JSONObject baseVfModuleModelInfoObject = vfModule.getJSONObject("modelInfo")
+ String baseVfModuleModelInfo = baseVfModuleModelInfoObject.toString()
+ execution.setVariable("baseVfModuleModelInfo", baseVfModuleModelInfo)
+ String baseVfModuleLabel = jsonUtil.getJsonValueForKey(vfModule, "vfModuleLabel")
+ execution.setVariable("baseVfModuleLabel", baseVfModuleLabel)
+ String basePersonaModelId = jsonUtil.getJsonValueForKey(baseVfModuleModelInfoObject, "modelInvariantId")
+ execution.setVariable("basePersonaModelId", basePersonaModelId)
+ }
+ else {
+ addOnModules.add(vfModules[i])
+ }
+ }
+
+ execution.setVariable("addOnModules", addOnModules)
+ execution.setVariable("addOnModulesToDeploy", addOnModules.length())
+ execution.setVariable("addOnModulesDeployed", 0)
+
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoCreateVnfAndModules QueryCatalogDB Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnfAndModules QueryCatalogDB Process")
+ }
+
+ // Generate vfModuleId for base VF Module
+ def baseVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("baseVfModuleId", baseVfModuleId)
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+ public void preProcessAddOnModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessAddOnModule ======== ", isDebugLogEnabled)
+
+ try {
+ JSONArray addOnModules = (JSONArray) execution.getVariable("addOnModules")
+ int addOnIndex = (int) execution.getVariable("addOnModulesDeployed")
+
+ JSONObject addOnModule = addOnModules[addOnIndex]
+
+ def newVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("addOnVfModuleId", newVfModuleId)
+
+ execution.setVariable("instancesOfThisModelDeployed", 0)
+
+ JSONObject addOnVfModuleModelInfoObject = jsonUtil.getJsonValueForKey(addOnModule, "modelInfo")
+ String addOnVfModuleModelInfo = addOnVfModuleModelInfoObject.toString()
+ execution.setVariable("addOnVfModuleModelInfo", addOnVfModuleModelInfo)
+ String addOnVfModuleLabel = jsonUtil.getJsonValueForKey(addOnModule, "vfModuleLabel")
+ execution.setVariable("addOnVfModuleLabel", addOnVfModuleLabel)
+ String addOnPersonaModelId = jsonUtil.getJsonValueForKey(addOnVfModuleModelInfoObject, "modelInvariantId")
+ execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
+ String addOnInitialCount = jsonUtil.getJsonValueForKey(addOnModule, "initialCount")
+ execution.setVariable("initialCount", addOnInitialCount)
+
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void validateAddOnModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED validateAddOnModule ======== ", isDebugLogEnabled)
+
+ try {
+ int instancesOfThisModuleDeployed = execution.getVariable("instancesOfThisModuleDeployed")
+ execution.setVariable("instancesOfThisModuleDeployed", instancesOfThisModuleDeployed + 1)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void finishProcessingInitialCountDeployment(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED finishProcessingInitialCountDeployment ======== ", isDebugLogEnabled)
+
+ try {
+ int addOnModulesDeployed = execution.getVariable("addOnModulesDeployed")
+ execution.setVariable("addOnModulesDeployed", addOnModulesDeployed + 1)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
new file mode 100644
index 0000000..dbe3152
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
@@ -0,0 +1,1061 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
+ String Prefix= "DELNWKI_"
+ String groovyClassName = "DoDeleteNetworkInstance"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "networkRequest", "")
+ execution.setVariable(Prefix + "isSilentSuccess", false)
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "requestId", "")
+ execution.setVariable(Prefix + "source", "")
+ execution.setVariable(Prefix + "lcpCloudRegion", "")
+ execution.setVariable(Prefix + "networkInputs", "")
+ execution.setVariable(Prefix + "tenantId", "")
+
+ execution.setVariable(Prefix + "queryAAIRequest","")
+ execution.setVariable(Prefix + "queryAAIResponse", "")
+ execution.setVariable(Prefix + "aaiReturnCode", "")
+ execution.setVariable(Prefix + "isAAIGood", false)
+ execution.setVariable(Prefix + "isVfRelationshipExist", false)
+
+ // AAI query Cloud Region
+ execution.setVariable(Prefix + "queryCloudRegionRequest","")
+ execution.setVariable(Prefix + "queryCloudRegionReturnCode","")
+ execution.setVariable(Prefix + "queryCloudRegionResponse","")
+ execution.setVariable(Prefix + "cloudRegionPo","")
+ execution.setVariable(Prefix + "cloudRegionSdnc","")
+
+ execution.setVariable(Prefix + "deleteNetworkRequest", "")
+ execution.setVariable(Prefix + "deleteNetworkResponse", "")
+ execution.setVariable(Prefix + "networkReturnCode", "")
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+
+ execution.setVariable(Prefix + "deleteSDNCRequest", "")
+ execution.setVariable(Prefix + "deleteSDNCResponse", "")
+ execution.setVariable(Prefix + "sdncReturnCode", "")
+ execution.setVariable(Prefix + "sdncResponseSuccess", false)
+
+ execution.setVariable(Prefix + "deactivateSDNCRequest", "")
+ execution.setVariable(Prefix + "deactivateSDNCResponse", "")
+ execution.setVariable(Prefix + "deactivateSdncReturnCode", "")
+ execution.setVariable(Prefix + "isSdncDeactivateRollbackNeeded", "")
+
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", "")
+ execution.setVariable(Prefix + "isException", false)
+
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + groovyClassName + " Request ***** ", isDebugEnabled)
+
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ try {
+ // get incoming message/input
+ execution.setVariable("action", "DELETE")
+ String deleteNetwork = execution.getVariable("bpmnRequest")
+ if (deleteNetwork != null) {
+ if (deleteNetwork.contains("requestDetails")) {
+ // JSON format request is sent, create xml
+ try {
+ def prettyJson = JsonOutput.prettyPrint(deleteNetwork.toString())
+ utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
+ deleteNetwork = vidUtils.createXmlNetworkRequestInfra(execution, deleteNetwork)
+
+ } catch (Exception ex) {
+ String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ } else {
+ // XML format request is sent
+
+ }
+ } else {
+ // vIPR format request is sent, create xml from individual variables
+ deleteNetwork = vidUtils.createXmlNetworkRequestInstance(execution)
+ }
+
+ deleteNetwork = utils.formatXml(deleteNetwork)
+ utils.logAudit(deleteNetwork)
+ execution.setVariable(Prefix + "networkRequest", deleteNetwork)
+ utils.log("DEBUG", Prefix + "networkRequest - " + '\n' + deleteNetwork, isDebugEnabled)
+
+ // validate 'backout-on-failure' to override 'URN_mso_rollback'
+ boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, deleteNetwork)
+ execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
+ utils.log("DEBUG", Prefix + "rollbackEnabled - " + rollbackEnabled, isDebugEnabled)
+
+ String networkInputs = utils.getNodeXml(deleteNetwork, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+ execution.setVariable(Prefix + "networkInputs", networkInputs)
+
+ // prepare messageId
+ String messageId = execution.getVariable("testMessageId") // for testing
+ if (messageId == null || messageId == "") {
+ messageId = UUID.randomUUID()
+ utils.log("DEBUG", Prefix + "messageId, random generated: " + messageId, isDebugEnabled)
+ } else {
+ utils.log("DEBUG", Prefix + "messageId, pre-assigned: " + messageId, isDebugEnabled)
+ }
+ execution.setVariable(Prefix + "messageId", messageId)
+
+ String source = utils.getNodeText1(deleteNetwork, "source")
+ execution.setVariable(Prefix + "source", source)
+ utils.log("DEBUG", Prefix + "source - " + source, isDebugEnabled)
+
+ String networkId = ""
+ if (utils.nodeExists(networkInputs, "network-id")) {
+ networkId = utils.getNodeText1(networkInputs, "network-id")
+ if (networkId == null || networkId == "" || networkId == 'null' ) {
+ sendSyncError(execution)
+ // missing value of network-id
+ String dataErrorMessage = "network-request has missing 'network-id' element/value."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ }
+
+ // lcpCloudRegion or tenantId not sent, will be extracted from query AA&I
+ def lcpCloudRegion = null
+ if (utils.nodeExists(networkInputs, "aic-cloud-region")) {
+ lcpCloudRegion = utils.getNodeText(networkInputs, "aic-cloud-region")
+ if (lcpCloudRegion == 'null') {
+ lcpCloudRegion = null
+ }
+ }
+ execution.setVariable(Prefix + "lcpCloudRegion", lcpCloudRegion)
+ utils.log("DEBUG", "lcpCloudRegion : " + lcpCloudRegion, isDebugEnabled)
+
+ String tenantId = null
+ if (utils.nodeExists(networkInputs, "tenant-id")) {
+ tenantId = utils.getNodeText1(networkInputs, "tenant-id")
+ if (tenantId == 'null') {
+ tenantId = null
+ }
+
+ }
+ execution.setVariable(Prefix + "tenantId", tenantId)
+ utils.log("DEBUG", "tenantId : " + tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValuePO",encodedString)
+ execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
+
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, , isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DoDeleteNetworkInstance, PreProcessRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void callRESTQueryAAI (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAI() of DoDoDeleteNetworkInstance ***** " , isDebugEnabled)
+
+ // get variables
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String networkId = utils.getNodeText(networkInputs, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
+ utils.logAudit(queryAAIRequest)
+ execution.setVariable(Prefix + "queryAAIRequest", queryAAIRequest)
+ utils.log("DEBUG", Prefix + "AAIRequest - " + "\n" + queryAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryAAIRequest);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ Boolean isVfRelationshipExist = false
+ try {
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiReturnCode", returnCode)
+
+ utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryAAIResponse", aaiResponseAsString)
+
+ if (returnCode=='200' || returnCode=='204') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "isAAIGood", true)
+ utils.log("DEBUG", " AAI Query Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+ // verify if vf or vnf relationship exist
+ if (utils.nodeExists(aaiResponseAsString, "relationship")) {
+ NetworkUtils networkUtils = new NetworkUtils()
+ isVfRelationshipExist = networkUtils.isVfRelationshipExist(aaiResponseAsString)
+ execution.setVariable(Prefix + "isVfRelationshipExist", isVfRelationshipExist)
+ if (isVfRelationshipExist == true) {
+ String relationshipMessage = "AAI Query Success Response but 'vf-module' relationship exist, not allowed to delete: network Id: " + networkId
+ exceptionUtil.buildWorkflowException(execution, 2500, relationshipMessage)
+
+ } else {
+ // verify if lcpCloudRegion was sent as input, if not get value from AAI Response
+ if (execution.getVariable(Prefix + "lcpCloudRegion") == null ) {
+ String lcpCloudRegion = networkUtils.getCloudRegion(aaiResponseAsString)
+ execution.setVariable(Prefix + "lcpCloudRegion", lcpCloudRegion)
+ utils.log("DEBUG", " Get AAI getCloudRegion() : " + lcpCloudRegion, isDebugEnabled)
+ }
+ if (execution.getVariable(Prefix + "tenantId") == null ) {
+ String tenantId = networkUtils.getTenantId(aaiResponseAsString)
+ execution.setVariable(Prefix + "tenantId", tenantId)
+ utils.log("DEBUG", " Get AAI getTenantId() : " + tenantId, isDebugEnabled)
+ }
+
+ }
+ }
+ utils.log("DEBUG", Prefix + "isVfRelationshipExist - " + isVfRelationshipExist, isDebugEnabled)
+
+ } else {
+ execution.setVariable(Prefix + "isAAIGood", false)
+ if (returnCode=='404' || aaiResponseAsString == "" || aaiResponseAsString == null) {
+ // not found // empty aai response
+ execution.setVariable(Prefix + "isSilentSuccess", true)
+ utils.log("DEBUG", " AAI Query is Silent Success", isDebugEnabled)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Error Response from callRESTQueryAAI() - " + returnCode
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ utils.log("DEBUG", " AAI Query call, isAAIGood? : " + execution.getVariable(Prefix + "isAAIGood"), isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DoDeleteNetworkInstance, callRESTQueryAAI() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAICloudRegion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of DoDeleteNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ // String cloudRegion = utils.getNodeText(networkInputs, "aic-cloud-region")
+ String cloudRegion = execution.getVariable(Prefix + "lcpCloudRegion")
+ cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ utils.logAudit(queryCloudRegionRequest)
+ execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", Prefix + "queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+ String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+ String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion)
+
+ if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
+ execution.setVariable(Prefix + "cloudRegionPo", cloudRegionPo)
+ execution.setVariable(Prefix + "cloudRegionSdnc", cloudRegionSdnc)
+
+ } else {
+ String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable(Prefix + "queryCloudRegionReturnCode")
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, callRESTQueryAAICloudRegion(). Unexpected Response from AAI - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareNetworkRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareNetworkRequest of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ try {
+ // get variables
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String cloudSiteId = execution.getVariable(Prefix + "cloudRegionPo")
+ String tenantId = execution.getVariable(Prefix + "tenantId")
+
+ String queryAAIResponse = execution.getVariable(Prefix + "queryAAIResponse")
+ String networkType = utils.getNodeText1(queryAAIResponse, "network-type")
+ String networkId = utils.getNodeText1(queryAAIResponse, "network-id")
+ String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled")
+
+ String networkStackId = ""
+ networkStackId = utils.getNodeText1(queryAAIResponse, "heat-stack-id")
+ if (networkStackId == 'null' || networkStackId == "") {
+ networkStackId = "force_delete"
+ }
+
+ String requestId = execution.getVariable(Prefix + "requestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // Added new Elements
+ String messageId = execution.getVariable(Prefix + "messageId")
+ String notificationUrl = "" //TODO - is this coming from URN? What variable/value to use?
+ //String notificationUrl = execution.getVariable("URN_?????") //TODO - is this coming from URN? What variable/value to use?
+
+ String 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", Prefix + "deleteNetworkRequest - " + "\n" + deleteNetworkRequest, isDebugEnabled)
+ // Format Response
+ String buildDeleteNetworkRequestAsString = utils.formatXml(deleteNetworkRequest)
+ utils.logAudit(buildDeleteNetworkRequestAsString)
+ utils.log("DEBUG", Prefix + "deleteNetworkRequestAsString - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
+
+ String restURL = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
+ execution.setVariable("URN_mso_adapters_network_rest_endpoint", restURL + "/" + networkId)
+ utils.log("DEBUG", "URN_mso_adapters_network_rest_endpoint - " + "\n" + restURL + "/" + networkId, isDebugEnabled)
+
+ execution.setVariable(Prefix + "deleteNetworkRequest", buildDeleteNetworkRequestAsString)
+ utils.log("DEBUG", Prefix + "deleteNetworkRequest - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
+ }
+ catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareNetworkRequest(). Unexpected Response from AAI - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ /**
+ * This method is used instead of an HTTP Connector task because the
+ * connector does not allow DELETE with a body.
+ */
+ public void sendRequestToVnfAdapter(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugEnabled)
+
+ try {
+
+ String vnfAdapterUrl = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
+ String vnfAdapterRequest = execution.getVariable(Prefix + "deleteNetworkRequest")
+
+ RESTConfig config = new RESTConfig(vnfAdapterUrl)
+ RESTClient client = new RESTClient(config).
+ addHeader("Content-Type", "application/xml").
+ addAuthorizationHeader(execution.getVariable("BasicAuthHeaderValuePO"));
+
+ APIResponse response;
+
+ response = client.httpDelete(vnfAdapterRequest)
+
+ execution.setVariable(Prefix + "networkReturnCode", response.getStatusCode())
+ execution.setVariable(Prefix + "deleteNetworkResponse", response.getResponseBodyAsString())
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, sendRequestToVnfAdapter() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+
+ public void prepareSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRequest of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ String queryAAIResponse = execution.getVariable(Prefix + "queryAAIResponse")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyDeleteRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "delete", "DisconnectNetworkRequest", cloudRegionId, networkId, queryAAIResponse, null)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "deleteSDNCRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("DEBUG", Prefix + "deleteSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRequest() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCRequest of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "unassign", "DeleteNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "deleteSDNCRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("DEBUG", Prefix + "deleteSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRequest() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void prepareRpcSDNCDeactivate(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCDeactivate() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
+
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "deactivate", "DeleteNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "deactivateSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology deactivate - " + "\n" + sndcTopologyRollbackRpcRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCActivateRollback() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void validateNetworkResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateNetworkResponse of DoDeleteNetworkInstance *****", isDebugEnabled)
+
+ try {
+ String returnCode = execution.getVariable(Prefix + "networkReturnCode")
+ String networkResponse = execution.getVariable(Prefix + "deleteNetworkResponse")
+
+ utils.log("DEBUG", " Network Adapter responseCode: " + returnCode, isDebugEnabled)
+ utils.log("DEBUG", "Network Adapter Response - " + "\n" + networkResponse, isDebugEnabled)
+ utils.logAudit(networkResponse)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ utils.log("DEBUG", " Network Adapter Response is successful - " + "\n" + networkResponse, isDebugEnabled)
+
+ // prepare rollback data
+ String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
+ if ((rollbackData == null) || (rollbackData.isEmpty())) {
+ utils.log("DEBUG", " Network Adapter 'rollback' data is not Sent: " + "\n" + networkResponse, isDebugEnabled)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ } else {
+ String rollbackNetwork =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network">
+ ${rollbackData}
+ </NetworkAdapter:rollbackNetwork>"""
+ String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkXml)
+ utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled)
+ }
+
+
+ } else { // network error
+ if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) { //4xx, 5xx
+ if (networkResponse.contains("deleteNetworkError") ) {
+ networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '')
+ errorMessage = utils.getNodeText1(networkResponse, "message")
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ } else { // CatchAll exception
+ if (returnCode == "500") {
+ errorMessage = "JBWEB000065: HTTP Status 500."
+ } else {
+ errorMessage = "Return code is " + returnCode
+ }
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ }
+
+ } else { // CatchAll exception
+ String dataErrorMessage = "Received error from Network Adapter. Return code is: " + returnCode
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, validateNetworkResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void validateSDNCResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateSDNCResponse of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ String response = execution.getVariable(Prefix + "deleteSDNCResponse")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String deleteSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "deleteSDNCResponse"))
+ deleteSDNCResponseDecodeXml = deleteSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "deleteSDNCResponse", deleteSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncRollbackNeeded", true) //
+ execution.setVariable(Prefix + "isPONR", true)
+ utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void validateRpcSDNCDeactivateResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRpcSDNCDeactivateResponse() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ String response = execution.getVariable(Prefix + "deactivateSDNCResponse")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String assignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "deactivateSDNCResponse"))
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "deactivateSDNCResponse", assignSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, Prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncDeactivateRollbackNeeded", true)
+ utils.log("DEBUG", "Successfully Validated Rpc SDNC Activate Response", isDebugEnabled)
+
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated Rpc SDNC Deactivate Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void prepareRpcSDNCDeactivateRollback(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCDeactivateRollback() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String deactivateSDNCResponse = execution.getVariable(Prefix + "deactivateSDNCResponse")
+ String networkId = utils.getNodeText1(deactivateSDNCResponse, "network-id")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
+
+ // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "activate", "ActivateNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology 'activate-ActivateNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCDeactivateRollback() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRollbackData() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
+ }
+ }
+ String rollbackDeactivateSDNCRequest = execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")
+ if (rollbackDeactivateSDNCRequest != null) {
+ if (rollbackDeactivateSDNCRequest != "") {
+ rollbackData.put("rollbackDeactivateSDNCRequest", execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest"))
+ }
+ }
+ execution.setVariable("rollbackData", rollbackData)
+ utils.log("DEBUG", "** rollbackData : " + rollbackData, isDebugEnabled)
+
+ execution.setVariable("WorkflowException", execution.getVariable("WorkflowException"))
+ utils.log("DEBUG", "** WorkflowException : " + execution.getVariable("WorkflowException"), isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ utils.log("DEBUG", " ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"), isDebugEnabled)
+ if (execution.getVariable(Prefix + "isException") == false) {
+ execution.setVariable(Prefix + "Success", true)
+ execution.setVariable("WorkflowException", null)
+ if (execution.getVariable(Prefix + "isSilentSuccess") == true) {
+ execution.setVariable("rolledBack", false)
+ } else {
+ execution.setVariable("rolledBack", true)
+ }
+ prepareSuccessRollbackData(execution) // populate rollbackData
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ execution.setVariable("rollbackData", null)
+ String exceptionMessage = " Exception encountered in MSO Bpmn. "
+ if (execution.getVariable("workflowException") != null) { // Output of Rollback flow.
+ utils.log("DEBUG", " ***** workflowException: " + execution.getVariable("workflowException"), isDebugEnabled)
+ WorkflowException wfex = execution.getVariable("workflowException")
+ exceptionMessage = wfex.getErrorMessage()
+ } else {
+ if (execution.getVariable(Prefix + "WorkflowException") != null) {
+ WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException")
+ exceptionMessage = pwfex.getErrorMessage()
+ }
+ }
+ // going to the Main flow: a-la-carte or macro
+ utils.log("DEBUG", " ***** postProcessResponse(), BAD !!!", isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+
+ }
+
+ } catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+
+ }
+
+ }
+
+ public void prepareSuccessRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSuccessRollbackData() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ if (execution.getVariable("sdncVersion") == '1702') {
+ prepareRpcSDNCDeactivateRollback(execution)
+ prepareRpcSDNCUnassignRollback(execution)
+ } else {
+ prepareSDNCRollback(execution)
+ }
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
+ if (rollbackSDNCRequest != null) {
+ if (rollbackSDNCRequest != "") {
+ rollbackData.put("rollbackSDNCRequest", execution.getVariable(Prefix + "rollbackSDNCRequest"))
+ }
+ }
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
+ }
+ }
+ String rollbackDeactivateSDNCRequest = execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")
+ if (rollbackDeactivateSDNCRequest != null) {
+ if (rollbackDeactivateSDNCRequest != "") {
+ rollbackData.put("rollbackDeactivateSDNCRequest", execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest"))
+ }
+ }
+ execution.setVariable("rollbackData", rollbackData)
+
+ utils.log("DEBUG", "** rollbackData : " + rollbackData, isDebugEnabled)
+ execution.setVariable("WorkflowException", null)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCUnassignRollback(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCUnassignRollbac() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String deleteSDNCResponse = execution.getVariable(Prefix + "deleteSDNCResponse")
+ String networkId = utils.getNodeText1(deleteSDNCResponse, "network-id")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "assign", "CreateNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("DEBUG", Prefix + "rollbackSDNCRequest" + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology 'assign-CreateNetworkInstance' rollback . . . - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCUnassignRollback() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSDNCRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRollback of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ String queryAAIResponse = execution.getVariable(Prefix + "queryAAIResponse")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyDeleteRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "rollback", "DisconnectNetworkRequest", cloudRegionId, networkId, queryAAIResponse, null)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("DEBUG", Prefix + "rollbackSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology 'rollback-DisconnectNetworkRequest' rollback . . . - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRollback() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void setExceptionFlag(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside setExceptionFlag() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ execution.setVariable(Prefix + "isException", true)
+
+ if (execution.getVariable("SavedWorkflowException1") != null) {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
+ } else {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
+ }
+ utils.log("DEBUG", Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+
+ } catch(Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method of " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
new file mode 100644
index 0000000..5863fdc
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
@@ -0,0 +1,335 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>DoCreateNetworkInstanceRollback.bpmn</class> process.
+ *
+ */
+public class DoDeleteNetworkInstanceRollback extends AbstractServiceTaskProcessor {
+ String Prefix="DELNWKIR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ def className = getClass().getSimpleName()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoDeleteNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "WorkflowException", null)
+
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", null)
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackSDNCRequest", "")
+ execution.setVariable(Prefix + "rollbackSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", null)
+ execution.setVariable(Prefix + "rollbackNetworkResponse", "")
+ execution.setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "fullRollback", false)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoDeleteNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + className + ".groovy ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // GET Incoming request/variables
+ String rollbackDeactivateSDNCRequest = null
+ String rollbackSDNCRequest = null
+ String rollbackNetworkRequest = null
+
+ Map<String, String> rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData != null && rollbackData instanceof Map) {
+
+ if(rollbackData.containsKey("rollbackDeactivateSDNCRequest")) {
+ rollbackDeactivateSDNCRequest = rollbackData["rollbackDeactivateSDNCRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackSDNCRequest")) {
+ rollbackSDNCRequest = rollbackData["rollbackSDNCRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackNetworkRequest")) {
+ rollbackNetworkRequest = rollbackData["rollbackNetworkRequest"]
+ }
+ }
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", rollbackSDNCRequest)
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", rollbackDeactivateSDNCRequest)
+ utils.log("DEBUG", "'rollbackData': " + '\n' + execution.getVariable("rollbackData"), isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValuePO",encodedString)
+ execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
+
+ } catch (IOException ex) {
+ String exceptionMessage = "Exception Encountered in DoCreateNetworkInstance, PreProcessRequest() - "
+ String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage , isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ if (execution.getVariable("SavedWorkflowException1") != null) {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
+ } else {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
+ }
+ utils.log("DEBUG", "*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+ if(execution.getVariable(Prefix + "WorkflowException") != null) {
+ // called by: DoCreateNetworkInstance, partial rollback
+ execution.setVariable(Prefix + "fullRollback", false)
+
+ } else {
+ // called by: Macro - Full Rollback, WorkflowException = null
+ execution.setVariable(Prefix + "fullRollback", true)
+
+ }
+
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ // caught exception
+ String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void validateRollbackResponses (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRollbackResponses() of DoDeleteNetworkInstanceRollback ***** ", isDebugEnabled)
+
+ try {
+
+ // validate SDNC activate response
+ String rollbackDeactivateSDNCMessages = ""
+ String rollbackDeactivateSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest") != null) {
+ rollbackDeactivateSDNCReturnCode = execution.getVariable(Prefix + "rollbackDeactivateSDNCReturnCode")
+ String rollbackDeactivateSDNCResponse = execution.getVariable(Prefix + "rollbackDeactivateSDNCResponse")
+ String rollbackDeactivateSDNCReturnInnerCode = ""
+ rollbackDeactivateSDNCResponse = sdncAdapterUtils.decodeXML(rollbackDeactivateSDNCResponse)
+ rollbackDeactivateSDNCResponse = rollbackDeactivateSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackDeactivateSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackDeactivateSDNCResponse, "response-code")) {
+ rollbackDeactivateSDNCReturnInnerCode = utils.getNodeText1(rollbackDeactivateSDNCResponse, "response-code")
+ if (rollbackDeactivateSDNCReturnInnerCode == "200" || rollbackDeactivateSDNCReturnInnerCode == "" || rollbackDeactivateSDNCReturnInnerCode == "0") {
+ rollbackDeactivateSDNCMessages = " + SNDC deactivate rollback completed."
+ } else {
+ rollbackDeactivateSDNCMessages = " + SDNC deactivate rollback failed. "
+ }
+ } else {
+ rollbackDeactivateSDNCMessages = " + SNDC deactivate rollback completed."
+ }
+ } else {
+ rollbackDeactivateSDNCMessages = " + SDNC deactivate rollback failed. "
+ }
+ utils.log("DEBUG", " SDNC deactivate rollback Code - " + rollbackDeactivateSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC deactivate rollback Response - " + rollbackDeactivateSDNCResponse, isDebugEnabled)
+ }
+
+ // validate SDNC rollback response
+ String rollbackSdncErrorMessages = ""
+ String rollbackSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackSDNCRequest") != null) {
+ rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode")
+ String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse")
+ String rollbackSDNCReturnInnerCode = ""
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ rollbackSDNCResponse = sdncAdapterUtils.decodeXML(rollbackSDNCResponse)
+ rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+ rollbackSDNCReturnInnerCode = utils.getNodeText1(rollbackSDNCResponse, "response-code")
+ if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") {
+ rollbackSdncErrorMessages = " + SNDC unassign rollback completed."
+ } else {
+ rollbackSdncErrorMessages = " + SDNC unassign rollback failed. "
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SNDC unassign rollback completed."
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SDNC unassign rollback failed. "
+ }
+ utils.log("DEBUG", " SDNC assign rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC assign rollback Response - " + rollbackSDNCResponse, isDebugEnabled)
+ }
+
+ // validate PO network rollback response
+ String rollbackNetworkErrorMessages = ""
+ String rollbackNetworkReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackNetworkRequest") != null) {
+ rollbackNetworkReturnCode = execution.getVariable(Prefix + "rollbackNetworkReturnCode")
+ String rollbackNetworkResponse = execution.getVariable(Prefix + "rollbackNetworkResponse")
+ if (rollbackNetworkReturnCode != "200") {
+ rollbackNetworkErrorMessages = " + PO Network rollback failed. "
+ } else {
+ rollbackNetworkErrorMessages = " + PO Network rollback completed."
+ }
+
+ utils.log("DEBUG", " NetworkRollback Code - " + rollbackNetworkReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " NetworkRollback Response - " + rollbackNetworkResponse, isDebugEnabled)
+ }
+
+ String statusMessage = ""
+ int errorCode = 7000
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+ if (execution.getVariable(Prefix + "fullRollback") == false) {
+ WorkflowException wfe = execution.getVariable(Prefix + "WorkflowException") // original WorkflowException
+ if (wfe != null) {
+ statusMessage = wfe.getErrorMessage()
+ errorCode = wfe.getErrorCode()
+ } else {
+ statusMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ errorCode = '7000'
+ }
+
+ // set if all rolledbacks are successful
+ if (rollbackDeactivateSDNCReturnCode == "200" && rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200") {
+ execution.setVariable("rolledBack", true)
+ execution.setVariable("wasDeleted", true)
+
+ } else {
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("wasDeleted", true)
+ }
+
+ statusMessage = statusMessage + rollbackDeactivateSDNCMessages + rollbackNetworkErrorMessages + rollbackSdncErrorMessages
+ utils.log("DEBUG", "Final DoDeleteNetworkInstanceRollback status message: " + statusMessage, isDebugEnabled)
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, errorCode, statusMessage);
+ execution.setVariable("workflowException", exception);
+
+ } else {
+ // rollback due to failures in Main flow (Macro or a-ala-carte) - Full rollback
+ if (rollbackDeactivateSDNCReturnCode == "200" && rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200") {
+ execution.setVariable("rollbackSuccessful", true)
+ execution.setVariable("rollbackError", false)
+ } else {
+ String exceptionMessage = "Network Delete Rollback was not Successful. "
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ execution.setVariable("rollbackSuccessful", false)
+ execution.setVariable("rollbackError", true)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ } catch (Exception ex) {
+ String errorMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstanceRollback flow. validateRollbackResponses() - " + errorMessage + ": " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Exception in processJavaException method - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
new file mode 100644
index 0000000..83fcd33
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -0,0 +1,420 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+import org.xml.sax.InputSource
+
+/**
+ * This groovy class supports the <class>DoDeleteServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceModelInfo - O
+ * @param - productFamilyId
+ * @param - sdncVersion
+ * @param - failNotFound - TODO
+ * @param - serviceInputParams - TODO
+ *
+ * Outputs:
+ * @param - WorkflowException
+ *
+ * Rollback - Deferred
+ */
+public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DDELSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** preProcessRequest *****", isDebugEnabled)
+ String msg = ""
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix",Prefix)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ if (globalSubscriberId == null)
+ {
+ execution.setVariable("globalSubscriberId", "")
+ }
+
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ if (subscriptionServiceType == null)
+ {
+ execution.setVariable("subscriptionServiceType", "")
+ }
+
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "URN_mso_workflow_sdncadapter_callback is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ utils.log("DEBUG","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void preProcessSDNCDelete (Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** preProcessSDNCDelete *****", isDebugEnabled)
+ String msg = ""
+
+ try {
+ /*
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("msoRequestId") + "-" + System.currentTimeMillis()
+ }
+ */
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ def serviceInstanceName = execution.getVariable("serviceInstanceName")
+ def callbackURL = execution.getVariable("sdncCallbackUrl")
+ def requestId = execution.getVariable("msoRequestId")
+ def serviceId = execution.getVariable("productFamilyId")
+ def subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ def globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+ def modelInvariantId = ""
+ def modelVersion = ""
+ def modelUUId = ""
+ def modelName = ""
+ if (!isBlank(serviceModelInfo))
+ {
+ modelInvariantId = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantId")
+ modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion")
+ modelUUId = jsonUtil.getJsonValue(serviceModelInfo, "modelVersionId")
+ modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName")
+
+ if (modelInvariantId == null) {
+ modelInvariantId = ""
+ }
+ if (modelVersion == null) {
+ modelVersion = ""
+ }
+ if (modelUUId == null) {
+ modelUUId = ""
+ }
+ if (modelName == null) {
+ modelName = ""
+ }
+ }
+ if (serviceInstanceName == null) {
+ serviceInstanceName = ""
+ }
+ if (serviceId == null) {
+ serviceId = ""
+ }
+
+ def sdncRequestId = UUID.randomUUID().toString()
+
+ String sdncDelete =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${sdncRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ <request-action>DeleteServiceInstance</request-action>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <subscription-service-type>${subscriptionServiceType}</subscription-service-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantId}</model-invariant-uuid>
+ <model-uuid>${modelUUId}</model-uuid>
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ </service-information>
+ <service-request-input>
+ <service-instance-name>${serviceInstanceName}</service-instance-name>
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.log("DEBUG","sdncDelete:\n" + sdncDelete, isDebugEnabled)
+ sdncDelete = utils.formatXml(sdncDelete)
+ execution.setVariable("sdncDelete", sdncDelete)
+ utils.logAudit("sdncDelete: " + sdncDelete)
+
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage())
+ }
+ utils.log("DEBUG"," *****Exit preProcessSDNCDelete *****", isDebugEnabled)
+ }
+
+ public void postProcessSDNCDelete(Execution execution) {
+
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessSDNCDelete ***** ", isDebugEnabled)
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ String response = execution.getVariable("sdncAdapterResponse")
+ utils.logAudit("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ utils.log("DEBUG","Good response from SDNC Adapter for service-instance topology assign: \n" + response, isDebugEnabled)
+
+ }else{
+ msg = "Bad Response from SDNC Adapter for service-instance delete"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 3500, msg)
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessSDNCDelete. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage())
+ }
+ utils.log("DEBUG"," *** Exit postProcessSDNCDelete *** ", isDebugEnabled)
+ }
+
+ public void postProcessAAIGET(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIGET ***** ", isDebugEnabled)
+ String msg = ""
+
+ try {
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
+
+ if(foundInAAI == true){
+ utils.log("DEBUG","Found Service-instance in AAI", isDebugEnabled)
+
+ //Extract GlobalSubscriberId
+ String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
+ if (isBlank(siRelatedLink))
+ {
+ msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ else
+ {
+ utils.log("DEBUG","Found Service-instance in AAI. link: " + siRelatedLink, isDebugEnabled)
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ if(isBlank(globalSubscriberId)){
+ int custStart = siRelatedLink.indexOf("customer/")
+ int custEnd = siRelatedLink.indexOf("/service-subscriptions")
+ globalSubscriberId = siRelatedLink.substring(custStart + 9, custEnd)
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //Extract Service Type if not provided on request
+ String serviceType = execution.getVariable("subscriptionServiceType")
+ if(isBlank(serviceType)){
+ int serviceStart = siRelatedLink.indexOf("service-subscription/")
+ int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+ String serviceTypeEncoded = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+ serviceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
+ execution.setVariable("subscriptionServiceType", serviceType)
+ }
+
+ if (isBlank(globalSubscriberId) || isBlank(serviceType))
+ {
+ msg = "Could not retrive global-customer-id & service-type from AAI to delete id:" + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ }
+
+ String siData = execution.getVariable("GENGS_service")
+ utils.log("DEBUG", "SI Data", isDebugEnabled)
+ if (isBlank(siData))
+ {
+ msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ else
+ {
+ utils.log("DEBUG", "SI Data" + siData, isDebugEnabled)
+ //Confirm there are no related service instances (vnf/network or volume)
+ if (utils.nodeExists(siData, "relationship-list")) {
+ utils.log("DEBUG", "SI Data relationship-list exists:", isDebugEnabled)
+ InputSource source = new InputSource(new StringReader(siData));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document serviceXml = docBuilder.parse(source)
+
+ NodeList nodeList = serviceXml.getElementsByTagName("relationship")
+ for (int x = 0; x < nodeList.getLength(); x++) {
+ Node node = nodeList.item(x)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ def e = eElement.getElementsByTagName("related-to").item(0).getTextContent()
+ if(e.equals("generic-vnf") || e.equals("l3-network")){
+ utils.log("DEBUG", "ServiceInstance still has relationship(s) to generic-vnfs or l3-networks", isDebugEnabled)
+ execution.setVariable("siInUse", true)
+ //there are relationship dependencies to this Service Instance
+ msg = " Stopped deleting Service Instance, it has dependencies. Service instance id: " + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }else{
+ utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
+ }
+ }
+ }
+ }
+ }
+ }else{
+ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
+ if(succInAAI != true){
+ utils.log("DEBUG","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ else
+ {
+ msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ utils.log("DEBUG","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
+ }
+
+ public void postProcessAAIDEL(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIDEL ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
+ if(succInAAI != true){
+ msg = "Error deleting Service-instance in AAI" + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ else
+ {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteServiceInstance.postProcessAAIDEL. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIDEL *** ", isDebugEnabled)
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
new file mode 100644
index 0000000..dcb70ff
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
@@ -0,0 +1,599 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModule
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.xml.sax.InputSource
+
+
+/* Subflow for Delete VF Module. When no DoDeleteVfModuleRequest is specified on input,
+ * functions as a building block subflow
+
+* Inputs for building block interface:
+* @param - requestId
+* @param - isDebugLogEnabled
+* @param - vnfId
+* @param - vfModuleId
+* @param - serviceInstanceId
+* @param - vfModuleName O
+* @param - vfModuleModelInfo
+* @param - cloudConfiguration*
+* @param - sdncVersion ("1610")
+*
+* Outputs:
+* @param - WorkflowException
+*
+*/
+public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
+
+ def Prefix="DoDVfMod_"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable("prefix",Prefix)
+ execution.setVariable("DoDVfMod_contrailNetworkPolicyFqdnList", null)
+ execution.setVariable("DoDVfMod_oamManagementV4Address", null)
+ execution.setVariable("DoDVfMod_oamManagementV6Address", null)
+
+ }
+
+ // parse the incoming DELETE_VF_MODULE request for the Generic Vnf and Vf Module Ids
+ // and formulate the outgoing request for PrepareUpdateAAIVfModuleRequest
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ initProcessVariables(execution)
+
+ try {
+ def xml = execution.getVariable("DoDeleteVfModuleRequest")
+ String vnfId = ""
+ String vfModuleId = ""
+
+ if (xml == null || xml.isEmpty()) {
+ // Building Block-type request
+
+ // Set mso-request-id to request-id for VNF Adapter interface
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("mso-request-id", requestId)
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+ String tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId")
+ execution.setVariable("tenantId", tenantId)
+ String cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
+ execution.setVariable("cloudSiteId", cloudSiteId)
+ // Source is HARDCODED
+ String source = "VID"
+ execution.setVariable("source", source)
+ // SrvInstId is hardcoded to empty
+ execution.setVariable("srvInstId", "")
+ // ServiceId is hardcoded to empty
+ execution.setVariable("serviceId", "")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ vnfId = execution.getVariable("vnfId")
+ vfModuleId = execution.getVariable("vfModuleId")
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", vfModuleId)
+ }
+ else {
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", serviceInstanceId)
+ }
+ //vfModuleModelName
+ def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
+ execution.setVariable("vfModuleModelName", vfModuleModelName)
+
+ }
+ else {
+
+ utils.logAudit("DoDeleteVfModule Request: " + xml)
+
+ utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
+
+ vnfId = utils.getNodeText1(xml,"vnf-id")
+ execution.setVariable("vnfId", vnfId)
+ vfModuleId = utils.getNodeText1(xml,"vf-module-id")
+ execution.setVariable("vfModuleId", vfModuleId)
+ def srvInstId = execution.getVariable("mso-service-instance-id")
+ execution.setVariable("srvInstId", srvInstId)
+ String requestId = ""
+ try {
+ requestId = execution.getVariable("mso-request-id")
+ } catch (Exception ex) {
+ requestId = utils.getNodeText1(xml, "request-id")
+ }
+ execution.setVariable("requestId", requestId)
+ String source = utils.getNodeText1(xml, "source")
+ execution.setVariable("source", source)
+ String serviceId = utils.getNodeText1(xml, "service-id")
+ execution.setVariable("serviceId", serviceId)
+ String tenantId = utils.getNodeText1(xml, "tenant-id")
+ execution.setVariable("tenantId", tenantId)
+
+ String serviceInstanceIdToSdnc = ""
+ if (xml.contains("service-instance-id")) {
+ serviceInstanceIdToSdnc = utils.getNodeText1(xml, "service-instance-id")
+ } else {
+ serviceInstanceIdToSdnc = vfModuleId
+ }
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", serviceInstanceIdToSdnc)
+ String vfModuleName = utils.getNodeText1(xml, "vf-module-name")
+ execution.setVariable("vfModuleName", vfModuleName)
+ String vfModuleModelName = utils.getNodeText1(xml, "vf-module-model-name")
+ execution.setVariable("vfModuleModelName", vfModuleModelName)
+ String cloudSiteId = utils.getNodeText1(xml, "aic-cloud-region")
+ execution.setVariable("cloudSiteId", cloudSiteId)
+ }
+
+ // formulate the request for PrepareUpdateAAIVfModule
+ String request = """<PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <orchestration-status>pending-delete</orchestration-status>
+ </PrepareUpdateAAIVfModuleRequest>""" as String
+ utils.log("DEBUG", "PrepareUpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("UpdateAAIVfModule Request: " + request)
+ execution.setVariable("PrepareUpdateAAIVfModuleRequest", request)
+ execution.setVariable("vfModuleFromAAI", null)
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
+ }
+ }
+
+ // build a SDNC vnf-topology-operation request for the specified action
+ // (note: the action passed is expected to be 'changedelete' or 'delete')
+ public void prepSDNCAdapterRequest(Execution execution, String action) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ def srvInstId = execution.getVariable("srvInstId")
+ def callbackUrl = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String requestId = execution.getVariable("requestId")
+ String source = execution.getVariable("source")
+ String serviceId = execution.getVariable("serviceId")
+ String vnfId = execution.getVariable("vnfId")
+ String tenantId = execution.getVariable("tenantId")
+ String vfModuleId = execution.getVariable("vfModuleId")
+ String serviceInstanceIdToSdnc = execution.getVariable(Prefix + "serviceInstanceIdToSdnc")
+ String vfModuleName = execution.getVariable("vfModuleName")
+ // Get vfModuleName from AAI response if it was not specified on the request
+ if (vfModuleName == null || vfModuleName.isEmpty()) {
+ if (execution.getVariable("vfModuleFromAAI") != null) {
+ VfModule vfModuleFromAAI = execution.getVariable("vfModuleFromAAI")
+ vfModuleName = vfModuleFromAAI.getElementText("vf-module-name")
+ }
+ }
+ String vfModuleModelName = execution.getVariable("vfModuleModelName")
+ String cloudSiteId = execution.getVariable("cloudSiteId")
+ String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${vfModuleId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>DisconnectVNFRequest</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${serviceInstanceIdToSdnc}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vfModuleId}</vnf-id>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ <vnf-name>${vfModuleName}</vnf-name>
+ <generic-vnf-id>${vnfId}</generic-vnf-id>
+ <generic-vnf-name></generic-vnf-name>
+ <generic-vnf-type></generic-vnf-type>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ <tenant>${tenantId}</tenant>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.log("DEBUG", "sdncAdapterWorkflowRequest: " + request, isDebugEnabled)
+ utils.logAudit("DoDeleteVfModule - SDNCAdapterWorkflowRequest: " + request)
+ execution.setVariable("sdncAdapterWorkflowRequest", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing VnfAdapterDeleteV1 request
+ public void prepVNFAdapterRequest(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def requestId = UUID.randomUUID().toString()
+ def origRequestId = execution.getVariable('requestId')
+ def srvInstId = execution.getVariable("serviceInstanceId")
+ def aicCloudRegion = execution.getVariable("cloudSiteId")
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ def vfModuleStackId = execution.getVariable('DoDVfMod_heatStackId')
+ def tenantId = execution.getVariable("tenantId")
+ def messageId = execution.getVariable('requestId') + '-' +
+ System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String request = """
+ <deleteVfModuleRequest>
+ <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vfModuleId>${vfModuleId}</vfModuleId>
+ <vfModuleStackId>${vfModuleStackId}</vfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${origRequestId}</requestId>
+ <serviceInstanceId>${srvInstId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </deleteVfModuleRequest>
+ """ as String
+
+ utils.log("DEBUG", "vnfAdapterRestV1Request: " + request, isDebugEnabled)
+ utils.logAudit("deleteVfModuleRequest: " + request)
+ execution.setVariable("vnfAdapterRestV1Request", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing UpdateAAIVfModuleRequest request
+ public void prepUpdateAAIVfModule(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<UpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <heat-stack-id>DELETE</heat-stack-id>
+ <orchestration-status>deleted</orchestration-status>
+ </UpdateAAIVfModuleRequest>""" as String
+ utils.log("DEBUG", "UpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("UpdateAAIVfModuleRequest: " + request)
+ execution.setVariable("UpdateAAIVfModuleRequest", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing DeleteAAIVfModuleRequest request
+ public void prepDeleteAAIVfModule(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<DeleteAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ </DeleteAAIVfModuleRequest>""" as String
+ utils.log("DEBUG", "DeleteAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("DeleteAAIVfModuleRequest: " + request)
+ execution.setVariable("DeleteAAIVfModuleRequest", request)
+ }
+
+ // generates a WorkflowException if
+ // -
+ public void handleDoDeleteVfModuleFailure(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("ERROR", "AAI error occurred deleting the Generic Vnf: "
+ + execution.getVariable("DoDVfMod_deleteGenericVnfResponse"), isDebugEnabled)
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable("DoDVfMod_deleteGenericVnfResponse"))
+ execution.setVariable("WorkflowException", exception)
+ }
+
+ public void sdncValidateResponse(Execution execution, String response){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+ }else{
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ public void postProcessVNFAdapterRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.postProcessVNFAdapterRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix",Prefix)
+ try{
+ logDebug(" *** STARTED postProcessVNFAdapterRequest Process*** ", isDebugLogEnabled)
+
+ String vnfResponse = execution.getVariable("DoDVfMod_doDeleteVfModuleResponse")
+ logDebug("VNF Adapter Response is: " + vnfResponse, isDebugLogEnabled)
+ utils.logAudit("deleteVnfAResponse is: \n" + vnfResponse)
+
+ if(vnfResponse != null){
+
+ if(vnfResponse.contains("deleteVfModuleResponse")){
+ logDebug("Received a Good Response from VNF Adapter for DELETE_VF_MODULE Call.", isDebugLogEnabled)
+ execution.setVariable("DoDVfMod_vnfVfModuleDeleteCompleted", true)
+
+ // Parse vnfOutputs for contrail network polcy FQDNs
+ if (vnfResponse.contains("vfModuleOutputs")) {
+ def vfModuleOutputsXml = utils.getNodeXml(vnfResponse, "vfModuleOutputs")
+ InputSource source = new InputSource(new StringReader(vfModuleOutputsXml));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document outputsXml = docBuilder.parse(source)
+
+ NodeList entries = outputsXml.getElementsByTagNameNS("*", "entry")
+ List contrailNetworkPolicyFqdnList = []
+ for (int i = 0; i< entries.getLength(); i++) {
+ Node node = entries.item(i)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element element = (Element) node
+ String key = element.getElementsByTagNameNS("*", "key").item(0).getTextContent()
+ if (key.endsWith("contrail_network_policy_fqdn")) {
+ String contrailNetworkPolicyFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn, isDebugLogEnabled)
+ contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn)
+ }
+ else if (key.equals("oam_management_v4_address")) {
+ String oamManagementV4Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained oamManagementV4Address: " + oamManagementV4Address, isDebugLogEnabled)
+ execution.setVariable(Prefix + "oamManagementV4Address", oamManagementV4Address)
+ }
+ else if (key.equals("oam_management_v6_address")) {
+ String oamManagementV6Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained oamManagementV6Address: " + oamManagementV6Address, isDebugLogEnabled)
+ execution.setVariable(Prefix + "oamManagementV6Address", oamManagementV6Address)
+ }
+
+ }
+ }
+ if (!contrailNetworkPolicyFqdnList.isEmpty()) {
+ logDebug("Setting the fqdn list", isDebugLogEnabled)
+ execution.setVariable("DoDVfMod_contrailNetworkPolicyFqdnList", contrailNetworkPolicyFqdnList)
+ }
+ }
+ }else{
+ logDebug("Received a BAD Response from VNF Adapter for DELETE_VF_MODULE Call.", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
+ }
+ }else{
+ logDebug("Response from VNF Adapter is Null for DELETE_VF_MODULE Call.", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Empty response from VNF Adapter")
+ }
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ logDebug("Internal Error Occured in PostProcess Method", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Internal Error Occured in PostProcess Method")
+ }
+ logDebug(" *** COMPLETED postProcessVnfAdapterResponse Process*** ", isDebugLogEnabled)
+ }
+
+ public void deleteNetworkPoliciesFromAAI(Execution execution) {
+ def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED deleteNetworkPoliciesFromAAI ======== ", isDebugLogEnabled)
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable("DoDVfMod_contrailNetworkPolicyFqdnList")
+ if (fqdnList == null) {
+ logDebug("No network policies to delete", isDebugLogEnabled)
+ return
+ }
+ int fqdnCount = fqdnList.size()
+
+ execution.setVariable("DoDVfMod_networkPolicyFqdnCount", fqdnCount)
+ logDebug("DoDVfMod_networkPolicyFqdnCount - " + fqdnCount, isDebugLogEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ if (fqdnCount > 0) {
+ // AII loop call over contrail network policy fqdn list
+ for (i in 0..fqdnCount-1) {
+
+ int counting = i+1
+ String fqdn = fqdnList[i]
+
+ // Query AAI for this network policy FQDN
+
+ String queryNetworkPolicyByFqdnAAIRequest = "${aai_endpoint}${aai_uri}?network-policy-fqdn=" + UriUtils.encode(fqdn, "UTF-8")
+ utils.logAudit("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+ logDebug("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyByFqdnAAIRequest)
+ int returnCode = response.getStatusCode()
+ execution.setVariable("DCVFM_aaiQueryNetworkPolicyByFqdnReturnCode", returnCode)
+ logDebug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugLogEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ // This network policy FQDN exists in AAI - need to delete it now
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable("DoDVfMod_queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ logDebug("QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugLogEnabled)
+ // Retrieve the network policy id for this FQDN
+ def networkPolicyId = utils.getNodeText1(aaiResponseAsString, "network-policy-id")
+ logDebug("Deleting network-policy with network-policy-id " + networkPolicyId, isDebugLogEnabled)
+
+ // Retrieve the resource version for this network policy
+ def resourceVersion = utils.getNodeText1(aaiResponseAsString, "resource-version")
+ logDebug("Deleting network-policy with resource-version " + resourceVersion, isDebugLogEnabled)
+
+ String delNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8") +
+ "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+ utils.logAudit("AAI request endpoint: " + delNetworkPolicyAAIRequest)
+ logDebug("AAI request endpoint: " + delNetworkPolicyAAIRequest, isDebugLogEnabled)
+
+ logDebug("invoking DELETE call to AAI", isDebugLogEnabled)
+ utils.logAudit("Sending DELETE call to AAI with Endpoint /n" + delNetworkPolicyAAIRequest)
+ APIResponse responseDel = aaiUriUtil.executeAAIDeleteCall(execution, delNetworkPolicyAAIRequest)
+ int returnCodeDel = responseDel.getStatusCode()
+ execution.setVariable("DoDVfMod_aaiDeleteNetworkPolicyReturnCode", returnCodeDel)
+ logDebug(" ***** AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodeDel, isDebugLogEnabled)
+
+ if (isOneOf(returnCodeDel, 200, 201, 204)) {
+ logDebug("The return code from deleting network policy is: " + returnCodeDel, isDebugLogEnabled)
+ // This network policy was deleted from AAI successfully
+ logDebug(" DelAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : ", isDebugLogEnabled)
+
+ } else {
+ // aai all errors
+ String delErrorMessage = "Unable to delete network-policy to AAI deleteNetworkPoliciesFromAAI - " + returnCodeDel
+ logDebug(delErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, delErrorMessage)
+ }
+ } else if (returnCode == 404) {
+ // This network policy FQDN is not in AAI. No need to delete.
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ logDebug("This network policy FQDN is not in AAI: " + fqdn, isDebugLogEnabled)
+ utils.logAudit("Network policy FQDN is not in AAI")
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Response from deleteNetworkPoliciesFromAAI - " + returnCode
+ logDebug(dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+
+
+
+ } // end loop
+
+
+ } else {
+ logDebug("No contrail network policies to query/create", isDebugLogEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoDeletVfModule flow. deleteNetworkPoliciesFromAAI() - " + ex.getMessage()
+ logDebug(exceptionMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('vnfId')
+ def oamManagementV4Address = execution.getVariable(Prefix + 'oamManagementV4Address')
+ def oamManagementV6Address = execution.getVariable(Prefix + 'oamManagementV6Address')
+ def ipv4OamAddressElement = ''
+ def managementV6AddressElement = ''
+
+ if (oamManagementV4Address != null) {
+ ipv4OamAddressElement = '<ipv4-oam-address>' + 'DELETE' + '</ipv4-oam-address>'
+ }
+
+ if (oamManagementV6Address != null) {
+ managementV6AddressElement = '<management-v6-address>' + 'DELETE' + '</management-v6-address>'
+ }
+
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable(Prefix + 'updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
new file mode 100644
index 0000000..fe98b70
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+import org.xml.sax.InputSource
+
+
+/**
+ * This class supports the DoDeleteVnf subFlow
+ * with the Deletion of a generic vnf for
+ * infrastructure.
+ *
+ */
+class DoDeleteVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="DoDVNF_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoDeleteVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("DoDVNF_SuccessIndicator", false)
+ execution.setVariable("DoDVNF_vnfInUse", false)
+
+ try{
+ // Get Variables
+
+ String vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DoDVNF_vnfId", vnfId)
+ utils.log("DEBUG", "Incoming Vnf(Instance) Id is: " + vnfId, isDebugEnabled)
+
+ // Setting for sub flow calls
+ execution.setVariable("DoDVNF_type", "generic-vnf")
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoDeleteVnf PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoDeleteVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void processGetVnfResponse(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoDeleteVnf processGetVnfResponse Process *** ", isDebugEnabled)
+ try {
+ String vnf = execution.getVariable("DoDVNF_genericVnf")
+ String resourceVersion = utils.getNodeText1(vnf, "resource-version")
+ execution.setVariable("DoDVNF_resourceVersion", resourceVersion)
+
+ if(utils.nodeExists(vnf, "relationship")){
+ InputSource source = new InputSource(new StringReader(vnf));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document vnfXml = docBuilder.parse(source)
+
+ NodeList nodeList = vnfXml.getElementsByTagName("relationship")
+ for (int x = 0; x < nodeList.getLength(); x++) {
+ Node node = nodeList.item(x)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ def e = eElement.getElementsByTagName("related-to").item(0).getTextContent()
+ if(e.equals("volume-group") || e.equals("l3-network")){
+ utils.log("DEBUG", "Generic Vnf still has relationship to OpenStack.", isDebugEnabled)
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ }else{
+ utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
+ }
+ }
+ }
+ }
+
+ if(utils.nodeExists(vnf, "vf-module")){
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ utils.log("DEBUG", "Generic Vnf still has vf-modules.", isDebugEnabled)
+ }
+
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoDeleteVnf processGetVnfResponse Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf processGetVnfResponse Process")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoDeleteVnf processGetVnfResponse Process ***", isDebugEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
new file mode 100644
index 0000000..7d6a21d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
@@ -0,0 +1,789 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModule
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+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_modelCustomizationUuid', null)
+ execution.setVariable("DOUPVfMod_isBaseVfModule", "false")
+ execution.setVariable('DOUPVfMod_serviceId', null)
+ execution.setVariable('DOUPVfMod_aicCloudRegion', null)
+ execution.setVariable('DOUPVfMod_tenantId', null)
+ execution.setVariable('DOUPVfMod_volumeGroupId', null)
+ execution.setVariable('DOUPVfMod_vfModule', null)
+ execution.setVariable('DOUPVfMod_vnfParams', null)
+ execution.setVariable("DOUPVfMod_baseVfModuleId", "")
+ execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", "")
+ execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', null)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignRequest', null)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignResponse', null)
+ execution.setVariable('DOUPVfMod_sdncActivateRequest', null)
+ execution.setVariable('DOUPVfMod_sdncActivateResponse', null)
+ execution.setVariable('DOUPVfMod_sdncTopologyRequest', null)
+ execution.setVariable('DOUPVfMod_sdncTopologyResponse', null)
+ execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', null)
+ execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', null)
+ execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', null)
+ execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', false)
+ execution.setVariable('DoUpdateVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ initProcessVariables(execution)
+ def xml = getVariable(execution, 'DoUpdateVfModuleRequest')
+ utils.logAudit("DoUpdateVfModule request: " + xml)
+ logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+
+ def requestInfo = getRequiredNodeXml(execution, xml, 'request-info')
+ execution.setVariable('DOUPVfMod_requestInfo', requestInfo)
+ execution.setVariable('DOUPVfMod_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ def serviceInstanceId = execution.getVariable('mso-service-instance-id')
+ if (serviceInstanceId == null) {
+ serviceInstanceId = ''
+ }
+ execution.setVariable('DOUPVfMod_serviceInstanceId', serviceInstanceId)
+
+ def vnfInputs = getRequiredNodeXml(execution, xml, 'vnf-inputs')
+ execution.setVariable('DOUPVfMod_vnfInputs', vnfInputs)
+ execution.setVariable('DOUPVfMod_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+ execution.setVariable('DOUPVfMod_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('DOUPVfMod_vfModuleName', getNodeTextForce(vnfInputs, 'vf-module-name'))
+ execution.setVariable('DOUPVfMod_vnfType', getNodeTextForce(vnfInputs, 'vnf-type'))
+ execution.setVariable('DOUPVfMod_vnfName', getNodeTextForce(vnfInputs, 'vnf-name'))
+ execution.setVariable('DOUPVfMod_asdcServiceModelVersion', getNodeTextForce(vnfInputs, 'asdc-service-model-version'))
+ execution.setVariable('DOUPVfMod_vfModuleModelName', getRequiredNodeText(execution, vnfInputs, 'vf-module-model-name'))
+ execution.setVariable('DOUPVfMod_modelCustomizationUuid', getNodeTextForce(vnfInputs, 'model-customization-id'))
+ execution.setVariable('DOUPVfMod_serviceId', getRequiredNodeText(execution, vnfInputs, 'service-id'))
+ execution.setVariable('DOUPVfMod_aicCloudRegion', getRequiredNodeText(execution, vnfInputs, 'aic-cloud-region'))
+ execution.setVariable('DOUPVfMod_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ //isBaseVfModule
+ def isBaseVfModule = "false"
+ if (utils.nodeExists(xml, "is-base-vf-module")) {
+ isBaseVfModule = utils.getNodeText(xml, "is-base-vf-module")
+ execution.setVariable("DOUPVfMod_isBaseVfModule", isBaseVfModule)
+ }
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+
+ NetworkUtils networkUtils = new NetworkUtils()
+ def backoutOnFailure = networkUtils.isRollbackEnabled(execution, xml)
+ execution.setVariable("DOUPVfMod_backoutOnFailure", backoutOnFailure)
+
+ def String vgi = getNodeTextForce(vnfInputs, 'volume-group-id')
+ execution.setVariable('DOUPVfMod_volumeGroupId', vgi)
+
+ execution.setVariable('DOUPVfMod_vnfParams', utils.getNodeXml(xml, 'vnf-params', false))
+
+ def sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ 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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${vnfId}</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vfModuleId}</vnf-id>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ <vnf-name>${vfModuleName}</vnf-name>
+ <generic-vnf-id>${vnfId}</generic-vnf-id>
+ <generic-vnf-name>${vnfName}</generic-vnf-name>
+ <generic-vnf-type>${vnfType}</generic-vnf-type>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ ${vnfNetworks}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignRequest', sdncTopologyRequest)
+ utils.logAudit("sdncChangeAssignRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter topology/changeassign:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ 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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>/VNF-API:vnfs/vnf-list/${vfModuleId}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
+ utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter query:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ 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 modelCustomizationUuid = execution.getVariable('DOUPVfMod_modelCustomizationUuid')
+ def backoutOnFailure = execution.getVariable("DOUPVfMod_backoutOnFailure")
+
+ def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vfModuleParamsEntries = transformParamsToEntries(vnfParamsXml)
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String sdncGetResponse = execution.getVariable('DOUPVfMod_sdncTopologyResponse')
+
+ String vfModuleParams = buildVfModuleParams(vfModuleParamsEntries, sdncGetResponse, vnfId, vnfName,
+ vfModuleId, vfModuleName)
+
+
+ String vnfAdapterRestRequest = """
+ <updateVfModuleRequest>
+ <cloudSiteId>${cloudId}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vfModuleId>${vfModuleId}</vfModuleId>
+ <vfModuleStackId>${heatStackId}</vfModuleStackId>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion>${asdcServiceModelVersion}</vnfVersion>
+ <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid>
+ <vfModuleType>${vfModuleModelName}</vfModuleType>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <baseVfModuleId>${baseVfModuleId}</baseVfModuleId>
+ <baseVfModuleStackId>${baseVfModuleStackId}</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>${backoutOnFailure}</backout>
+ <failIfExists>false</failIfExists>
+ <vfModuleParams>
+ ${vfModuleParams}
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </updateVfModuleRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ utils.logAudit("vnfAdapterRestRequest : " + vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ 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>'
+ }
+ def personaModelCustomizationIdElement = ''
+ def modelCustomizationId = execution.getVariable('DOUPVfMod_modelCustomizationUuid')
+ if (modelCustomizationId != null) {
+ personaModelCustomizationIdElement = '<persona-model-customization-id>' + modelCustomizationId + '</persona-model-customization-id>'
+ }
+
+ String updateAAIVfModuleRequest = """
+ <UpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <orchestration-status>${orchestrationStatus}</orchestration-status>
+ ${volumeGroupIdElement}
+ ${personaModelIdElement}
+ ${personaModelVersionElement}
+ ${contrailServiceInstanceFqdnElement}
+ ${personaModelCustomizationIdElement}
+ </UpdateAAIVfModuleRequest>
+ """
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', updateAAIVfModuleRequest)
+ utils.logAudit("updateAAIVfModuleRequest : " + updateAAIVfModuleRequest)
+ logDebug('Request for UpdateAAIVfModule:\n' + updateAAIVfModuleRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ 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 vnfName = execution.getVariable('DOUPVfMod_vnfName')
+ def vnfType = execution.getVariable('DOUPVfMod_vnfType')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+ def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+ def vfModuleName = vfModule.getElementText('vf-module-name')
+ def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+ def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')
+
+ def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
+
+ String sdncTopologyRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${vnfId}</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vfModuleId}</vnf-id>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ <vnf-name>${vfModuleName}</vnf-name>
+ <generic-vnf-id>${vnfId}</generic-vnf-id>
+ <generic-vnf-name>${vnfName}</generic-vnf-name>
+ <generic-vnf-type>${vnfType}</generic-vnf-type>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncActivateRequest', sdncTopologyRequest)
+ utils.logAudit("sdncActivateRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter topology/activate:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ 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") + "?depth=1"
+ utils.logAudit("AAI endPoint: " + endPoint)
+
+ try {
+ def aaiRequestId = UUID.randomUUID().toString()
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
+ utils.logAudit("createVfModule - invoking httpGet() to AAI")
+
+ def responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+ }
+
+ utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
+ utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DOUPVfMod_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DOUPVfMod_queryAAIVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled)
+ if (responseData != null) {
+ def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ int vfModulesSize = 0
+ for (i in 0..vfModules.size()-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+ def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
+
+ if (isBaseVfModule == "true") {
+ String baseModuleId = utils.getNodeText1(vfModuleXml, "vf-module-id")
+ execution.setVariable("DOUPVfMod_baseVfModuleId", baseModuleId)
+ logDebug('Received baseVfModuleId: ' + baseModuleId, isDebugLogEnabled)
+ String baseModuleHeatStackId = utils.getNodeText1(vfModuleXml, "heat-stack-id")
+ execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", baseModuleHeatStackId)
+ logDebug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId, isDebugLogEnabled)
+ }
+ }
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/HealchCheckActivate.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
new file mode 100644
index 0000000..dd9f94d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
@@ -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 org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.apache.commons.lang3.*
+
+public class HealthCheckActivate extends AbstractServiceTaskProcessor {
+
+
+ /**
+ * Validates the request message and sets up the workflow.
+ * @param execution the execution
+ */
+ public void preProcessRequest(Execution execution) {
+
+ }
+
+
+ /**
+ * Sends the synchronous response back to the API Handler.
+ * @param execution the execution
+ */
+ public void sendResponse(Execution execution) {
+ def status = execution.getVariable("healthyStatus")
+ def healthcheckmessage = execution.getVariable("healthcheckmessage")
+ if (status == "true") {
+ sendWorkflowResponse(execution, 200, healthcheckmessage)
+ }else{
+ sendWorkflowResponse(execution, 503, healthcheckmessage)
+ }
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy
new file mode 100644
index 0000000..a682c4d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy
@@ -0,0 +1,1613 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils;
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>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 {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
+
+ execution.setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", updateNetworkJsonIncoming)
+
+ // 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("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("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)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryIdAAIRequest)
+ 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)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, requeryIdAAIRequest)
+ 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)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryVpnBindingAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled)
+
+ 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)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled)
+
+ 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)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkTableRefAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled)
+
+ 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)
+
+ APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, 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, 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://org.openecomp.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://org.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ execution.setVariable("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.buildWorkflowException(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://org.openecomp.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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>UPDATE</action>
+ <source>${source}</source>
+ </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, 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.buildWorkflowException(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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>UPDATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.logAudit(falloutHandlerRequest)
+ execution.setVariable("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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>UPDATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/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("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.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy
new file mode 100644
index 0000000..8f2eb27
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy
@@ -0,0 +1,329 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.core.RollbackData
+
+
+public class UpdateVfModule extends AbstractServiceTaskProcessor {
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'UPDVfMod_')
+ execution.setVariable('UPDVfMod_Request', null)
+ execution.setVariable('UPDVfMod_requestInfo', null)
+ execution.setVariable('UPDVfMod_requestId', null)
+ execution.setVariable('UPDVfMod_source', null)
+ execution.setVariable('UPDVfMod_vnfInputs', null)
+ execution.setVariable('UPDVfMod_vnfId', null)
+ execution.setVariable('UPDVfMod_vfModuleId', null)
+ execution.setVariable('UPDVfMod_tenantId', null)
+ execution.setVariable('UPDVfMod_volumeGroupId', null)
+ execution.setVariable('UPDVfMod_vnfParams', null)
+ execution.setVariable('UPDVfMod_updateInfraRequest', null)
+ execution.setVariable('UpdateVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ initProcessVariables(execution)
+ String request = validateRequest(execution)
+
+ utils.logAudit("UpdateVfModule request: " + request)
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('UPDVfMod_requestInfo', requestInfo)
+ execution.setVariable('UPDVfMod_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('UPDVfMod_source', getNodeTextForce(requestInfo, 'source'))
+
+ def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs')
+ execution.setVariable('UPDVfMod_vnfInputs', vnfInputs)
+ execution.setVariable('UPDVfMod_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+ execution.setVariable('UPDVfMod_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('UPDVfMod_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ execution.setVariable('UPDVfMod_volumeGroupId', getNodeTextForce(vnfInputs, 'volume-group-id'))
+
+ def vnfParams = utils.getNodeXml(request, 'vnf-params')
+ execution.setVariable('UPDVfMod_vnfParams', vnfParams)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare and send the synchronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfMod_requestInfo')
+ def requestId = execution.getVariable('UPDVfMod_requestId')
+ def source = execution.getVariable('UPDVfMod_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+ def vnfInputs = execution.getVariable('UPDVfMod_vnfInputs')
+
+ String synchResponse = """
+ <vnf-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>UPDATE_VF_MODULE</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${progress}</progress>
+ <start-time>${startTime}</start-time>
+ <source>${source}</source>
+ </request-info>
+ ${vnfInputs}
+ </vnf-request>
+ """
+
+ synchResponse = utils.formatXml(synchResponse)
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ utils.logAudit("UpdateVfModule Synch Response: " + synchResponse)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in sendSynchResponse(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare the Request for invoking the DoUpdateVfModule subflow.
+ *
+ * NOTE: Currently, the method just logs passing through as the
+ * incoming Request to this main flow is used as the Request to
+ * the DoUpdateVfModule subflow. No preparation processing is
+ * necessary.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoUpdateVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepDoUpdateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ 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('UPDVfMod_requestId')
+ def vnfId = execution.getVariable('UPDVfMod_vnfId')
+ def vfModuleId = execution.getVariable('UPDVfMod_vfModuleId')
+ def tenantId = execution.getVariable('UPDVfMod_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfMod_volumeGroupId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <tenant-id>${tenantId}</tenant-id>
+ <volume-group-id>${volumeGroupId}</volume-group-id>
+ </vnfOutputs>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfMod_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+ utils.logAudit("UpdateVfModule Infra Request: " + updateInfraRequest)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ 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, 'UPDVfMod_requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ utils.logAudit("UpdateVfModule CompletionHandler Request: " + content)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ 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-information', false)
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInformation}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ utils.logAudit("UpdateVfModule fallOutHandler Request: " + content)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
new file mode 100644
index 0000000..8d05f41
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
@@ -0,0 +1,427 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import groovy.json.JsonSlurper
+import 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.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
+
+ /**
+ * 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://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <tenant-id>${tenantId}</tenant-id>
+ <volume-group-id>${volumeGroupId}</volume-group-id>
+ </vnfOutputs>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ 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://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInformation}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ 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("mso-request-id")
+
+ if (requestId == null) {
+ createWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
+ }
+
+ setVariable(execution, prefix + 'requestId', requestId)
+
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ createWorkflowException(execution, 1002, processKey + " request message has no 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/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
new file mode 100644
index 0000000..996fd56
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
@@ -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.infrastructure.scripts
+
+import java.util.concurrent.ExecutionException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.springframework.web.util.UriUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+
+class UpdateVfModuleVolume 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)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ @Override
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ initProcessVariables(execution)
+ String request = validateRequest(execution)
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('UPDVfModVol_requestInfo', requestInfo)
+ execution.setVariable('UPDVfModVol_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('UPDVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+ def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+ execution.setVariable('UPDVfModVol_volumeInputs', volumeInputs)
+ execution.setVariable('UPDVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+ execution.setVariable('UPDVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+ execution.setVariable('UPDVfModVol_serviceId', getRequiredNodeText(execution, volumeInputs, 'service-id'))
+ execution.setVariable('UPDVfModVol_aicCloudRegion', getRequiredNodeText(execution, volumeInputs, 'aic-cloud-region'))
+ execution.setVariable('UPDVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+
+ def volumeParams = utils.getNodeXml(request, 'volume-params')
+ execution.setVariable('UPDVfModVol_volumeParams', volumeParams)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume request: " + request)
+ } catch (BpmnError bpmnError) {
+ throw bpmnError
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare and send the synchronous response.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def source = execution.getVariable('UPDVfModVol_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+ def volumeInputs = execution.getVariable('UPDVfModVol_volumeInputs')
+
+ String synchResponse = """
+ <volume-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>UPDATE_VF_MODULE_VOL</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${progress}</progress>
+ <start-time>${startTime}</start-time>
+ <source>${source}</source>
+ </request-info>
+ ${volumeInputs}
+ </volume-request>
+ """
+
+ synchResponse = utils.formatXml(synchResponse)
+ sendWorkflowResponse(execution, 200, synchResponse)
+ utils.logAudit("UpdateVfModuleVolume Synch Response: " + synchResponse)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in sendSynchResponse(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for querying AAI for Volume Group information using the
+ * Volume Group Id and Aic Cloud Region.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIForVolumeGroup(Execution execution) {
+ def method = getClass().getSimpleName() + '.queryAAIForVolumeGroup(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def endPoint = execution.getVariable('URN_aai_endpoint') +
+ '/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/' + UriUtils.encode(aicCloudRegion, "UTF-8") +
+ '/volume-groups/volume-group/' + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ logDebug('Sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume sending GET for quering AAI endpoint: " + endPoint)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, endPoint)
+ def int statusCode = response.getStatusCode()
+ def responseData = response.getResponseBodyAsString()
+ logDebug('Response code:' + statusCode, isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume response data: " + responseData)
+
+ def volumeGroup = responseData
+ def heatStackId = getNodeTextForce(volumeGroup, 'heat-stack-id')
+ execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', heatStackId)
+ if ((statusCode == 200) || (statusCode == 204)) {
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(volumeGroup)
+ if (volumeGroupTenantId == null) {
+ throw new Exception('Could not find Tenant Id element in Volume Group with Volume Group Id \'' + volumeGroupId + '\''
+ + '\', AIC Cloud Region \'' + aicCloudRegion + '\'')
+ }
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ logDebug('Received Tenant Id \'' + volumeGroupTenantId + '\' from AAI for Volume Group with Volume Group Id \'' + volumeGroupId + '\''
+ + '\', AIC Cloud Region \'' + aicCloudRegion + '\'', isDebugLogEnabled)
+ } else if (statusCode == 404) {
+ throw new Exception('Volume Group \'' + volumeGroupId + '\' not found at AAI')
+ } else {
+ throw new Exception('Bad status code ' + statusCode + ' received from AAI; Response data: ' + responseData)
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in queryAAIForVolumeGroup(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the VnfAdapterRest subflow to do
+ * a Volume Group update.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepVnfAdapterRest(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepVnfAdapterRest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def volumeGroupHeatStackId = execution.getVariable('UPDVfModVol_volumeGroupHeatStackId')
+ def vnfType = execution.getVariable('UPDVfModVol_vnfType')
+
+ def volumeParamsXml = execution.getVariable('UPDVfModVol_volumeParams')
+ def volumeGroupParams = transformParamsToEntries(volumeParamsXml)
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def serviceId = execution.getVariable('UPDVfModVol_serviceId')
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <updateVolumeGroupRequest>
+ <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion></vnfVersion>
+ <vfModuleType></vfModuleType>
+ <volumeGroupParams>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </updateVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+
+ utils.logAudit("UpdateVfModuleVolume Request for VNFAdapter Rest: " + vnfAdapterRestRequest)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in prepVnfAdapterRest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for updating the DB for this Infra request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDbInfraDbRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepDbInfraDbRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('UPDVfMod_requestId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfModVol_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+ utils.logAudit("UpdateVfModuleVolume Request for Updating DB for Infra: " + updateInfraRequest)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in prepDbInfraDbRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Build a "CompletionHandler" request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepCompletionHandlerRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepCompletionHandlerRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ logDebug('Request for Completion Handler:\n' + content, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume Completion Handler request: " + content)
+ execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in prepCompletionHandlerRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Build a "FalloutHandler" request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepFalloutHandler(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepFalloutHandler(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ logDebug('Request for Fallout Handler:\n' + content, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume Fallout request: " + content)
+ execution.setVariable('UPDVfModVol_FalloutHandlerRequest', content)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ createWorkflowException(execution, 1002, 'Error in prepFalloutHandler(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Create a WorkflowException for the error case where the Tenant Id from
+ * AAI did not match the Tenant Id in the incoming request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleTenantIdMismatch(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleTenantIdMismatch(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String processKey = getProcessKey(execution);
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupTenantId = execution.getVariable('UPDVfModVol_volumeGroupTenantId')
+
+ def String errorMessage = 'TenantId \'' + tenantId + '\' in incoming request does not match Tenant Id \'' + volumeGroupTenantId +
+ '\' retrieved from AAI for Volume Group Id \'' + volumeGroupId + '\', AIC Cloud Region \'' + aicCloudRegion + '\''
+
+ logError('Error in UpdateVfModuleVol: ' + errorMessage)
+
+ WorkflowException exception = new WorkflowException(processKey, 5000, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume workflowException in Tenant Mismatch: " + errorMessage)
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000..2f716f5
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
@@ -0,0 +1,549 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import groovy.json.JsonSlurper
+
+import java.util.concurrent.ExecutionException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.springframework.web.util.UriUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ private void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'UPDVfModVol_')
+ execution.setVariable('UPDVfModVol_Request', null)
+ execution.setVariable('UPDVfModVol_requestInfo', null)
+ execution.setVariable('UPDVfModVol_requestId', null)
+ execution.setVariable('UPDVfModVol_source', null)
+ execution.setVariable('UPDVfModVol_volumeInputs', null)
+ execution.setVariable('UPDVfModVol_volumeGroupId', null)
+ execution.setVariable('UPDVfModVol_vnfType', null)
+ execution.setVariable('UPDVfModVol_serviceId', null)
+ execution.setVariable('UPDVfModVol_aicCloudRegion', null)
+ execution.setVariable('UPDVfModVol_tenantId', null)
+ execution.setVariable('UPDVfModVol_volumeParams', null)
+ execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', null)
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', null)
+ execution.setVariable('UpdateVfModuleVolumeSuccessIndicator', false)
+ }
+
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ public void preProcessRequest(Execution execution, isDebugLogEnabled) {
+
+ initProcessVariables(execution)
+ String jsonRequest = validateRequest(execution)
+
+ def request = ""
+
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(jsonRequest)
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ //def vnfId = execution.getVariable('vnfId')
+
+ def vidUtils = new VidUtils(this)
+ request = vidUtils.createXmlVolumeRequest(reqMap, 'UPDATE_VF_MODULE_VOL', serviceInstanceId, volumeGroupId)
+
+ execution.setVariable('UPDVfModVol_Request', request)
+ execution.setVariable("UPDVfModVol_isVidRequest", true)
+
+ //need to get persona-model-id aka model-invariantId to use later to validate vf-module relation in AAI
+
+ def modelInvariantId = reqMap.requestDetails.modelInfo.modelInvariantId ?: ''
+ execution.setVariable('UPDVfModVol_modelInvariantId', modelInvariantId)
+
+ utils.log("DEBUG", "XML request:\n" + request, isDebugLogEnabled)
+ }
+ catch(groovy.json.JsonException je) {
+ utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
+ // assume request is in XML format - proceed as usual to process XML request
+ }
+
+ def requestId = execution.getVariable('mso-request-id')
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('UPDVfModVol_requestInfo', requestInfo)
+ execution.setVariable('UPDVfModVol_requestId', requestId)
+ //execution.setVariable('UPDVfModVol_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('UPDVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+ def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+ execution.setVariable('UPDVfModVol_volumeInputs', volumeInputs)
+ execution.setVariable('UPDVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+ execution.setVariable('UPDVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+ execution.setVariable('UPDVfModVol_vnfVersion', getRequiredNodeText(execution, volumeInputs, 'asdc-service-model-version'))
+ execution.setVariable('UPDVfModVol_serviceId', getRequiredNodeText(execution, volumeInputs, 'service-id'))
+ execution.setVariable('UPDVfModVol_aicCloudRegion', getRequiredNodeText(execution, volumeInputs, 'aic-cloud-region'))
+ execution.setVariable('UPDVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+ //execution.setVariable('UPDVfModVol_modelCustomizationId', getRequiredNodeText(execution, volumeInputs, 'model-customization-id'))
+
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ def volumeParams = utils.getNodeXml(request, 'volume-params')
+ execution.setVariable('UPDVfModVol_volumeParams', volumeParams)
+ }
+
+ /**
+ * Prepare and send the synchronous response.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(Execution execution, isDebugLogEnabled) {
+
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def source = execution.getVariable('UPDVfModVol_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+ def volumeInputs = execution.getVariable('UPDVfModVol_volumeInputs')
+
+ String xmlSyncResponse = """
+ <volume-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>UPDATE_VF_MODULE_VOL</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${progress}</progress>
+ <start-time>${startTime}</start-time>
+ <source>${source}</source>
+ </request-info>
+ ${volumeInputs}
+ </volume-request>
+ """
+
+ def syncResponse = ''
+ def isVidRequest = execution.getVariable('UPDVfModVol_isVidRequest')
+
+ if(isVidRequest) {
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+ }
+ else {
+ syncResponse = utils.formatXml(xmlSyncResponse)
+ }
+
+ logDebug('Sync response: ' + syncResponse, isDebugLogEnabled)
+ execution.setVariable('UPDVfModVol_syncResponseSent', true)
+ sendWorkflowResponse(execution, 200, syncResponse)
+ }
+
+ /**
+ * Prepare a Request for querying AAI for Volume Group information using the
+ * Volume Group Id and Aic Cloud Region.
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIForVolumeGroup(Execution execution, isDebugLogEnabled) {
+
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(aicCloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+ logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query volume group by id return code: " + returnCode)
+ utils.logAudit("AAI query volume group by id response: " + aaiResponseAsString)
+
+ logDebug("AAI Volume Group return code: " + returnCode, isDebugLogEnabled)
+ logDebug("AAI Volume Group response: " + aaiResponseAsString, isDebugLogEnabled)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((returnCode == '200') || (returnCode == '204')) {
+
+ execution.setVariable('UPDVfModVol_aaiVolumeGroupResponse', aaiResponseAsString)
+ //def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+ //execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', heatStackId)
+
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+ if (volumeGroupTenantId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id " + volumeGroupId
+ + ", AIC Cloud Region " + aicCloudRegion)
+ }
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ logDebug("Received Tenant Id " + volumeGroupTenantId + " from AAI for Volume Group with Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion, isDebugLogEnabled)
+
+ def relatedVfModuleLink = getRelatedVfModuleRelatedLink(aaiResponseAsString)
+ logDebug("Related VF Module link: " + relatedVfModuleLink, isDebugLogEnabled)
+ execution.setVariable('UPDVfModVol_relatedVfModuleLink', relatedVfModuleLink)
+
+ }
+ else if (returnCode == '404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group " + volumeGroupId + " not found at AAI")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ /**
+ * Query AAI service instance
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void queryAAIForGenericVnf(Execution execution, isDebugEnabled) {
+
+ def vnfId = execution.getVariable('vnfId')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getNetworkGenericVnfEndpoint(execution)
+ def String queryAAIRequest = aaiEndpoint + "/" + UriUtils.encode(vnfId, "UTF-8")
+
+ utils.logAudit("AAI query generic vnf request: " + queryAAIRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query generic vnf return code: " + returnCode)
+ utils.logAudit("AAI query generic vnf response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode=='200') {
+ utils.log("DEBUG", 'Generic vnf ' + vnfId + ' found in AAI.', isDebugEnabled)
+ execution.setVariable('UPDVfModVol_AAIQueryGenericVfnResponse', aaiResponseAsString)
+ } else {
+ if (returnCode=='404') {
+ def message = 'Generic vnf ' + vnfId + ' was not found in AAI. Return code: 404.'
+ utils.log("DEBUG", message, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ /**
+ * Query AAI for VF Module using vf-module-id
+ * @param execution
+ * @param isDebugLogEnabled
+ */
+ public void queryAAIForVfModule(Execution execution, isDebugLogEnabled) {
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String queryAAIVfModuleRequest = execution.getVariable('UPDVfModVol_relatedVfModuleLink')
+ execution.setVariable('UPDVfModVol_personaModelId', '')
+
+ utils.logAudit('Query AAI VF Module: ' + queryAAIVfModuleRequest)
+ logDebug('Query AAI VF Module: ' + queryAAIVfModuleRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVfModuleRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query vf-module: " + returnCode)
+ utils.logAudit("AAI query vf-module response: " + aaiResponseAsString)
+
+ logDebug("AAI query vf-module:: " + returnCode, isDebugLogEnabled)
+ logDebug("AAI query vf-module response: " + aaiResponseAsString, isDebugLogEnabled)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((returnCode == '200') || (returnCode == '204')) {
+ def personaModelId = utils.getNodeText1(aaiResponseAsString, 'persona-model-id')
+ execution.setVariable('UPDVfModVol_personaModelId', personaModelId)
+ }
+ else if (returnCode == '404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "VF Module not found at AAI")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ /**
+ *
+ */
+ public String getRelatedVfModuleRelatedLink(xml) {
+ def list = new XmlSlurper().parseText(xml)
+ def vfModuleRelationship = list.'**'.find { node -> node.'related-to'.text() == 'vf-module' }
+ return vfModuleRelationship?.'related-link'?.text() ?: ''
+ }
+
+ /**
+ * Prepare a Request for invoking the VnfAdapterRest subflow to do
+ * a Volume Group update.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepVnfAdapterRest(Execution execution, isDebugLogEnabled) {
+
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+
+ def aaiVolumeGroupResponse = execution.getVariable('UPDVfModVol_aaiVolumeGroupResponse')
+ def volumeGroupHeatStackId = getNodeTextForce(aaiVolumeGroupResponse, 'heat-stack-id')
+ def volumeGroupName = getNodeTextForce(aaiVolumeGroupResponse, 'volume-group-name')
+ def modelCustomizationId = getNodeTextForce(aaiVolumeGroupResponse, 'vf-module-persona-model-customization-id')
+
+ def vnfType = execution.getVariable('UPDVfModVol_vnfType')
+ def vnfVersion = execution.getVariable('UPDVfModVol_vnfVersion')
+
+ def aaiGenericVnfResponse = execution.getVariable('UPDVfModVol_AAIQueryGenericVfnResponse')
+ def vnfId = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-id')
+ def vnfName = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-name')
+
+
+ def volumeParamsXml = execution.getVariable('UPDVfModVol_volumeParams')
+ def volumeGroupParams = transformVolumeParamsToEntries(volumeParamsXml)
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def serviceId = execution.getVariable('UPDVfModVol_serviceId')
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <updateVolumeGroupRequest>
+ <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vnfName>${vnfName}</vnfName>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupName>${volumeGroupName}</volumeGroupName>
+ <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion>${vnfVersion}</vnfVersion>
+ <vfModuleType></vfModuleType>
+ <modelCustomizationUuid>${modelCustomizationId}</modelCustomizationUuid>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>${vnfId}</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>${vnfName}</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>${volumeGroupId}</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>${volumeGroupName}</value>
+ </entry>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </updateVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+ }
+
+ /**
+ * Prepare a Request for updating the DB for this Infra request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDbInfraDbRequest(Execution execution, isDebugLogEnabled) {
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfModVol_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+ }
+
+ /**
+ * Build a "CompletionHandler" request.
+ * @param execution The flow's execution instance.
+ */
+ public void prepCompletionHandlerRequest(Execution execution, requestId, action, source, isDebugLogEnabled) {
+
+ String content = """
+ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: UPDATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ logDebug('Request for Completion Handler:\n' + content, isDebugLogEnabled)
+ execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
+ }
+
+
+ /**
+ * Build a "FalloutHandler" request.
+ * @param execution The flow's execution instance.
+ */
+ public void prepFalloutHandler(Execution execution, isDebugLogEnabled) {
+
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ logDebug('Request for Fallout Handler:\n' + content, isDebugLogEnabled)
+ execution.setVariable('UPDVfModVol_FalloutHandlerRequest', content)
+ }
+
+ /**
+ * Create a WorkflowException for the error case where the Tenant Id from
+ * AAI did not match the Tenant Id in the incoming request.
+ * @param execution The flow's execution instance.
+ */
+ public void handleTenantIdMismatch(Execution execution, isDebugLogEnabled) {
+
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupTenantId = execution.getVariable('UPDVfModVol_volumeGroupTenantId')
+
+ def String errorMessage = "TenantId " + tenantId + " in incoming request does not match Tenant Id " + volumeGroupTenantId +
+ " retrieved from AAI for Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ logError('Error in UpdateVfModuleVol: ' + errorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+
+ /**
+ * Create a WorkflowException for the error case where the Personal Model Id from
+ * AAI did not match the model invariant ID in the incoming request.
+ * @param execution The flow's execution instance.
+ */
+ public void handlePersonaModelIdMismatch(Execution execution, isDebugLogEnabled) {
+
+ def modelInvariantId = execution.getVariable('UPDVfModVol_modelInvariantId')
+ def personaModelId = execution.getVariable('UPDVfModVol_personaModelId')
+
+ def String errorMessage = "Model Invariant ID " + modelInvariantId + " in incoming request does not match persona model ID " + personaModelId +
+ " retrieved from AAI for Volume Group Id "
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ logError('Error in UpdateVfModuleVol: ' + errorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java
new file mode 100644
index 0000000..2f1ca17
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.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.infrastructure;
+
+import java.util.List;
+
+import org.camunda.bpm.application.PostDeploy;
+import org.camunda.bpm.application.PreUndeploy;
+import org.camunda.bpm.application.ProcessApplication;
+import org.camunda.bpm.application.ProcessApplicationInfo;
+import org.camunda.bpm.application.impl.ServletProcessApplication;
+import org.camunda.bpm.engine.ProcessEngine;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * @since Version 1.0
+ *
+ */
+@ProcessApplication("MSO Infrastructure Application")
+public class MSOInfrastructureApplication extends ServletProcessApplication {
+
+ private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ @PostDeploy
+ public void postDeploy(ProcessEngine processEngineInstance) {
+ long startTime = System.currentTimeMillis();
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Post deployment complete...");
+ }
+
+ @PreUndeploy
+ public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo, List<ProcessEngine> processEngines) {
+ long startTime = System.currentTimeMillis();
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Pre Undeploy complete...");
+
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java
new file mode 100644
index 0000000..0a35f52
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;
+
+import javax.ws.rs.Path;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;
+
+
+/**
+ *
+ * @version 1.0
+ * Asynchronous Workflow processing using JAX RS RESTeasy implementation
+ * Both Synchronous and Asynchronous BPMN process can benefit from this implementation since the workflow gets executed in the background
+ * and the server thread is freed up, server scales better to process more incoming requests
+ *
+ * Usage: For synchronous process, when you are ready to send the response invoke the callback to write the response
+ * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process
+ */
+@Path("/async")
+public class WorkflowAsyncInfrastructureResource extends WorkflowAsyncResource {
+
+ protected ProcessEngineServices getProcessEngineServices() {
+ if (pes4junit == null) {
+ return ProcessEngines.getProcessEngine("infrastructure");
+ } else {
+ return pes4junit;
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java
new file mode 100644
index 0000000..79eafbe
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowMessageResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;
+
+/**
+ * @version 1.0
+ * RESTeasy workflow application which wires synchronous and asynchronous response
+ *
+ */
+@ApplicationPath("/")
+public class WorkflowResourceApplication extends Application {
+ private Set<Object> singletons = new HashSet<Object>();
+ private Set<Class<?>> classes = new HashSet<Class<?>>();
+
+ public WorkflowResourceApplication() {
+ singletons.add(new WorkflowResource());
+ singletons.add(new WorkflowAsyncInfrastructureResource());
+ singletons.add(new WorkflowMessageResource());
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return classes;
+ }
+
+ @Override
+ public Set<Object> getSingletons() {
+ return singletons;
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..62fcfad
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+
+ <persistence-unit name="infrastructure">
+ <jta-data-source>java:jboss/datasources/ProcessEngine</jta-data-source>
+ <properties>
+ <!-- Properties for Hibernate -->
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ <property name="hibernate.show_sql" value="true" />
+ </properties>
+ </persistence-unit>
+
+</persistence>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml
new file mode 100644
index 0000000..511ba0a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+
+<process-application
+ xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <process-engine name="infrastructure">
+ <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
+ <datasource>java:jboss/datasources/ProcessEngine</datasource>
+ <properties>
+ <property name="history">full</property>
+ <property name="databaseSchemaUpdate">true</property>
+ <property name="authorizationEnabled">true</property>
+ <property name="jobExecutorDeploymentAware">true</property>
+ <property name="jobExecutorActivate">true</property>
+ </properties>
+ <plugins>
+
+ <!-- plugin enabling Process Application event listener support -->
+ <plugin>
+ <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
+ </plugin>
+
+ <!-- plugin enabling integration of camunda Spin -->
+ <plugin>
+ <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
+ </plugin>
+
+ <!-- plugin enabling connect support -->
+ <plugin>
+ <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
+ </plugin>
+
+ <plugin>
+ <class>org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin</class>
+ </plugin>
+
+ <!-- Needed until all subflows generate MSOWorkflowException events -->
+ <plugin>
+ <class>org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin</class>
+ </plugin>
+
+ <!-- Optional Plugin for Camunda BPM Workbench -->
+ <!-- <plugin>
+ <class>org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap</class>
+ <properties>
+ <property name="httpPort">8088</property>
+ </properties>
+ </plugin> -->
+ </plugins>
+ </process-engine>
+
+
+ <process-archive name="MSOInfrastructureBPMN">
+ <process-engine>infrastructure</process-engine>
+ <properties>
+ <property name="isDeleteUponUndeploy">false</property>
+ <property name="isScanForProcessDefinitions">true</property>
+ </properties>
+ </process-archive>
+
+</process-application>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml b/bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml
new file mode 100644
index 0000000..133fa54
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml
@@ -0,0 +1,159 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<configuration scan="true" scanPeriod="3 seconds" debug="true">
+ <!--<jmxConfigurator /> -->
+ <!-- directory path for all other type logs -->
+ <property name="logDir" value="/var/log/ecomp" />
+
+ <!-- directory path for debugging type logs -->
+ <property name="debugDir" value="/var/log/ecomp" />
+
+ <!-- specify the component name
+ <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <property name="componentName" value="MSO"></property>
+ <property name="subComponentName" value="BPMN"></property>
+ <!-- log file names -->
+ <property name="errorLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+
+ <property name="errorPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
+ <property name="debugPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{RequestId}|%msg%n" />
+
+ <property name="auditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||||||%msg%n" />
+ <property name="metricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|||||%msg%n" />
+ <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
+
+
+ <!-- ============================================================================ -->
+ <!-- EELF Appenders -->
+ <!-- ============================================================================ -->
+
+ <!-- The EELFAppender is used to record events to the general application
+ log -->
+
+ <!-- EELF Audit Appender. This appender is used to record audit engine
+ related logging events. The audit logger and appender are specializations
+ of the EELF application root logger and appender. This can be used to segregate
+ Policy engine events from other components, or it can be eliminated to record
+ these events as part of the application root log. -->
+
+ <appender name="EELFAudit"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${auditLogName}${jboss.server.name}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}${jboss.server.name}.log.%d</fileNamePattern>
+ <!--<maxHistory>30</maxHistory>-->
+ </rollingPolicy>
+ <encoder>
+ <pattern>${auditPattern}</pattern>
+ </encoder>
+ </appender>
+ <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFAudit" />
+ </appender>
+
+ <appender name="EELFMetrics"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${metricsLogName}${jboss.server.name}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${metricsLogName}${jboss.server.name}.log.%d</fileNamePattern>
+ <!--<maxHistory>30</maxHistory>-->
+ </rollingPolicy>
+ <encoder>
+ <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
+ %msg%n"</pattern> -->
+ <pattern>${metricPattern}</pattern>
+ </encoder>
+ </appender>
+
+
+ <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFMetrics"/>
+ </appender>
+
+ <appender name="EELFError"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${errorLogName}${jboss.server.name}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${errorLogName}${jboss.server.name}.log.%d</fileNamePattern>
+ <!--<maxHistory>30</maxHistory>-->
+ </rollingPolicy>
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <encoder>
+ <pattern>${errorPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFError"/>
+ </appender>
+
+ <appender name="EELFDebug"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${debugLogDirectory}/${debugLogName}${jboss.server.name}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${debugLogDirectory}/${debugLogName}${jboss.server.name}.log.%d</fileNamePattern>
+ <!--<maxHistory>30</maxHistory>-->
+ </rollingPolicy>
+ <encoder>
+ <pattern>${debugPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFDebug" />
+ <includeCallerData>true</includeCallerData>
+ </appender>
+
+
+ <!-- ============================================================================ -->
+ <!-- EELF loggers -->
+ <!-- ============================================================================ -->
+
+ <logger name="com.att.eelf.audit" level="info" additivity="false">
+ <appender-ref ref="asyncEELFAudit" />
+ </logger>
+
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+ <appender-ref ref="asyncEELFMetrics" />
+ </logger>
+
+ <logger name="com.att.eelf.error" level="debug" additivity="false">
+ <appender-ref ref="asyncEELFError" />
+ </logger>
+ <root level="INFO">
+ <appender-ref ref="asyncEELFDebug" />
+ </root>
+
+</configuration>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn
new file mode 100644
index 0000000..1f53182
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn
@@ -0,0 +1,1203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateGenericMacroServiceNetworkVnf" name="CreateGenericMacroServiceNetworkVnf" isExecutable="true">
+ <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:startEvent id="createVIPR_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVIPR_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vIPR-ATM">
+ <bpmn2:outgoing>SequenceFlow_10o22u2</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vIPR-ATM" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &#38; Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0afe2pg</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" />
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="CREVAS_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_2" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("CreateGenericMacroServiceNetworkVnfSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="CreateVIPR_EndEvent" />
+ <bpmn2:endEvent id="CreateVIPR_EndEvent" name="End">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_13" />
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_4" name="FinishProcess">
+ <bpmn2:outgoing>SequenceFlow_12ilko1</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_39" name="FinishProcess" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:callActivity id="doCreateNetworkInstance_CallActivity" name="DoCreate&#10;Network&#10;Instance" calledElement="DoCreateNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="networkModelInfo" target="networkModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="networkInputParams" target="networkInputParams" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rollbackData" target="DCRENI_rollbackData" />
+ <camunda:out source="rolledBack" target="DCRENI_rolledBack" />
+ <camunda:out source="networkId" target="networkId" />
+ <camunda:out source="networkName" target="networkName" />
+ <camunda:out source="networkOutputParams" target="networkOutputParams" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1bwbn7r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12ag2bk</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_PrepareNetworkCreate" name="Prepare for Network Create" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cmebdc</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dfkfh1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1bwbn7r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.prepareNetworkCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="doCreateServiceInstance_CallActivity" name="DoCreate&#10;ServiceInstance&#10;" calledElement="DoCreateServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in sourceExpression="vIPR-ATM" target="subscriptionServiceType" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="rollbackData" target="DCRESI_rollbackData" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:out source="rolledBack" target="DCRESI_rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0j6sjye</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ky2sv9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="doCreateVNFandModules_CallActivity" name="DoCreate&#10;VNF and Modules&#10;" calledElement="DoCreateVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rollbackData" target="DCVM_rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="vnfId" target="vnfId" />
+ <camunda:out source="vnfName" target="vnfName" />
+ <camunda:out source="vnfOutputParams" target="vnfOutputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1h77psn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qi5uxg</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Prepare to Create VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bvecvm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1h77psn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.prepareVnfAndModulesCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_4" name="GoToFinishProcess">
+ <bpmn2:incoming>SequenceFlow_0xowenu</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_41" name="FinishProcess" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="GoTovIPR-ATM">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_38" name="vIPR-ATM" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:subProcess id="SubProcess_0s6hpty" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1vwgs6p" name="Is Rollback On?" default="SequenceFlow_0dhf2js">
+ <bpmn2:incoming>SequenceFlow_0zq7i3q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zpbskl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dhf2js</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:startEvent id="StartEvent_1bwmffk" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_0zq7i3q</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ydrtdx" name="isPONR?" default="SequenceFlow_02o4yqx">
+ <bpmn2:incoming>SequenceFlow_0zpbskl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1sx5llu</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_02o4yqx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_00rt5qa" name="is VNF Ok?" default="SequenceFlow_05lo85t">
+ <bpmn2:incoming>SequenceFlow_0sdb3on</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05lo85t</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0xtr1g5</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1kvn1pz" name="Network Rollback present?" default="SequenceFlow_19mxskt">
+ <bpmn2:incoming>SequenceFlow_05lo85t</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_09xerwk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19mxskt</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0tmepzk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="CallActivity_0jw5tqa" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVAS_falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0807ukc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19yywk8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_04xute7">
+ <bpmn2:incoming>SequenceFlow_19yywk8</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_1pqjttt">
+ <bpmn2:incoming>SequenceFlow_19mxskt</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1brxd2r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08s0ew2</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_0yk02h3" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0jg47xm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0807ukc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zpbskl" name="Yes" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="ExclusiveGateway_0ydrtdx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("disableRollback") != true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dhf2js" name="No" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="InclusiveGateway_0foywso" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1sx5llu" name="Yes" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="InclusiveGateway_0foywso">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PONR") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_02o4yqx" name="No" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="ScriptTask_17doerz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_05lo85t" name="No" sourceRef="ExclusiveGateway_00rt5qa" targetRef="ExclusiveGateway_1kvn1pz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xtr1g5" name="Yes" sourceRef="ExclusiveGateway_00rt5qa" targetRef="DoRollbackVNFandModules_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVM_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19mxskt" name="No" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="InclusiveGateway_1pqjttt" />
+ <bpmn2:callActivity id="DoRollbackVNFandModules_CallActivity" name="DoRollback&#10;VNF and Modules&#10;" calledElement="DoCreateVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCVAM_rollbackData" target="rollbackData" />
+ <camunda:out source="rollbackSuccessful" target="DCVAM_rollbackSuccessful" />
+ <camunda:out source="rollbackError" target="DCVAM_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xtr1g5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_09xerwk</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_09xerwk" sourceRef="DoRollbackVNFandModules_CallActivity" targetRef="ExclusiveGateway_1kvn1pz" />
+ <bpmn2:callActivity id="DoRollbackNetwork_CallActivity" name="DoRollback&#10;Network" calledElement="DoCreateNetworkInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCRENI_rollbackData" target="rollbackData" />
+ <camunda:out source="rollbackSuccessful" target="DCRENI_rollbackSuccessful" />
+ <camunda:out source="rollbackError" target="DCRENI_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0136s37</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1fqmrda</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1dmsx0d</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09o09bu" name="Network rolled back OK?" default="SequenceFlow_0g7scsg">
+ <bpmn2:incoming>SequenceFlow_1ieiew4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1os9x7w</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0g7scsg</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="DoRollbackService_CallActivity" name="DoRollback&#10;Service&#10;" calledElement="DoCreateServiceInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCRESI_rollbackData" target="rollbackData" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackSuccessful" target="DCRESI_rollbackSuccessful" />
+ <camunda:out source="rollbackError" target="DCRESI_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1os9x7w</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1f1hd3l</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_0foywso">
+ <bpmn2:incoming>SequenceFlow_1sx5llu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dhf2js</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1rabks0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0jg47xm</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1os9x7w" name="Yes" sourceRef="ExclusiveGateway_09o09bu" targetRef="DoRollbackService_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRENI_rollbackSuccessful") == null || execution.getVariable("DCRENI_rollbackSuccessful") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f1hd3l" sourceRef="DoRollbackService_CallActivity" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0g7scsg" name="No" sourceRef="ExclusiveGateway_09o09bu" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0jg47xm" sourceRef="InclusiveGateway_0foywso" targetRef="ScriptTask_0yk02h3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0807ukc" sourceRef="ScriptTask_0yk02h3" targetRef="CallActivity_0jw5tqa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19yywk8" sourceRef="CallActivity_0jw5tqa" targetRef="EndEvent_04xute7" />
+ <bpmn2:scriptTask id="ScriptTask_184teky" name="Validate Network Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1dmsx0d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1otyild</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.validateNetworkRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1c386z9" name="Rollback Additional Networks?" default="SequenceFlow_12u8ufr">
+ <bpmn2:incoming>SequenceFlow_1otyild</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0136s37</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_12u8ufr</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dmsx0d" sourceRef="DoRollbackNetwork_CallActivity" targetRef="ScriptTask_184teky" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1otyild" sourceRef="ScriptTask_184teky" targetRef="ExclusiveGateway_1c386z9" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0136s37" name="Yes" sourceRef="ExclusiveGateway_1c386z9" targetRef="DoRollbackNetwork_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CREVAS_NetworksCreatedCount") > 0 }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_12u8ufr" name="No" sourceRef="ExclusiveGateway_1c386z9" targetRef="ExclusiveGateway_05indeh" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1bts0nw" name="VNF rolled back OK?" default="SequenceFlow_1brxd2r">
+ <bpmn2:incoming>SequenceFlow_0tmepzk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1fqmrda</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1brxd2r</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tmepzk" name="Yes" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="ExclusiveGateway_1bts0nw">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRENI_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1fqmrda" name="Yes" sourceRef="ExclusiveGateway_1bts0nw" targetRef="DoRollbackNetwork_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCVAM_rollbackSuccessful") == null || execution.getVariable("DCVAM_rollbackSuccessful") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1brxd2r" name="No" sourceRef="ExclusiveGateway_1bts0nw" targetRef="InclusiveGateway_1pqjttt" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_05indeh" name="Service Rollback present?" default="SequenceFlow_0sezboq">
+ <bpmn2:incoming>SequenceFlow_12u8ufr</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_08s0ew2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ieiew4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0sezboq</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_08s0ew2" sourceRef="InclusiveGateway_1pqjttt" targetRef="ExclusiveGateway_05indeh" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ieiew4" name="Yes" sourceRef="ExclusiveGateway_05indeh" targetRef="ExclusiveGateway_09o09bu">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRESI_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sezboq" name="No" sourceRef="ExclusiveGateway_05indeh" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0zq7i3q" name="" sourceRef="StartEvent_1bwmffk" targetRef="ExclusiveGateway_1vwgs6p" />
+ <bpmn2:inclusiveGateway id="InclusiveGateway_0m9f5ka">
+ <bpmn2:incoming>SequenceFlow_1f1hd3l</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0g7scsg</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0sezboq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0f4u373</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_17doerz" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_02o4yqx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0sdb3on</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_0wyub4x" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0f4u373</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rabks0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sdb3on" sourceRef="ScriptTask_17doerz" targetRef="ExclusiveGateway_00rt5qa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0f4u373" sourceRef="InclusiveGateway_0m9f5ka" targetRef="ScriptTask_0wyub4x" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1rabks0" sourceRef="ScriptTask_0wyub4x" targetRef="InclusiveGateway_0foywso" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="callDbCatalog_scriptTask" name="Get Models Info&#10; for Service (DB Catalog)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1vwssu7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19etqmx</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.callDBCatalog(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="prepareCreateService_scriptTask" name="Prepare&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10o22u2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0j6sjye</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.prepareCreateServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10o22u2" sourceRef="IntermediateCatchEvent_3" targetRef="prepareCreateService_scriptTask" />
+ <bpmn2:scriptTask id="setPONR_ScriptTask" name="set PONR">
+ <bpmn2:incoming>SequenceFlow_12ilko1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0afe2pg</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("PONR", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12ilko1" sourceRef="IntermediateCatchEvent_4" targetRef="setPONR_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0afe2pg" sourceRef="setPONR_ScriptTask" targetRef="postProcessAndCompletionRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1bwbn7r" sourceRef="ScriptTask_PrepareNetworkCreate" targetRef="doCreateNetworkInstance_CallActivity" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1n7r495" name="No" sourceRef="ExclusiveGateway_0fe690i" targetRef="ExclusiveGateway_1os8cm5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1h77psn" sourceRef="ScriptTask_3" targetRef="doCreateVNFandModules_CallActivity" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1nh09nr" name="StartNetworks">
+ <bpmn2:outgoing>SequenceFlow_1vwssu7</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartNetworks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo StartNetworks">
+ <bpmn2:incoming>SequenceFlow_13uceka</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartNetworks" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0b9wd4f" name="Create Network(s)?" default="SequenceFlow_1f26zbk">
+ <bpmn2:incoming>SequenceFlow_19etqmx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cmebdc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1f26zbk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0fe690i" name="Create Additional Networks?" default="SequenceFlow_1n7r495">
+ <bpmn2:incoming>SequenceFlow_04vlq8r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1n7r495</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dfkfh1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dfkfh1" name="Yes" sourceRef="ExclusiveGateway_0fe690i" targetRef="ScriptTask_PrepareNetworkCreate">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CREVAS_NetworksCreatedCount") < execution.getVariable("CREVAS_NetworksCount")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0cmebdc" name="Yes" sourceRef="ExclusiveGateway_0b9wd4f" targetRef="ScriptTask_PrepareNetworkCreate">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CREVAS_NetworksCount") > 0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1os8cm5">
+ <bpmn2:incoming>SequenceFlow_1n7r495</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1f26zbk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1j7n6qx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f26zbk" name="No" sourceRef="ExclusiveGateway_0b9wd4f" targetRef="ExclusiveGateway_1os8cm5" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0nreq15" name="GoTo StartVnfs">
+ <bpmn2:incoming>SequenceFlow_1j7n6qx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vwssu7" sourceRef="IntermediateCatchEvent_1nh09nr" targetRef="callDbCatalog_scriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19etqmx" sourceRef="callDbCatalog_scriptTask" targetRef="ExclusiveGateway_0b9wd4f" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1j7n6qx" sourceRef="ExclusiveGateway_1os8cm5" targetRef="IntermediateThrowEvent_0nreq15" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0rlqdvq" name="StartVnfs">
+ <bpmn2:outgoing>SequenceFlow_10tbv62</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1nlocis" name="Create VNF?" default="SequenceFlow_0w7328u">
+ <bpmn2:incoming>SequenceFlow_10tbv62</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bvecvm</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0w7328u</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_04q1qud">
+ <bpmn2:incoming>SequenceFlow_0qi5uxg</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0w7328u</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xowenu</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10tbv62" sourceRef="IntermediateCatchEvent_0rlqdvq" targetRef="ExclusiveGateway_1nlocis" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0bvecvm" name="Yes" sourceRef="ExclusiveGateway_1nlocis" targetRef="ScriptTask_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CREVAS_VNFsCount") >0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qi5uxg" name="in 1702 scope only one VNF will be created - if needed" sourceRef="doCreateVNFandModules_CallActivity" targetRef="ExclusiveGateway_04q1qud">
+ <bpmn2:documentation>in 1702 scope only one VNF will be created</bpmn2:documentation>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0w7328u" name="No" sourceRef="ExclusiveGateway_1nlocis" targetRef="ExclusiveGateway_04q1qud" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xowenu" sourceRef="ExclusiveGateway_04q1qud" targetRef="IntermediateThrowEvent_4" />
+ <bpmn2:scriptTask id="ScriptTask_04o8gb3" name="Validate Network Create" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12ag2bk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04vlq8r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.validateNetworkCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12ag2bk" sourceRef="doCreateNetworkInstance_CallActivity" targetRef="ScriptTask_04o8gb3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04vlq8r" sourceRef="ScriptTask_04o8gb3" targetRef="ExclusiveGateway_0fe690i" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0j6sjye" sourceRef="prepareCreateService_scriptTask" targetRef="doCreateServiceInstance_CallActivity" />
+ <bpmn2:serviceTask id="updateInfraRequest" name="Update DB status to SUCCESS">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CREVAS_setUpdateDbInstancePayload")}]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0vj46ej</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13uceka</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13uceka" sourceRef="updateInfraRequest" targetRef="IntermediateThrowEvent_0prlju0" />
+ <bpmn2:scriptTask id="ScriptTask_1qd3uwb" name="PostProcess&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ky2sv9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vj46ej</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.postProcessServiceInstanceCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ky2sv9" sourceRef="doCreateServiceInstance_CallActivity" targetRef="ScriptTask_1qd3uwb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vj46ej" sourceRef="ScriptTask_1qd3uwb" targetRef="updateInfraRequest" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateGenericMacroServiceNetworkVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVIPR_startEvent">
+ <dc:Bounds x="96" y="90" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="82" y="131" width="65" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="285" y="68" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="132" y="108" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="108" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds x="787" y="1115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="514" y="1115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="385" y="108" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="69" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="476" y="68" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+ <di:waypoint xsi:type="dc:Point" x="614" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="787" y="1155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="1140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="CreateVIPR_EndEvent">
+ <dc:Bounds x="1286" y="1135" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1294" y="1176" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_337">
+ <di:waypoint xsi:type="dc:Point" x="887" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="1095" y="1154" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="991" y="1140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="1281" y="1385" width="409" height="232" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="1349" y="1490" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1367" y="1531" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="1424" y="1468" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1577" y="1490" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1595" y="1531" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="1385" y="1508" />
+ <di:waypoint xsi:type="dc:Point" x="1424" y="1508" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1413" y="1508" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="1524" y="1508" />
+ <di:waypoint xsi:type="dc:Point" x="1557" y="1508" />
+ <di:waypoint xsi:type="dc:Point" x="1557" y="1508" />
+ <di:waypoint xsi:type="dc:Point" x="1577" y="1508" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1572" y="1508" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_75" bpmnElement="doCreateServiceInstance_CallActivity">
+ <dc:Bounds x="476" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="576" y="108" />
+ <di:waypoint xsi:type="dc:Point" x="728" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="652" y="93" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_337" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="1095" y="1114" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_337" targetElement="_BPMNShape_EndEvent_177">
+ <di:waypoint xsi:type="dc:Point" x="1195" y="1153" />
+ <di:waypoint xsi:type="dc:Point" x="1286" y="1153" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1241" y="1138" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_76" bpmnElement="doCreateNetworkInstance_CallActivity">
+ <dc:Bounds x="542" y="491" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_35" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="96" y="245" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="281" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_36" bpmnElement="IntermediateCatchEvent_4">
+ <dc:Bounds x="84" y="1137" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="66" y="1173" width="71" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_51" bpmnElement="IntermediateThrowEvent_4">
+ <dc:Bounds x="1033" y="854" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1008" y="895" width="85" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_341" bpmnElement="ScriptTask_PrepareNetworkCreate">
+ <dc:Bounds x="400" y="488" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_342" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="456" y="765" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_81" bpmnElement="doCreateVNFandModules_CallActivity">
+ <dc:Bounds x="623" y="765" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="728" y="90" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="707" y="131" width="77" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0s6hpty_di" bpmnElement="SubProcess_0s6hpty" isExpanded="true">
+ <dc:Bounds x="-75" y="1333" width="1324" height="837" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1vwgs6p_di" bpmnElement="ExclusiveGateway_1vwgs6p" isMarkerVisible="true">
+ <dc:Bounds x="79" y="2042" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="66" y="2102" width="80" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1bwmffk_di" bpmnElement="StartEvent_1bwmffk">
+ <dc:Bounds x="-34" y="2050" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-40" y="2091" width="50" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ydrtdx_di" bpmnElement="ExclusiveGateway_0ydrtdx" isMarkerVisible="true">
+ <dc:Bounds x="79" y="1935" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="13" y="1950" width="47" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_00rt5qa_di" bpmnElement="ExclusiveGateway_00rt5qa" isMarkerVisible="true">
+ <dc:Bounds x="79" y="1625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="5" y="1640" width="57" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1kvn1pz_di" bpmnElement="ExclusiveGateway_1kvn1pz" isMarkerVisible="true">
+ <dc:Bounds x="206" y="1505" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="188" y="1471" width="89" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0jw5tqa_di" bpmnElement="CallActivity_0jw5tqa">
+ <dc:Bounds x="1052" y="2016" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_04xute7_di" bpmnElement="EndEvent_04xute7">
+ <dc:Bounds x="1189" y="2038" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1207" y="2079" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_1pqjttt_di" bpmnElement="InclusiveGateway_1pqjttt">
+ <dc:Bounds x="303" y="1625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="328" y="1680" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yk02h3_di" bpmnElement="ScriptTask_0yk02h3">
+ <dc:Bounds x="920" y="2016" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zpbskl_di" bpmnElement="SequenceFlow_0zpbskl">
+ <di:waypoint xsi:type="dc:Point" x="104" y="2042" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="110" y="2023.785849077779" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dhf2js_di" bpmnElement="SequenceFlow_0dhf2js">
+ <di:waypoint xsi:type="dc:Point" x="129" y="2067" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="2067" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="169" y="2072" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sx5llu_di" bpmnElement="SequenceFlow_1sx5llu">
+ <di:waypoint xsi:type="dc:Point" x="129" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="434" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="434" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="1960" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="448" y="1964" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_02o4yqx_di" bpmnElement="SequenceFlow_02o4yqx">
+ <di:waypoint xsi:type="dc:Point" x="104" y="1935" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1851" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="115" y="1888.0011779924323" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05lo85t_di" bpmnElement="SequenceFlow_05lo85t">
+ <di:waypoint xsi:type="dc:Point" x="129" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="231" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="231" y="1555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="133" y="1654" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xtr1g5_di" bpmnElement="SequenceFlow_0xtr1g5">
+ <di:waypoint xsi:type="dc:Point" x="104" y="1625" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1570" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="113" y="1565" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19mxskt_di" bpmnElement="SequenceFlow_19mxskt">
+ <di:waypoint xsi:type="dc:Point" x="242" y="1544" />
+ <di:waypoint xsi:type="dc:Point" x="317" y="1636" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="281" y="1572" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0r7telk_di" bpmnElement="callDbCatalog_scriptTask">
+ <dc:Bounds x="184" y="533" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1gacz45_di" bpmnElement="prepareCreateService_scriptTask">
+ <dc:Bounds x="285" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10o22u2_di" bpmnElement="SequenceFlow_10o22u2">
+ <di:waypoint xsi:type="dc:Point" x="132" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="262" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="247.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_11b4gmn_di" bpmnElement="setPONR_ScriptTask">
+ <dc:Bounds x="228" y="1115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ilko1_di" bpmnElement="SequenceFlow_12ilko1">
+ <di:waypoint xsi:type="dc:Point" x="120" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="228" y="1155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="174" y="1130" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0afe2pg_di" bpmnElement="SequenceFlow_0afe2pg">
+ <di:waypoint xsi:type="dc:Point" x="328" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="471" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="514" y="1155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="400" y="1140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1cvt373_di" bpmnElement="DoRollbackVNFandModules_CallActivity">
+ <dc:Bounds x="54" y="1490" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09xerwk_di" bpmnElement="SequenceFlow_09xerwk">
+ <di:waypoint xsi:type="dc:Point" x="154" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="180" y="1515" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0zl1ald_di" bpmnElement="DoRollbackNetwork_CallActivity">
+ <dc:Bounds x="404" y="1490" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09o09bu_di" bpmnElement="ExclusiveGateway_09o09bu" isMarkerVisible="true">
+ <dc:Bounds x="608" y="1625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="596" y="1596" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0oh7wzu_di" bpmnElement="DoRollbackService_CallActivity">
+ <dc:Bounds x="713" y="1610" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_0foywso_di" bpmnElement="InclusiveGateway_0foywso">
+ <dc:Bounds x="738" y="1935" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="763" y="1990" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1os9x7w_di" bpmnElement="SequenceFlow_1os9x7w">
+ <di:waypoint xsi:type="dc:Point" x="658" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="1650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="678" y="1635" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f1hd3l_di" bpmnElement="SequenceFlow_1f1hd3l">
+ <di:waypoint xsi:type="dc:Point" x="763" y="1690" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1743" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="778" y="1716.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g7scsg_di" bpmnElement="SequenceFlow_0g7scsg">
+ <di:waypoint xsi:type="dc:Point" x="633" y="1675" />
+ <di:waypoint xsi:type="dc:Point" x="633" y="1768" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="1768" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="641" y="1710.0295234297107" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jg47xm_di" bpmnElement="SequenceFlow_0jg47xm">
+ <di:waypoint xsi:type="dc:Point" x="788" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="970" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="970" y="2016" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="879" y="1945" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0807ukc_di" bpmnElement="SequenceFlow_0807ukc">
+ <di:waypoint xsi:type="dc:Point" x="1020" y="2056" />
+ <di:waypoint xsi:type="dc:Point" x="1052" y="2056" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="2041" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19yywk8_di" bpmnElement="SequenceFlow_19yywk8">
+ <di:waypoint xsi:type="dc:Point" x="1152" y="2056" />
+ <di:waypoint xsi:type="dc:Point" x="1189" y="2056" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1171" y="2041" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bwbn7r_di" bpmnElement="SequenceFlow_1bwbn7r">
+ <di:waypoint xsi:type="dc:Point" x="500" y="530" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="529" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="521" y="514.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n7r495_di" bpmnElement="SequenceFlow_1n7r495">
+ <di:waypoint xsi:type="dc:Point" x="882" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="561" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="896" y="513" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h77psn_di" bpmnElement="SequenceFlow_1h77psn">
+ <di:waypoint xsi:type="dc:Point" x="556" y="806" />
+ <di:waypoint xsi:type="dc:Point" x="586" y="806" />
+ <di:waypoint xsi:type="dc:Point" x="586" y="804" />
+ <di:waypoint xsi:type="dc:Point" x="623" y="804" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="601" y="805" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1nh09nr_di" bpmnElement="IntermediateCatchEvent_1nh09nr">
+ <dc:Bounds x="83" y="555" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="66" y="591" width="70" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0prlju0_di" bpmnElement="IntermediateThrowEvent_0prlju0">
+ <dc:Bounds x="905" y="245" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888" y="286" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0b9wd4f_di" bpmnElement="ExclusiveGateway_0b9wd4f" isMarkerVisible="true">
+ <dc:Bounds x="332" y="548" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="393" y="580" width="61" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0fe690i_di" bpmnElement="ExclusiveGateway_0fe690i" isMarkerVisible="true">
+ <dc:Bounds x="828" y="503" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="796" y="561" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dfkfh1_di" bpmnElement="SequenceFlow_0dfkfh1">
+ <di:waypoint xsi:type="dc:Point" x="853" y="503" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="426" />
+ <di:waypoint xsi:type="dc:Point" x="450" y="426" />
+ <di:waypoint xsi:type="dc:Point" x="450" y="486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644" y="411" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cmebdc_di" bpmnElement="SequenceFlow_0cmebdc">
+ <di:waypoint xsi:type="dc:Point" x="357" y="548" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="400" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="363" y="538" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1os8cm5_di" bpmnElement="ExclusiveGateway_1os8cm5" isMarkerVisible="true">
+ <dc:Bounds x="898" y="561" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="923" y="616" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f26zbk_di" bpmnElement="SequenceFlow_1f26zbk">
+ <di:waypoint xsi:type="dc:Point" x="357" y="598" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="611" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="633" y="650" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0nreq15_di" bpmnElement="IntermediateThrowEvent_0nreq15">
+ <dc:Bounds x="1033" y="568" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1013" y="609" width="75" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vwssu7_di" bpmnElement="SequenceFlow_1vwssu7">
+ <di:waypoint xsi:type="dc:Point" x="119" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="184" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="152" y="548" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19etqmx_di" bpmnElement="SequenceFlow_19etqmx">
+ <di:waypoint xsi:type="dc:Point" x="284" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="332" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="308" y="548" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j7n6qx_di" bpmnElement="SequenceFlow_1j7n6qx">
+ <di:waypoint xsi:type="dc:Point" x="948" y="586" />
+ <di:waypoint xsi:type="dc:Point" x="1033" y="586" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="991" y="561" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0rlqdvq_di" bpmnElement="IntermediateCatchEvent_0rlqdvq">
+ <dc:Bounds x="83" y="870" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="77" y="906" width="45" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1nlocis_di" bpmnElement="ExclusiveGateway_1nlocis" isMarkerVisible="true">
+ <dc:Bounds x="332" y="863" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="396" y="882" width="62" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_04q1qud_di" bpmnElement="ExclusiveGateway_04q1qud" isMarkerVisible="true">
+ <dc:Bounds x="898" y="847" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="923" y="902" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10tbv62_di" bpmnElement="SequenceFlow_10tbv62">
+ <di:waypoint xsi:type="dc:Point" x="119" y="888" />
+ <di:waypoint xsi:type="dc:Point" x="332" y="888" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="226" y="863" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bvecvm_di" bpmnElement="SequenceFlow_0bvecvm">
+ <di:waypoint xsi:type="dc:Point" x="357" y="863" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="805" />
+ <di:waypoint xsi:type="dc:Point" x="456" y="805" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="368" y="838" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qi5uxg_di" bpmnElement="SequenceFlow_0qi5uxg">
+ <di:waypoint xsi:type="dc:Point" x="723" y="805" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="805" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="847" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="808" y="752" width="89" height="50" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w7328u_di" bpmnElement="SequenceFlow_0w7328u">
+ <di:waypoint xsi:type="dc:Point" x="357" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="937" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="937" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="898" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="603" y="913" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xowenu_di" bpmnElement="SequenceFlow_0xowenu">
+ <di:waypoint xsi:type="dc:Point" x="948" y="872" />
+ <di:waypoint xsi:type="dc:Point" x="1033" y="872" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="991" y="847" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_04o8gb3_di" bpmnElement="ScriptTask_04o8gb3">
+ <dc:Bounds x="686" y="491" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ag2bk_di" bpmnElement="SequenceFlow_12ag2bk">
+ <di:waypoint xsi:type="dc:Point" x="642" y="531" />
+ <di:waypoint xsi:type="dc:Point" x="686" y="531" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="664" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04vlq8r_di" bpmnElement="SequenceFlow_04vlq8r">
+ <di:waypoint xsi:type="dc:Point" x="786" y="531" />
+ <di:waypoint xsi:type="dc:Point" x="807" y="531" />
+ <di:waypoint xsi:type="dc:Point" x="807" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="828" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="822" y="519.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j6sjye_di" bpmnElement="SequenceFlow_0j6sjye">
+ <di:waypoint xsi:type="dc:Point" x="385" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="431" y="248" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_184teky_di" bpmnElement="ScriptTask_184teky">
+ <dc:Bounds x="546" y="1490" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1c386z9_di" bpmnElement="ExclusiveGateway_1c386z9" isMarkerVisible="true">
+ <dc:Bounds x="685" y="1505" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="758" y="1512" width="53" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dmsx0d_di" bpmnElement="SequenceFlow_1dmsx0d">
+ <di:waypoint xsi:type="dc:Point" x="504" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="525" y="1515" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1otyild_di" bpmnElement="SequenceFlow_1otyild">
+ <di:waypoint xsi:type="dc:Point" x="646" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="685" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="1515" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0136s37_di" bpmnElement="SequenceFlow_0136s37">
+ <di:waypoint xsi:type="dc:Point" x="710" y="1505" />
+ <di:waypoint xsi:type="dc:Point" x="710" y="1414" />
+ <di:waypoint xsi:type="dc:Point" x="454" y="1414" />
+ <di:waypoint xsi:type="dc:Point" x="454" y="1490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="574" y="1399" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12u8ufr_di" bpmnElement="SequenceFlow_12u8ufr">
+ <di:waypoint xsi:type="dc:Point" x="710" y="1555" />
+ <di:waypoint xsi:type="dc:Point" x="710" y="1586" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="1586" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="1625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="615" y="1571" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1bts0nw_di" bpmnElement="ExclusiveGateway_1bts0nw" isMarkerVisible="true">
+ <dc:Bounds x="303" y="1505" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="289" y="1471" width="81" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tmepzk_di" bpmnElement="SequenceFlow_0tmepzk">
+ <di:waypoint xsi:type="dc:Point" x="256" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="1505" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fqmrda_di" bpmnElement="SequenceFlow_1fqmrda">
+ <di:waypoint xsi:type="dc:Point" x="353" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="404" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="370" y="1505" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1brxd2r_di" bpmnElement="SequenceFlow_1brxd2r">
+ <di:waypoint xsi:type="dc:Point" x="328" y="1555" />
+ <di:waypoint xsi:type="dc:Point" x="328" y="1625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="336" y="1580" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_05indeh_di" bpmnElement="ExclusiveGateway_05indeh" isMarkerVisible="true">
+ <dc:Bounds x="505" y="1625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="430" y="1593" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08s0ew2_di" bpmnElement="SequenceFlow_08s0ew2">
+ <di:waypoint xsi:type="dc:Point" x="353" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="505" y="1650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="429" y="1625" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ieiew4_di" bpmnElement="SequenceFlow_1ieiew4">
+ <di:waypoint xsi:type="dc:Point" x="555" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="608" y="1650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573" y="1625" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sezboq_di" bpmnElement="SequenceFlow_0sezboq">
+ <di:waypoint xsi:type="dc:Point" x="530" y="1675" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="1768" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="1768" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="538" y="1710.0295234297107" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_16yhzej_di" bpmnElement="updateInfraRequest">
+ <dc:Bounds x="764" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13uceka_di" bpmnElement="SequenceFlow_13uceka">
+ <di:waypoint xsi:type="dc:Point" x="864" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="905" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="885" y="248" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1qd3uwb_di" bpmnElement="ScriptTask_1qd3uwb">
+ <dc:Bounds x="618" y="226" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ky2sv9_di" bpmnElement="SequenceFlow_1ky2sv9">
+ <di:waypoint xsi:type="dc:Point" x="576" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="597" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="597" y="266" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="266" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="612" y="254.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vj46ej_di" bpmnElement="SequenceFlow_0vj46ej">
+ <di:waypoint xsi:type="dc:Point" x="718" y="266" />
+ <di:waypoint xsi:type="dc:Point" x="741" y="266" />
+ <di:waypoint xsi:type="dc:Point" x="741" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="764" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="756" y="254.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_17doerz_di" bpmnElement="ScriptTask_17doerz">
+ <dc:Bounds x="54" y="1771" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zq7i3q_di" bpmnElement="SequenceFlow_0zq7i3q">
+ <di:waypoint xsi:type="dc:Point" x="2" y="2068" />
+ <di:waypoint xsi:type="dc:Point" x="49" y="2068" />
+ <di:waypoint xsi:type="dc:Point" x="49" y="2067" />
+ <di:waypoint xsi:type="dc:Point" x="79" y="2067" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="18" y="2069" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0m9f5ka_di" bpmnElement="InclusiveGateway_0m9f5ka">
+ <dc:Bounds x="738" y="1743" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="763" y="1798" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0wyub4x_di" bpmnElement="ScriptTask_0wyub4x">
+ <dc:Bounds x="713" y="1827" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sdb3on_di" bpmnElement="SequenceFlow_0sdb3on">
+ <di:waypoint xsi:type="dc:Point" x="104" y="1771" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1675" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="119" y="1713" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0f4u373_di" bpmnElement="SequenceFlow_0f4u373">
+ <di:waypoint xsi:type="dc:Point" x="763" y="1793" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1827" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="778" y="1800" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rabks0_di" bpmnElement="SequenceFlow_1rabks0">
+ <di:waypoint xsi:type="dc:Point" x="763" y="1907" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1935" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="778" y="1911" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn
new file mode 100644
index 0000000..e86d287
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn
@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateNetworkInstance" name="CreateNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def networkMod = new CreateNetworkInstance()
+networkMod.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doCreateNetworkInstance_CallActivity" name="DoCreate Network Instance&#10;" calledElement="DoCreateNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="networkId" target="networkId" />
+ <camunda:in source="networkName" target="networkName" />
+ <camunda:in source="networkModelInfo" target="networkModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="networkInputParams" target="networkInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="networkId" target="networkId" />
+ <camunda:out source="networkName" target="networkName" />
+ <camunda:out source="networkOutputParams" target="networkOutputParams" />
+ <camunda:in source="bpmnRequest" target="bpmnRequest" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_0x3znm5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_09qt0pi" name="CreateNetwork&#10;PostProcess Success&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x3znm5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doCreateNetworkInstance_CallActivity" targetRef="ScriptTask_0cihgpv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0x3znm5" sourceRef="ScriptTask_09qt0pi" targetRef="EndEvent_0o440av" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ablr60</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def preProcess = new CreateNetworkInstance()
+preProcess.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ablr60" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_19xbdbu" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.prepareCompletion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1akfe0b" name="Prepare DB Infra Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s5niqb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.prepareDBRequestError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_0sztuly" name="Call DB Infra Error Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${CRENI_createDBRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CRENI_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="CRENI_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1s5niqb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06s5eu4</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_06s5eu4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.buildErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s5niqb" sourceRef="ScriptTask_1akfe0b" targetRef="ServiceTask_0sztuly" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06s5eu4" sourceRef="ServiceTask_0sztuly" targetRef="ScriptTask_1hql91g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_1akfe0b" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="ScriptTask_09qt0pi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0rt8wax" sourceRef="Task_19xbdbu" targetRef="Task_1nko5zz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doCreateNetworkInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_19xbdbu" name="Get Network Model Info&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ablr60</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0rt8wax</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.getNetworkModelInfo(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0rt8wax</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
+ <dc:Bounds x="3" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="-8" y="786" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="25" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="43" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="140" y="841" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="301" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="319" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
+ <di:waypoint xsi:type="dc:Point" x="61" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="881" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
+ <di:waypoint xsi:type="dc:Point" x="240" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="301" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="275" y="881" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doCreateNetworkInstance_CallActivity">
+ <dc:Bounds x="692" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1408" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="115" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09qt0pi_di" bpmnElement="ScriptTask_09qt0pi">
+ <dc:Bounds x="1253" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="792" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="907" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="850" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x3znm5_di" bpmnElement="SequenceFlow_0x3znm5">
+ <di:waypoint xsi:type="dc:Point" x="1353" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1381" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="139" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="39" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="104" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ablr60_di" bpmnElement="SequenceFlow_1ablr60">
+ <di:waypoint xsi:type="dc:Point" x="239" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="306" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="306" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="372" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="321" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="907" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="1071" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1akfe0b_di" bpmnElement="ScriptTask_1akfe0b">
+ <dc:Bounds x="189" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0sztuly_di" bpmnElement="ServiceTask_0sztuly">
+ <dc:Bounds x="384" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="1007" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1039" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="563" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="738" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="-13" y="353" width="1021" height="404" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="83" y="547" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="101" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="913" y="547" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="931" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s5niqb_di" bpmnElement="SequenceFlow_1s5niqb">
+ <di:waypoint xsi:type="dc:Point" x="289" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="337" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06s5eu4_di" bpmnElement="SequenceFlow_06s5eu4">
+ <di:waypoint xsi:type="dc:Point" x="484" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="524" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="663" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="838" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="913" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="876" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1171" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1253" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1212" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="119" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="154" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rt8wax_di" bpmnElement="SequenceFlow_0rt8wax">
+ <di:waypoint xsi:type="dc:Point" x="472" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="515" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="658" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="692" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="675" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gpvlh8_di" bpmnElement="Task_19xbdbu">
+ <dc:Bounds x="372" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="558" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn
new file mode 100644
index 0000000..d8e8dfd
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateServiceInstance" name="CreateServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="createSI_startEvent" name="Create SI Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doCreateServiceInstance_CallActivity" name="Call DoCreateServiceInstance&#10;" calledElement="DoCreateServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in sourceExpression="1610" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doCreateServiceInstance_CallActivity" targetRef="ExclusiveGateway_1x5i9c1" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ktadna</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi= new CreateServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createSI_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1o4wwba</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CreateServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14eadeb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CreateServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_0o4smqp" />
+ <bpmn2:scriptTask id="ScriptTask_0o4smqp" name="Send Error Response">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14eadeb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CreateServiceInstance()
+csi.sendSyncError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14eadeb" sourceRef="ScriptTask_0o4smqp" targetRef="ScriptTask_1hql91g" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="EndEvent_0o440av" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doCreateServiceInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ktadna</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CreateServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ktadna" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_1nko5zz" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1x5i9c1" name="Success?">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1o4wwba</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1mdnv3l</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="EndEvent_143akoz">
+ <bpmn2:incoming>SequenceFlow_1mdnv3l</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1o4wwba" name="yes" sourceRef="ExclusiveGateway_1x5i9c1" targetRef="ScriptTask_0cihgpv">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mdnv3l" name="no" sourceRef="ExclusiveGateway_1x5i9c1" targetRef="EndEvent_143akoz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
+ <dc:Bounds x="-6" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-25" y="120" width="74" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="222" y="531" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="255" y="608" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="273" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="370" y="586" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="531" y="608" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="549" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
+ <di:waypoint xsi:type="dc:Point" x="291" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="626" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
+ <di:waypoint xsi:type="dc:Point" x="470" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="531" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="505" y="626" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doCreateServiceInstance_CallActivity">
+ <dc:Bounds x="460" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1017" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1028" y="221" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="560" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="662" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="611" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="112" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="30" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="112" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="71" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="797" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="985" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="897" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="985" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="380" y="333" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="557" y="333" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="107" y="269" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="122" y="355" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="140" y="396" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="701" y="355" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="719" y="396" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="480" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="557" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="519" y="358" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="657" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="701" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="679" y="358" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1035" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1035" y="185" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1050" y="161" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="158" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="180" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="180" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="201" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="195" y="373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="380" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="460" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="420" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="280" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ktadna_di" bpmnElement="SequenceFlow_0ktadna">
+ <di:waypoint xsi:type="dc:Point" x="212" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="280" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="246" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o4smqp_di" bpmnElement="ScriptTask_0o4smqp">
+ <dc:Bounds x="202" y="333" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_14eadeb_di" bpmnElement="SequenceFlow_14eadeb">
+ <di:waypoint xsi:type="dc:Point" x="302" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="380" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1x5i9c1_di" bpmnElement="ExclusiveGateway_1x5i9c1" isMarkerVisible="true">
+ <dc:Bounds x="662" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="662" y="44" width="50" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_143akoz_di" bpmnElement="EndEvent_143akoz">
+ <dc:Bounds x="669" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="221" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1o4wwba_di" bpmnElement="SequenceFlow_1o4wwba">
+ <di:waypoint xsi:type="dc:Point" x="712" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="749" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="749" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="797" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="747" y="94" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mdnv3l_di" bpmnElement="SequenceFlow_1mdnv3l">
+ <di:waypoint xsi:type="dc:Point" x="687" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="185" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="661" y="126.56139708236196" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn
new file mode 100644
index 0000000..7e5a1cd
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn
@@ -0,0 +1,473 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_pNTO8MRhEeWv36YLr7PC3Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateVfModuleInfra" name="CreateVfModuleInfra" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:callActivity id="DoCreateVfModuleSubprocess" name="Do Create Vf Module" calledElement="DoCreateVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCreateVfModuleRequest" target="DoCreateVfModuleRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="newVfModuleId" target="newVfModuleId" />
+ <camunda:out source="DCVFM_vnfId" target="CVFMI_vnfId" />
+ <camunda:out source="DCVFM_vfModuleId" target="CVFMI_vfModuleId" />
+ <camunda:out source="RollbackData" target="RollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="CVFMI_WorkflowResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="SendResponse" name="Send Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.sendResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="SendResponse" targetRef="DoCreateVfModuleSubprocess" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="To FinishLine">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_34" name="FinishLine" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="DoCreateVfModuleSubprocess" targetRef="IntermediateThrowEvent_1" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="FinishLine">
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_35" name="FinishLine" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="IntermediateCatchEvent_1" targetRef="PrepareUpdateInfraRequest" />
+ <bpmn2:scriptTask id="PrepareUpdateInfraRequest" name="Prepare Update Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_1" name="Update Infra Request">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda: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:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${CVFMI_updateInfraRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="PrepareUpdateInfraRequest" targetRef="ServiceTask_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ServiceTask_1" targetRef="UpdateInfraRequestResponseCheck" />
+ <bpmn2:scriptTask id="PrepareMSOCompletionHandler" name="Prepare MSO Completion Handler" scriptFormat="groovy">
+ <bpmn2:incoming>updateInfraRequestResponseGood</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PrepareMSOCompletionHandler" targetRef="MSOCompletionHandler" />
+ <bpmn2:callActivity id="MSOCompletionHandler" name="MSO Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVFMI_msoCompletionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="UpdateInfraRequestResponseCheck" name="Success? " default="updateInfraRequestResponseBad">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>updateInfraRequestResponseBad</bpmn2:outgoing>
+ <bpmn2:outgoing>updateInfraRequestResponseGood</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="updateInfraRequestResponseBad" name="no" sourceRef="UpdateInfraRequestResponseCheck" targetRef="EndEvent_2" />
+ <bpmn2:sequenceFlow id="updateInfraRequestResponseGood" name="yes" sourceRef="UpdateInfraRequestResponseCheck" targetRef="PrepareMSOCompletionHandler">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVFMI_dbResponseCode" ) == '200'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>updateInfraRequestResponseBad</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="ErrorHandler" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ValidateRollbackResponse" name="Validate Rollback Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.validateRollbackResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ValidateRollbackResponse" targetRef="InclusiveGateway_1" />
+ <bpmn2:callActivity id="ScriptTask_1" name="Do CreateVfModule Rollback" calledElement="DoCreateVfModuleRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="RollbackData" target="RollbackData" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:out source="MSOWorkflowException" target="RollbackWorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_1" targetRef="ValidateRollbackResponse" />
+ <bpmn2:startEvent id="StartEvent_2" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_2" targetRef="ExclusiveGateway_1" />
+ <bpmn2:callActivity id="FalloutHandler" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVFMI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="FalloutHandler" targetRef="EndEvent_3" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="PrepareFalloutHandler" name="Prepare Fallout Handler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def cvfm = new CreateVfModuleInfra()
+cvfm.falloutHandlerPrep(execution, 'CVFMI_FalloutHandlerRequest')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PrepareFalloutHandler" targetRef="FalloutHandler" />
+ <bpmn2:inclusiveGateway id="InclusiveGateway_1">
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:incoming>isRollbackOnNoSequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="InclusiveGateway_1" targetRef="PrepareFalloutHandler" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Is Rollback On? " default="isRollbackOnNoSequenceFlow">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>isRollbackOnNoSequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>IsRollbackOnYesSequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isRollbackOnNoSequenceFlow" name="no" sourceRef="ExclusiveGateway_1" targetRef="InclusiveGateway_1" />
+ <bpmn2:scriptTask id="LogAndSaveOriginalException" name="Log and Save Original Exception" scriptFormat="groovy">
+ <bpmn2:incoming>IsRollbackOnYesSequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def cvfm = new CreateVfModuleInfra()
+cvfm.logAndSaveOriginalException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="IsRollbackOnYesSequenceFlow" name="yes" sourceRef="ExclusiveGateway_1" targetRef="LogAndSaveOriginalException">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVFMI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="LogAndSaveOriginalException" targetRef="ScriptTask_1" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="SetSuccessIndicator" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[execution.setVariable("CreateVfModuleSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_10" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="MSOCompletionHandler" targetRef="SetSuccessIndicator" />
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="SetSuccessIndicator" targetRef="EndEvent_1" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="ErrorHandler">
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_3" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_12" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PreProcessRequest" targetRef="SendResponse" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="REST Fault" errorCode="RESTFault" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="41" y="231" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="77" y="249" />
+ <di:waypoint xsi:type="dc:Point" x="226" y="249" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="99" y="249" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="226" y="209" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="SendResponse">
+ <dc:Bounds x="432" y="209" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ServiceTask_86">
+ <di:waypoint xsi:type="dc:Point" x="326" y="249" />
+ <di:waypoint xsi:type="dc:Point" x="432" y="249" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="348" y="249" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="DoCreateVfModuleSubprocess">
+ <dc:Bounds x="612" y="209" width="145" height="80" />
+ </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" y="249" />
+ <di:waypoint xsi:type="dc:Point" x="612" y="249" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_47" bpmnElement="IntermediateThrowEvent_1">
+ <dc:Bounds x="823" y="231" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="841" y="272" width="0" height="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" y="249" />
+ <di:waypoint xsi:type="dc:Point" x="823" y="249" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_32" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds x="39" y="349" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="25" y="390" width="65" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="PrepareUpdateInfraRequest">
+ <dc:Bounds x="127" y="327" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_1">
+ <dc:Bounds x="277" y="327" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_179" bpmnElement="UpdateInfraRequestResponseCheck" isMarkerVisible="true">
+ <dc:Bounds x="443" y="341" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="435" y="308" width="68" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="PrepareMSOCompletionHandler">
+ <dc:Bounds x="552" y="327" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="MSOCompletionHandler">
+ <dc:Bounds x="708" y="327" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1020" y="349" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1038" y="390" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_2">
+ <dc:Bounds x="452" y="469" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="470" y="510" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_IntermediateCatchEvent_32" targetElement="_BPMNShape_ScriptTask_219">
+ <di:waypoint xsi:type="dc:Point" x="75" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="127" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="105" y="367" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_219" targetElement="_BPMNShape_ServiceTask_103">
+ <di:waypoint xsi:type="dc:Point" x="227" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="277" y="367" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ExclusiveGateway_179">
+ <di:waypoint xsi:type="dc:Point" x="377" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="410" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="410" y="366" />
+ <di:waypoint xsi:type="dc:Point" x="443" y="366" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="407" y="366" width="6" height="6" />
+ </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" y="391" />
+ <di:waypoint xsi:type="dc:Point" x="469" y="421" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="421" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="469" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="459" y="419" width="20" height="22" />
+ </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" y="366" />
+ <di:waypoint xsi:type="dc:Point" x="523" y="366" />
+ <di:waypoint xsi:type="dc:Point" x="523" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="510" y="367" width="27" height="22" />
+ </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" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="708" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="678" y="367" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="ErrorHandler" isExpanded="true">
+ <dc:Bounds x="48" y="540" width="925" height="385" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">
+ <dc:Bounds x="72" y="844" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="60" y="886" width="98" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_222" bpmnElement="PrepareFalloutHandler">
+ <dc:Bounds x="564" y="672" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_223" bpmnElement="FalloutHandler">
+ <dc:Bounds x="708" y="672" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_3">
+ <dc:Bounds x="864" y="694" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="882" y="735" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_44" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="955" y="690" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="970" y="731" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_4">
+ <dc:Bounds x="1049" y="690" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1067" y="731" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_222" targetElement="_BPMNShape_ScriptTask_223">
+ <di:waypoint xsi:type="dc:Point" x="664" y="712" />
+ <di:waypoint xsi:type="dc:Point" x="708" y="712" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="712" width="6" height="6" />
+ </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" y="712" />
+ <di:waypoint xsi:type="dc:Point" x="864" y="712" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="836" y="712" width="6" height="6" />
+ </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" y="708" />
+ <di:waypoint xsi:type="dc:Point" x="1049" y="708" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1015" y="708" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="SetSuccessIndicator">
+ <dc:Bounds x="858" y="328" width="103" height="79" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_241">
+ <di:waypoint xsi:type="dc:Point" x="808" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="858" y="367" />
+ </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" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="367" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="205" y="836" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="193" y="901" width="102" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ValidateRollbackResponse">
+ <dc:Bounds x="312" y="554" width="103" height="79" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_25" bpmnElement="InclusiveGateway_1">
+ <dc:Bounds x="459" y="686" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="484" y="741" width="0" height="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" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="156" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="156" y="861" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="861" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="153" y="862" width="6" height="6" />
+ </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" y="861" />
+ <di:waypoint xsi:type="dc:Point" x="354" y="861" />
+ <di:waypoint xsi:type="dc:Point" x="354" y="711" />
+ <di:waypoint xsi:type="dc:Point" x="459" y="711" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="324" y="866" width="20" height="22" />
+ </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" y="593" />
+ <di:waypoint xsi:type="dc:Point" x="484" y="593" />
+ <di:waypoint xsi:type="dc:Point" x="484" y="686" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="462" y="593" width="6" height="6" />
+ </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" y="711" />
+ <di:waypoint xsi:type="dc:Point" x="527" y="711" />
+ <di:waypoint xsi:type="dc:Point" x="527" y="712" />
+ <di:waypoint xsi:type="dc:Point" x="564" y="712" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="533" y="712" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="179" y="554" width="103" height="79" />
+ </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" y="593" />
+ <di:waypoint xsi:type="dc:Point" x="312" y="593" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="294" y="593" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_283" bpmnElement="LogAndSaveOriginalException">
+ <dc:Bounds x="179" y="693" width="103" height="79" />
+ </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" y="836" />
+ <di:waypoint xsi:type="dc:Point" x="230" y="771" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="240" y="804" width="27" height="22" />
+ </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" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="230" y="632" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000..5c8074e
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn
@@ -0,0 +1,481 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_CyftwG_HEeaKe-v4u9MasA" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateVfModuleVolumeInfraV1" name="CreateVfModuleVolumeInfraV1" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_createVfModuleVolumeInfraV1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_createVfModuleVolumeInfraV1" targetRef="ScriptTask_preProcessRequest" />
+ <bpmn2:subProcess id="SubProcess_exceptionHandler" name="Exception Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_catchErrors" name="Catch Exceptions">
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="StartEvent_catchErrors" targetRef="ExclusiveGateway_isSyncResponseSent" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isSyncResponseSent" name="Sync response sent?" default="SequenceFlow_syncResponseNotSent">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_syncResponseSent</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_syncResponseNotSent</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_syncResponseSent" name="Yes" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_prefalloutHandlerRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{CVMVINFRAV1_syncResponseSent == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_sendSyncErrorResp" name="Send sync error response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_syncResponseNotSent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('sendSyncError', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_syncResponseNotSent" name="No" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_sendSyncErrorResp" />
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_sendSyncErrorResp" targetRef="ScriptTask_prefalloutHandlerRequest" />
+ <bpmn2:scriptTask id="ScriptTask_prefalloutHandlerRequest" name="Prepare Fallout Handler Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_syncResponseSent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('prepareFalloutHandlerRequest', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="ScriptTask_prefalloutHandlerRequest" targetRef="CallActivity_callFalloutHandler" />
+ <bpmn2:callActivity id="CallActivity_callFalloutHandler" name="Call Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVMVINFRAV1_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_callFalloutHandler" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4" name="End">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_sendSyncAckResponse" />
+ <bpmn2:scriptTask id="ScriptTask_sendSyncAckResponse" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('sendSyncResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_sendSyncAckResponse" targetRef="ExclusiveGateway_isVolGrpnamePresent" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isVolGrpnamePresent" name="Is volume group name present?" default="SequenceFlow_volGrpNameMissing">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_volGrpNamePresent</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_volGrpNameMissing</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_volGrpNamePresent" name="" sourceRef="ExclusiveGateway_isVolGrpnamePresent" targetRef="CallActivity_callGenericGetSI">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{CVMVINFRAV1_volumeGroupName != null && CVMVINFRAV1_volumeGroupName != "" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_volGrpNameMissing" name="" sourceRef="ExclusiveGateway_isVolGrpnamePresent" targetRef="ScriptTask_buildError" />
+ <bpmn2:scriptTask id="ScriptTask_buildError" name="Build Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_volGrpNameMissing</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('buildWorkflowException', execution, 2500, "Volume group name not present in request.", isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_buildError" targetRef="EndEvent_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallActivity_callGenericGetSI" name="Call Generic Get Service Instance" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVMVINFRAV1_serviceInstanceId" target="GENGS_serviceInstanceId" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator" />
+ <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="CVMVINFRAV1_serviceType" target="GENGS_type" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_volGrpNamePresent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="CallActivity_doCreateVfModuleVolumeV1" name="Call DoCreateVfModuleVolumeV1" calledElement="DoCreateVfModuleVolumeV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVMVINFRAV1_Request" target="DoCreateVfModuleVolumeV1Request" />
+ <camunda:in source="CVMVINFRAV1_vnfId" target="vnf-id" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="CVMVINFRAV1_volumeGroupId" target="volume-group-id" />
+ <camunda:out source="DCVFMODVOLV1_SuccessIndicator" target="DCVFMODVOLV1_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="CVMVINFRAV1_isVidRequest" target="is-vid-request" />
+ <camunda:in source="test-volume-group-name" target="test-volume-group-name" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_serviceInstanceFound</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="CallActivity_doCreateVfModuleVolumeV1" targetRef="ScriptTask_prepareDbInfraRequest" />
+ <bpmn2:scriptTask id="ScriptTask_setSuccessIndicator" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('setSuccessIndicator', execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_setSuccessIndicator" targetRef="EndEvent_3" />
+ <bpmn2:callActivity id="CallActivity_completeMsoProcess" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVMVINFRAV1_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CallActivity_completeMsoProcess" targetRef="ScriptTask_setSuccessIndicator" />
+ <bpmn2:scriptTask id="ScriptTask_postCompletionRequest" name="Post Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('postProcessResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_postCompletionRequest" targetRef="CallActivity_completeMsoProcess" />
+ <bpmn2:serviceTask id="ServiceTask_callDbInfraUpdate" name="Call DB Infra Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda: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:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CVMVINFRAV1_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="CVMVINFRAV1_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ServiceTask_callDbInfraUpdate" targetRef="ScriptTask_postCompletionRequest" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_prepareDbInfraRequest" name="Prepare DB Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('prepareDbInfraSuccessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="ServiceTask_callDbInfraUpdate" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Is service instance found?" default="SequenceFlow_serviceInstanceNotFound">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_serviceInstanceFound</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_serviceInstanceNotFound</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="CallActivity_callGenericGetSI" targetRef="ExclusiveGateway_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_serviceInstanceFound" name="Yes" sourceRef="ExclusiveGateway_1" targetRef="CallActivity_doCreateVfModuleVolumeV1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{GENGSI_SuccessIndicator == true && GENGSI_FoundIndicator == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_serviceInstanceNotFound" name="No" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_buildServiceInstanceNotFoundError" />
+ <bpmn2:endEvent id="EndEvent_serviceInstanceNotFound">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_buildServiceInstanceNotFoundError" name="Build Service Instance Not Found Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_serviceInstanceNotFound</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('buildWorkflowException', execution, 2500, "Service instance id not found in AAI: $CVMVINFRAV1_serviceInstanceId.", isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ScriptTask_buildServiceInstanceNotFoundError" targetRef="EndEvent_serviceInstanceNotFound" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_67" bpmnElement="StartEvent_createVfModuleVolumeInfraV1">
+ <dc:Bounds x="144" y="156" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="162" y="197" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_67" targetElement="_BPMNShape_ScriptTask_300">
+ <di:waypoint xsi:type="dc:Point" x="180" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="252" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="219" y="174" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds x="252" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="ScriptTask_sendSyncAckResponse">
+ <dc:Bounds x="408" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_249" bpmnElement="ExclusiveGateway_isVolGrpnamePresent" isMarkerVisible="true">
+ <dc:Bounds x="589" y="148" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="521" y="203" width="186" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="ScriptTask_buildError">
+ <dc:Bounds x="565" y="264" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_36" bpmnElement="CallActivity_doCreateVfModuleVolumeV1">
+ <dc:Bounds x="996" y="134" width="100" height="80" />
+ </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" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="685" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="685" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="720" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="680" y="173" width="6" height="6" />
+ </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" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="589" y="173" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="547" y="173" width="6" height="6" />
+ </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" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="408" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="371" y="174" width="6" height="6" />
+ </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" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="615" y="264" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="612" y="234" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_233" bpmnElement="EndEvent_2">
+ <dc:Bounds x="598" y="389" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="616" y="430" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_302" targetElement="_BPMNShape_EndEvent_233">
+ <di:waypoint xsi:type="dc:Point" x="615" y="344" />
+ <di:waypoint xsi:type="dc:Point" x="616" y="389" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="613" y="370" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1898" y="156" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1916" y="197" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_exceptionHandler" isExpanded="true">
+ <dc:Bounds x="133" y="471" width="856" height="337" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_catchErrors">
+ <dc:Bounds x="204" y="555" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="168" y="596" width="109" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_4">
+ <dc:Bounds x="876" y="555" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="924" y="562" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_304" bpmnElement="ScriptTask_prepareDbInfraRequest">
+ <dc:Bounds x="1160" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_callDbInfraUpdate">
+ <dc:Bounds x="1298" y="135" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="ScriptTask_postCompletionRequest">
+ <dc:Bounds x="1442" y="136" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_37" bpmnElement="CallActivity_completeMsoProcess">
+ <dc:Bounds x="1598" y="135" width="100" height="80" />
+ </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" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="1160" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1115" y="174" width="6" height="6" />
+ </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" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="1298" y="175" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1374" y="175" width="6" height="6" />
+ </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" y="175" />
+ <di:waypoint xsi:type="dc:Point" x="1442" y="176" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1417" y="176" width="6" height="6" />
+ </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" y="176" />
+ <di:waypoint xsi:type="dc:Point" x="1598" y="175" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1653" y="176" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="ScriptTask_setSuccessIndicator">
+ <dc:Bounds x="1742" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_37" targetElement="_BPMNShape_ScriptTask_306">
+ <di:waypoint xsi:type="dc:Point" x="1698" y="175" />
+ <di:waypoint xsi:type="dc:Point" x="1742" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1767" y="174" width="6" height="6" />
+ </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" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="1866" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="1866" y="175" />
+ <di:waypoint xsi:type="dc:Point" x="1898" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1963" y="175" width="6" height="6" />
+ </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" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="286" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="286" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="348" y="572" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="286" y="572" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_307" bpmnElement="ScriptTask_prefalloutHandlerRequest">
+ <dc:Bounds x="576" y="533" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_50" bpmnElement="CallActivity_callFalloutHandler">
+ <dc:Bounds x="720" y="533" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_307" targetElement="_BPMNShape_CallActivity_50">
+ <di:waypoint xsi:type="dc:Point" x="676" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="720" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="694" y="573" width="6" height="6" />
+ </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" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="842" y="573" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_251" bpmnElement="ExclusiveGateway_isSyncResponseSent" isMarkerVisible="true">
+ <dc:Bounds x="348" y="547" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309" y="602" width="129" height="22" />
+ </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" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="576" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="450" y="572" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="ScriptTask_sendSyncErrorResp">
+ <dc:Bounds x="324" y="672" width="100" height="80" />
+ </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" y="597" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="634" />
+ <di:waypoint xsi:type="dc:Point" x="374" y="634" />
+ <di:waypoint xsi:type="dc:Point" x="374" y="672" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="363" y="634" width="22" height="22" />
+ </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" y="712" />
+ <di:waypoint xsi:type="dc:Point" x="608" y="712" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="712" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="613" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="530" y="712" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_51" bpmnElement="CallActivity_callGenericGetSI">
+ <dc:Bounds x="720" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="887" y="148" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="912" y="203" width="0" height="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" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="887" y="173" />
+ </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" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="966" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="966" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="996" y="174" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_serviceInstanceNotFound">
+ <dc:Bounds x="895" y="389" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="913" y="430" width="0" height="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" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="264" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="919" y="226" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="ScriptTask_buildServiceInstanceNotFoundError">
+ <dc:Bounds x="862" y="264" width="100" height="80" />
+ </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" y="344" />
+ <di:waypoint xsi:type="dc:Point" x="913" y="389" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="910" y="370" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn
new file mode 100644
index 0000000..f98f8ed
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn
@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateVnfInfra" name="CreateVnfInfra" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="sendResponse" />
+ <bpmn2:scriptTask id="sendResponse" name="Send Sync Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendResponse" targetRef="CreateVNF" />
+ <bpmn2:callActivity id="CreateVNF" name="Create VNF" calledElement="DoCreateVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVI_requestId" target="requestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="CREVI_serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="CREVI_suppressRollback" target="disableRollback" />
+ <camunda:in source="CREVI_vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="CREVI_vnfType" target="vnfType" />
+ <camunda:in source="CREVI_vnfName" target="vnfName" />
+ <camunda:in source="CREVI_vnfId" target="vnfId" />
+ <camunda:in source="CREVI_cloudConfiguration" target="cloudConfiguration" />
+ <camunda:in source="CREVI_serviceId" target="productFamilyId" />
+ <camunda:in source="CREVI_vnfInputParameters" target="vnfInputParameters" />
+ <camunda:out source="vnfId" target="CREVI_vnfId" />
+ <camunda:out source="vnfOutputParameters" target="CREVI_vnfOutputParameters" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0lso26t</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="processJavaError" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="processJavaError" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_2" targetRef="processJavaError" />
+ </bpmn2:subProcess>
+ <bpmn2:subProcess id="bpmnErrorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:callActivity id="callFalloutHandler" name="Call &#10;&#10;FalloutHandler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVI_falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="CREVI_requestId" target="requestId" />
+ <camunda:in source="CREVI_serviceInstanceId" target="serviceInstanceId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="callFalloutHandler" targetRef="EndEvent_5" />
+ <bpmn2:scriptTask id="processError" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="processError" targetRef="callFalloutHandler" />
+ <bpmn2:endEvent id="EndEvent_5">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_34" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="sendErrorResponse" name="Send Error Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.sendErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="sendErrorResponse" targetRef="processError" />
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_4" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="StartEvent_3" targetRef="sendErrorResponse" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="postProcess" name="Prepare Completion Handler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lso26t</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="postProcess" targetRef="callCompletionHandler" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="callCompletionHandler" name="Completion &#10;&#10;Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVI_completionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="CREVI_requestId" target="mso-request-id" />
+ <camunda:in source="CREVI_serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompletionHandler" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0lso26t" sourceRef="CreateVNF" targetRef="postProcess" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVnfInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="96" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="114" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="216" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ScriptTask_285">
+ <di:waypoint xsi:type="dc:Point" x="132" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="216" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="240" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="sendResponse">
+ <dc:Bounds x="360" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ScriptTask_286">
+ <di:waypoint xsi:type="dc:Point" x="316" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="347" y="240" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="CreateVNF">
+ <dc:Bounds x="504" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_286" targetElement="_BPMNShape_CallActivity_59">
+ <di:waypoint xsi:type="dc:Point" x="460" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="504" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="485" y="240" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="985" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1003" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_32" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="253" y="696" width="313" height="169" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_76" bpmnElement="StartEvent_2">
+ <dc:Bounds x="277" y="763" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="295" y="804" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="processJavaError">
+ <dc:Bounds x="360" y="741" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_4">
+ <dc:Bounds x="505" y="763" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="523" y="804" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_76" targetElement="_BPMNShape_ScriptTask_308">
+ <di:waypoint xsi:type="dc:Point" x="313" y="781" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="781" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="331" y="781" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_EndEvent_234">
+ <di:waypoint xsi:type="dc:Point" x="460" y="781" />
+ <di:waypoint xsi:type="dc:Point" x="505" y="781" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="477" y="781" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_33" bpmnElement="bpmnErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="109" y="433" width="601" height="232" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_77" bpmnElement="StartEvent_3">
+ <dc:Bounds x="133" y="532" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="573" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_5">
+ <dc:Bounds x="649" y="532" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="667" y="573" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_62" bpmnElement="callFalloutHandler">
+ <dc:Bounds x="493" y="510" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_309" bpmnElement="processError">
+ <dc:Bounds x="361" y="510" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_77" targetElement="_BPMNShape_ScriptTask_312">
+ <di:waypoint xsi:type="dc:Point" x="169" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="229" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="550" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_309" targetElement="_BPMNShape_CallActivity_62">
+ <di:waypoint xsi:type="dc:Point" x="461" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="486" y="550" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_62" targetElement="_BPMNShape_EndEvent_235">
+ <di:waypoint xsi:type="dc:Point" x="593" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="649" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="618" y="550" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="sendErrorResponse">
+ <dc:Bounds x="229" y="510" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_312" targetElement="_BPMNShape_ScriptTask_309">
+ <di:waypoint xsi:type="dc:Point" x="329" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="342" y="550" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_325" bpmnElement="postProcess">
+ <dc:Bounds x="663" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_325" targetElement="_BPMNShape_CallActivity_69">
+ <di:waypoint xsi:type="dc:Point" x="763" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="790" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_69" bpmnElement="callCompletionHandler">
+ <dc:Bounds x="816" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_69" targetElement="_BPMNShape_EndEvent_228">
+ <di:waypoint xsi:type="dc:Point" x="916" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="985" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="951" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lso26t_di" bpmnElement="SequenceFlow_0lso26t">
+ <di:waypoint xsi:type="dc:Point" x="604" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="663" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="634" y="215" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn
new file mode 100644
index 0000000..6d47b1a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn
@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DelServiceInstance" name="DelServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="deleteSI_startEvent" name="Delete SI Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doDeleteServiceInstance_CallActivity" name="Call DoDeleteServiceInstance&#10;" calledElement="DoDeleteServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in sourceExpression="1610" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doDeleteServiceInstance_CallActivity" targetRef="ExclusiveGateway_0isueuw" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ktadna</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi= new DelServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="deleteSI_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qjygj5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DelServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler " triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14eadeb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DelServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_0o4smqp" />
+ <bpmn2:scriptTask id="ScriptTask_0o4smqp" name="Send Error Response">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14eadeb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DelServiceInstance()
+csi.sendSyncError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14eadeb" sourceRef="ScriptTask_0o4smqp" targetRef="ScriptTask_1hql91g" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="EndEvent_0o440av" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doDeleteServiceInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ktadna</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DelServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ktadna" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_1nko5zz" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0isueuw" name="Success?" default="SequenceFlow_0hgiouk">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qjygj5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0hgiouk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qjygj5" name="yes" sourceRef="ExclusiveGateway_0isueuw" targetRef="ScriptTask_0cihgpv">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_0yhby6h">
+ <bpmn2:incoming>SequenceFlow_0hgiouk</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0hgiouk" name="no" sourceRef="ExclusiveGateway_0isueuw" targetRef="EndEvent_0yhby6h" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DelServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteSI_startEvent">
+ <dc:Bounds x="117" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="98" y="120" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="410" y="607" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="443" y="684" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="461" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="558" y="662" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="719" y="684" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
+ <di:waypoint xsi:type="dc:Point" x="479" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="702" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="521" y="702" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
+ <di:waypoint xsi:type="dc:Point" x="658" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="719" y="702" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="693" y="702" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doDeleteServiceInstance_CallActivity">
+ <dc:Bounds x="700" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1276" y="174" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1287" y="210" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="800" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="897" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="849" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="281" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="153" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="281" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="217" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="1083" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="1244" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="1183" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1244" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1214" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="585" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="762" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="312" y="321" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="327" y="407" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="448" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="906" y="407" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="924" y="448" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="685" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="762" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="724" y="410" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="862" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="906" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="884" y="410" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1294" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1294" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1309" y="155.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="363" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="385" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="385" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="406" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="400" y="425" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="599" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="652" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="652" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="700" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="667" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="499" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ktadna_di" bpmnElement="SequenceFlow_0ktadna">
+ <di:waypoint xsi:type="dc:Point" x="381" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="499" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o4smqp_di" bpmnElement="ScriptTask_0o4smqp">
+ <dc:Bounds x="407" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_14eadeb_di" bpmnElement="SequenceFlow_14eadeb">
+ <di:waypoint xsi:type="dc:Point" x="507" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="534" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="534" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="585" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="549" y="425" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0isueuw_di" bpmnElement="ExclusiveGateway_0isueuw" isMarkerVisible="true">
+ <dc:Bounds x="897" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="44" width="49" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qjygj5_di" bpmnElement="SequenceFlow_1qjygj5">
+ <di:waypoint xsi:type="dc:Point" x="947" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1083" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="955" y="73" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0yhby6h_di" bpmnElement="EndEvent_0yhby6h">
+ <dc:Bounds x="904" y="174" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="922" y="210" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hgiouk_di" bpmnElement="SequenceFlow_0hgiouk">
+ <di:waypoint xsi:type="dc:Point" x="922" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="922" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="922" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="922" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="931" y="147" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn
new file mode 100644
index 0000000..3bd8b91
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn
@@ -0,0 +1,771 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DeleteGenericMacroServiceNetworkVnf" name="DeleteGenericMacroServiceNetworkVnf" isExecutable="true">
+ <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:startEvent id="createVIPR_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVIPR_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vIPR-ATM">
+ <bpmn2:outgoing>SequenceFlow_10o22u2</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vIPR-ATM" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &#38; Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12ilko1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" />
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="DELVAS_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_2" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("DeleteGenericMacroServiceNetworkVnfSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="DeleteVIPR_EndEvent" />
+ <bpmn2:endEvent id="DeleteVIPR_EndEvent" name="End">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_13" />
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_4" name="FinishProcess">
+ <bpmn2:outgoing>SequenceFlow_12ilko1</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_39" name="FinishProcess" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:callActivity id="doDeleteNetworkInstance_CallActivity" name="DoDelete&#10;Network&#10;Instance" calledElement="DoDeleteNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rollbackData" target="DELNWKI_rollbackData" />
+ <camunda:out source="rolledBack" target="DELNWKI_rolledBack" />
+ <camunda:out source="wasDeleted" target="wasDeleted" />
+ <camunda:in source="networkId" target="networkId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1bwbn7r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12ag2bk</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_PrepareNetworkDelete" name="Prepare for Network Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cmebdc</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dfkfh1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1bwbn7r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf= new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.prepareNetworkDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="doDeleteServiceInstance_CallActivity" name="DoDelete&#10;ServiceInstance&#10;" calledElement="DoDeleteServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="rollbackData" target="DCRESI_rollbackData" />
+ <camunda:in source="failExists" target="failExists" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rolledBack" target="DCRESI_rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_10o22u2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04ao07f</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="doDeleteVNFandModules_CallActivity" name="DoDelete&#10;VNF and Modules&#10;" calledElement="DoDeleteVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="vnftId" target="vnftId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1h77psn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1dmn40p</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Prepare to Delete VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bvecvm</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0mr8jgt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1h77psn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf= new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.prepareVnfAndModulesDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_4" name="GoToStartNetworks">
+ <bpmn2:incoming>SequenceFlow_0xowenu</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_41" name="StartNetworks" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="GoQueryServiceInstance">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_38" name="QueryServiceInstance" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:subProcess id="SubProcess_0s6hpty" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1bwmffk" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_06llof4</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:callActivity id="CallActivity_0jw5tqa" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVAS_falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0807ukc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19yywk8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_04xute7">
+ <bpmn2:incoming>SequenceFlow_19yywk8</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0yk02h3" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_06llof4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0807ukc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0807ukc" sourceRef="ScriptTask_0yk02h3" targetRef="CallActivity_0jw5tqa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19yywk8" sourceRef="CallActivity_0jw5tqa" targetRef="EndEvent_04xute7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06llof4" sourceRef="StartEvent_1bwmffk" targetRef="ScriptTask_0yk02h3" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_10o22u2" sourceRef="IntermediateCatchEvent_3" targetRef="doDeleteServiceInstance_CallActivity" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12ilko1" sourceRef="IntermediateCatchEvent_4" targetRef="postProcessAndCompletionRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1bwbn7r" sourceRef="ScriptTask_PrepareNetworkDelete" targetRef="doDeleteNetworkInstance_CallActivity" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1n7r495" name="No" sourceRef="ExclusiveGateway_0fe690i" targetRef="ExclusiveGateway_1os8cm5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1h77psn" sourceRef="ScriptTask_3" targetRef="doDeleteVNFandModules_CallActivity" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1nh09nr" name="StartNetworks">
+ <bpmn2:outgoing>SequenceFlow_1vwssu7</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartNetworks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo FinishProcess">
+ <bpmn2:incoming>SequenceFlow_04ao07f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="FinishProcess" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0b9wd4f" name="Delete Network(s)?" default="SequenceFlow_1f26zbk">
+ <bpmn2:incoming>SequenceFlow_1vwssu7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cmebdc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1f26zbk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0fe690i" name="Delete Additional Networks?" default="SequenceFlow_1n7r495">
+ <bpmn2:incoming>SequenceFlow_04vlq8r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1n7r495</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dfkfh1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dfkfh1" name="Yes" sourceRef="ExclusiveGateway_0fe690i" targetRef="ScriptTask_PrepareNetworkDelete">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVAS_networksDeletedCount") < execution.getVariable("DELVAS_networksCount")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0cmebdc" name="Yes" sourceRef="ExclusiveGateway_0b9wd4f" targetRef="ScriptTask_PrepareNetworkDelete">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVAS_networksCount") > 0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1os8cm5">
+ <bpmn2:incoming>SequenceFlow_1n7r495</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1f26zbk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1j7n6qx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f26zbk" name="No" sourceRef="ExclusiveGateway_0b9wd4f" targetRef="ExclusiveGateway_1os8cm5" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0nreq15" name="GoTo vIPR-ATM">
+ <bpmn2:incoming>SequenceFlow_1j7n6qx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="vIPR-ATM" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vwssu7" sourceRef="IntermediateCatchEvent_1nh09nr" targetRef="ExclusiveGateway_0b9wd4f" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1j7n6qx" sourceRef="ExclusiveGateway_1os8cm5" targetRef="IntermediateThrowEvent_0nreq15" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0rlqdvq" name="StartVnfs">
+ <bpmn2:outgoing>SequenceFlow_10tbv62</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1nlocis" name="Delete VNF?" default="SequenceFlow_0w7328u">
+ <bpmn2:incoming>SequenceFlow_10tbv62</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bvecvm</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0w7328u</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_04q1qud">
+ <bpmn2:incoming>SequenceFlow_0w7328u</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1wc8h5g</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xowenu</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10tbv62" sourceRef="IntermediateCatchEvent_0rlqdvq" targetRef="ExclusiveGateway_1nlocis" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0bvecvm" name="Yes" sourceRef="ExclusiveGateway_1nlocis" targetRef="ScriptTask_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVAS_vnfsCount") > 0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0w7328u" name="No" sourceRef="ExclusiveGateway_1nlocis" targetRef="ExclusiveGateway_04q1qud" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xowenu" sourceRef="ExclusiveGateway_04q1qud" targetRef="IntermediateThrowEvent_4" />
+ <bpmn2:scriptTask id="ScriptTask_04o8gb3" name="Validate Network Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12ag2bk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04vlq8r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf= new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.validateNetworkDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12ag2bk" sourceRef="doDeleteNetworkInstance_CallActivity" targetRef="ScriptTask_04o8gb3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04vlq8r" sourceRef="ScriptTask_04o8gb3" targetRef="ExclusiveGateway_0fe690i" />
+ <bpmn2:callActivity id="callGetServiceInstance" name="Get&#10;Service&#10;Instance" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="GENGS_type" target="GENGS_type" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
+ <camunda:out source="GENGS_service" target="GENGS_service" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0jek18q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ttswdr</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_05m3m2e" name="Process Response &#38; ready data for subflows" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ttswdr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18103ca</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.prepareServiceInstanceDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_112zjtp" name="QueryServiceInstance">
+ <bpmn2:outgoing>SequenceFlow_0jek18q</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="QueryServiceInstance" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_162gs5w" name="GoToStartVnfs">
+ <bpmn2:incoming>SequenceFlow_18103ca</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0jek18q" sourceRef="IntermediateCatchEvent_112zjtp" targetRef="callGetServiceInstance" />
+ <bpmn2:sequenceFlow id="SequenceFlow_18103ca" sourceRef="ScriptTask_05m3m2e" targetRef="IntermediateThrowEvent_162gs5w" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04ao07f" sourceRef="doDeleteServiceInstance_CallActivity" targetRef="IntermediateThrowEvent_0prlju0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ttswdr" sourceRef="callGetServiceInstance" targetRef="ScriptTask_05m3m2e" />
+ <bpmn2:scriptTask id="ScriptTask_1ildy3f" name="Validate VNF delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1dmn40p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0g2cw86</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf= new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.validateVnfDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1uds6yu" name="Delete Additional VNFs?" default="SequenceFlow_1wc8h5g">
+ <bpmn2:incoming>SequenceFlow_0g2cw86</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0mr8jgt</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1wc8h5g</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dmn40p" sourceRef="doDeleteVNFandModules_CallActivity" targetRef="ScriptTask_1ildy3f" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0g2cw86" sourceRef="ScriptTask_1ildy3f" targetRef="ExclusiveGateway_1uds6yu" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0mr8jgt" name="Yes" sourceRef="ExclusiveGateway_1uds6yu" targetRef="ScriptTask_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVAS_vnfsDeletedCountt") < execution.getVariable("DELVAS_vnfsCount")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1wc8h5g" name="No" sourceRef="ExclusiveGateway_1uds6yu" targetRef="ExclusiveGateway_04q1qud" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteGenericMacroServiceNetworkVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVIPR_startEvent">
+ <dc:Bounds x="96" y="90" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="82" y="131" width="65" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="285" y="68" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="132" y="108" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="108" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds x="476" y="1192" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="285" y="1193" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="385" y="108" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="69" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="476" y="68" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+ <di:waypoint xsi:type="dc:Point" x="385" y="1233" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="1232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="431" y="1217.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="DeleteVIPR_EndEvent">
+ <dc:Bounds x="1046" y="1213" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1054" y="1254" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_337">
+ <di:waypoint xsi:type="dc:Point" x="576" y="1233" />
+ <di:waypoint xsi:type="dc:Point" x="636" y="1233" />
+ <di:waypoint xsi:type="dc:Point" x="636" y="1230" />
+ <di:waypoint xsi:type="dc:Point" x="803" y="1230" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="651" y="1231.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="686" y="1374" width="405" height="205" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="754" y="1479" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="772" y="1520" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="829" y="1457" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="982" y="1479" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1000" y="1520" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="790" y="1497" />
+ <di:waypoint xsi:type="dc:Point" x="829" y="1497" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="818" y="1497" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="929" y="1497" />
+ <di:waypoint xsi:type="dc:Point" x="962" y="1497" />
+ <di:waypoint xsi:type="dc:Point" x="962" y="1497" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="1497" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="977" y="1497" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_75" bpmnElement="doDeleteServiceInstance_CallActivity">
+ <dc:Bounds x="285" y="1009" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="576" y="108" />
+ <di:waypoint xsi:type="dc:Point" x="728" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="652" y="93" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_337" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="803" y="1191" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_337" targetElement="_BPMNShape_EndEvent_177">
+ <di:waypoint xsi:type="dc:Point" x="903" y="1230" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="1231" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="975" y="1215.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_76" bpmnElement="doDeleteNetworkInstance_CallActivity">
+ <dc:Bounds x="555" y="722" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_35" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="100" y="1031" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="92" y="1067" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_36" bpmnElement="IntermediateCatchEvent_4">
+ <dc:Bounds x="100" y="1216" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="82" y="1252" width="71" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_51" bpmnElement="IntermediateThrowEvent_4">
+ <dc:Bounds x="1036" y="524" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1011" y="565" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_341" bpmnElement="ScriptTask_PrepareNetworkDelete">
+ <dc:Bounds x="413" y="719" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_342" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="413" y="435" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_81" bpmnElement="doDeleteVNFandModules_CallActivity">
+ <dc:Bounds x="555" y="435" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="728" y="90" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="703" y="131" width="86" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0s6hpty_di" bpmnElement="SubProcess_0s6hpty" isExpanded="true">
+ <dc:Bounds x="52" y="1375" width="598" height="203" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1bwmffk_di" bpmnElement="StartEvent_1bwmffk">
+ <dc:Bounds x="123" y="1448" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="117" y="1489" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0jw5tqa_di" bpmnElement="CallActivity_0jw5tqa">
+ <dc:Bounds x="384" y="1426" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_04xute7_di" bpmnElement="EndEvent_04xute7">
+ <dc:Bounds x="539" y="1448" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="557" y="1489" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yk02h3_di" bpmnElement="ScriptTask_0yk02h3">
+ <dc:Bounds x="237" y="1426" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10o22u2_di" bpmnElement="SequenceFlow_10o22u2">
+ <di:waypoint xsi:type="dc:Point" x="136" y="1049" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="1049" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="1034" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ilko1_di" bpmnElement="SequenceFlow_12ilko1">
+ <di:waypoint xsi:type="dc:Point" x="136" y="1234" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="1233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="1218.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0807ukc_di" bpmnElement="SequenceFlow_0807ukc">
+ <di:waypoint xsi:type="dc:Point" x="337" y="1466" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="1466" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="361" y="1451" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19yywk8_di" bpmnElement="SequenceFlow_19yywk8">
+ <di:waypoint xsi:type="dc:Point" x="484" y="1466" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="1466" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="512" y="1451" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bwbn7r_di" bpmnElement="SequenceFlow_1bwbn7r">
+ <di:waypoint xsi:type="dc:Point" x="513" y="761" />
+ <di:waypoint xsi:type="dc:Point" x="555" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="534" y="746" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n7r495_di" bpmnElement="SequenceFlow_1n7r495">
+ <di:waypoint xsi:type="dc:Point" x="891" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="792" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="908" y="747" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h77psn_di" bpmnElement="SequenceFlow_1h77psn">
+ <di:waypoint xsi:type="dc:Point" x="513" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="555" y="475" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="534" y="460" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1nh09nr_di" bpmnElement="IntermediateCatchEvent_1nh09nr">
+ <dc:Bounds x="96" y="786" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="80" y="822" width="68" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0prlju0_di" bpmnElement="IntermediateThrowEvent_0prlju0">
+ <dc:Bounds x="508" y="1031" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="491" y="1072" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0b9wd4f_di" bpmnElement="ExclusiveGateway_0b9wd4f" isMarkerVisible="true">
+ <dc:Bounds x="345" y="779" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="408" y="811" width="57" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0fe690i_di" bpmnElement="ExclusiveGateway_0fe690i" isMarkerVisible="true">
+ <dc:Bounds x="841" y="737" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="795" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dfkfh1_di" bpmnElement="SequenceFlow_0dfkfh1">
+ <di:waypoint xsi:type="dc:Point" x="866" y="737" />
+ <di:waypoint xsi:type="dc:Point" x="866" y="657" />
+ <di:waypoint xsi:type="dc:Point" x="463" y="657" />
+ <di:waypoint xsi:type="dc:Point" x="463" y="717" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="657" y="642" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cmebdc_di" bpmnElement="SequenceFlow_0cmebdc">
+ <di:waypoint xsi:type="dc:Point" x="370" y="779" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="759" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="759" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="375" y="769" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1os8cm5_di" bpmnElement="ExclusiveGateway_1os8cm5" isMarkerVisible="true">
+ <dc:Bounds x="911" y="792" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="936" y="847" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f26zbk_di" bpmnElement="SequenceFlow_1f26zbk">
+ <di:waypoint xsi:type="dc:Point" x="370" y="829" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="896" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="896" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="842" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="646" y="881" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0nreq15_di" bpmnElement="IntermediateThrowEvent_0nreq15">
+ <dc:Bounds x="1046" y="799" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1024" y="840" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vwssu7_di" bpmnElement="SequenceFlow_1vwssu7">
+ <di:waypoint xsi:type="dc:Point" x="132" y="804" />
+ <di:waypoint xsi:type="dc:Point" x="345" y="804" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="239" y="789" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j7n6qx_di" bpmnElement="SequenceFlow_1j7n6qx">
+ <di:waypoint xsi:type="dc:Point" x="961" y="817" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="817" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1004" y="792" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0rlqdvq_di" bpmnElement="IntermediateCatchEvent_0rlqdvq">
+ <dc:Bounds x="86" y="540" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="80" y="576" width="45" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1nlocis_di" bpmnElement="ExclusiveGateway_1nlocis" isMarkerVisible="true">
+ <dc:Bounds x="335" y="533" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="395" y="565" width="62" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_04q1qud_di" bpmnElement="ExclusiveGateway_04q1qud" isMarkerVisible="true">
+ <dc:Bounds x="901" y="517" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="926" y="572" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10tbv62_di" bpmnElement="SequenceFlow_10tbv62">
+ <di:waypoint xsi:type="dc:Point" x="122" y="558" />
+ <di:waypoint xsi:type="dc:Point" x="335" y="558" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="229" y="533" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bvecvm_di" bpmnElement="SequenceFlow_0bvecvm">
+ <di:waypoint xsi:type="dc:Point" x="360" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="475" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="494" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w7328u_di" bpmnElement="SequenceFlow_0w7328u">
+ <di:waypoint xsi:type="dc:Point" x="360" y="584" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="607" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="607" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="568" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="583" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xowenu_di" bpmnElement="SequenceFlow_0xowenu">
+ <di:waypoint xsi:type="dc:Point" x="951" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="1036" y="542" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="994" y="517" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_04o8gb3_di" bpmnElement="ScriptTask_04o8gb3">
+ <dc:Bounds x="699" y="722" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ag2bk_di" bpmnElement="SequenceFlow_12ag2bk">
+ <di:waypoint xsi:type="dc:Point" x="655" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="699" y="762" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="737" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04vlq8r_di" bpmnElement="SequenceFlow_04vlq8r">
+ <di:waypoint xsi:type="dc:Point" x="799" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="820" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="820" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="841" y="762" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="835" y="762" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0nmoax4_di" bpmnElement="callGetServiceInstance">
+ <dc:Bounds x="285" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_05m3m2e_di" bpmnElement="ScriptTask_05m3m2e">
+ <dc:Bounds x="476" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_112zjtp_di" bpmnElement="IntermediateCatchEvent_112zjtp">
+ <dc:Bounds x="96" y="245" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="281" width="82" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_162gs5w_di" bpmnElement="IntermediateThrowEvent_162gs5w">
+ <dc:Bounds x="732" y="245" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="713" y="286" width="72" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jek18q_di" bpmnElement="SequenceFlow_0jek18q">
+ <di:waypoint xsi:type="dc:Point" x="132" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="248" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18103ca_di" bpmnElement="SequenceFlow_18103ca">
+ <di:waypoint xsi:type="dc:Point" x="576" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="654" y="248" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04ao07f_di" bpmnElement="SequenceFlow_04ao07f">
+ <di:waypoint xsi:type="dc:Point" x="385" y="1049" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="1049" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="447" y="1034" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ttswdr_di" bpmnElement="SequenceFlow_1ttswdr">
+ <di:waypoint xsi:type="dc:Point" x="385" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="422" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="422" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ildy3f_di" bpmnElement="ScriptTask_1ildy3f">
+ <dc:Bounds x="687" y="435" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1uds6yu_di" bpmnElement="ExclusiveGateway_1uds6yu" isMarkerVisible="true">
+ <dc:Bounds x="828" y="450" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="797" y="508" width="80" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dmn40p_di" bpmnElement="SequenceFlow_1dmn40p">
+ <di:waypoint xsi:type="dc:Point" x="655" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="475" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="671" y="450" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g2cw86_di" bpmnElement="SequenceFlow_0g2cw86">
+ <di:waypoint xsi:type="dc:Point" x="787" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="828" y="475" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="808" y="460" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mr8jgt_di" bpmnElement="SequenceFlow_0mr8jgt">
+ <di:waypoint xsi:type="dc:Point" x="853" y="453" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="364" />
+ <di:waypoint xsi:type="dc:Point" x="463" y="364" />
+ <di:waypoint xsi:type="dc:Point" x="463" y="435" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="649" y="349" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wc8h5g_di" bpmnElement="SequenceFlow_1wc8h5g">
+ <di:waypoint xsi:type="dc:Point" x="878" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="517" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="895" y="460" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06llof4_di" bpmnElement="SequenceFlow_06llof4">
+ <di:waypoint xsi:type="dc:Point" x="159" y="1466" />
+ <di:waypoint xsi:type="dc:Point" x="237" y="1466" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="198" y="1441" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn
new file mode 100644
index 0000000..8c37d21
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn
@@ -0,0 +1,370 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DeleteNetworkInstance" name="DeleteNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def networkMod = new DeleteNetworkInstance()
+networkMod.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doDeleteNetworkInstance_CallActivity" name="DoDelete Network Instance&#10;" calledElement="DoDeleteNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="networkId" target="networkId" />
+ <camunda:in source="networkName" target="networkName" />
+ <camunda:in source="networkModelInfo" target="networkModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="networkInputParams" target="networkInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="networkId" target="networkId" />
+ <camunda:out source="networkName" target="networkName" />
+ <camunda:out source="networkOutputParams" target="networkOutputParams" />
+ <camunda:in source="bpmnRequest" target="bpmnRequest" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_0x3znm5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_09qt0pi" name="DeleteNetwork PostProcess Success&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x3znm5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doDeleteNetworkInstance_CallActivity" targetRef="ScriptTask_0cihgpv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0x3znm5" sourceRef="ScriptTask_09qt0pi" targetRef="EndEvent_0o440av" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ablr60</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def preProcess = new DeleteNetworkInstance()
+preProcess.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ablr60" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_19xbdbu" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.prepareCompletion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1akfe0b" name="Prepare DB Infra Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s5niqb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.prepareDBRequestError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_0sztuly" name="Call DB Infra Error Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${DELNI_deleteDBRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="DELNI_deleteDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELNI_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1s5niqb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06s5eu4</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_06s5eu4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.buildErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s5niqb" sourceRef="ScriptTask_1akfe0b" targetRef="ServiceTask_0sztuly" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06s5eu4" sourceRef="ServiceTask_0sztuly" targetRef="ScriptTask_1hql91g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_1akfe0b" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="ScriptTask_09qt0pi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0rt8wax" sourceRef="Task_19xbdbu" targetRef="Task_1nko5zz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doDeleteNetworkInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_19xbdbu" name="Get Network Model Info&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ablr60</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0rt8wax</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.getNetworkModelInfo(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0rt8wax</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
+ <dc:Bounds x="3" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="-8" y="786" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="25" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="43" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="140" y="841" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="301" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="319" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
+ <di:waypoint xsi:type="dc:Point" x="61" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="881" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
+ <di:waypoint xsi:type="dc:Point" x="240" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="301" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="275" y="881" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doDeleteNetworkInstance_CallActivity">
+ <dc:Bounds x="673" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1408" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="115" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09qt0pi_di" bpmnElement="ScriptTask_09qt0pi">
+ <dc:Bounds x="1253" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="773" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="920" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="847" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x3znm5_di" bpmnElement="SequenceFlow_0x3znm5">
+ <di:waypoint xsi:type="dc:Point" x="1353" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1381" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="139" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="39" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="104" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ablr60_di" bpmnElement="SequenceFlow_1ablr60">
+ <di:waypoint xsi:type="dc:Point" x="239" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="342" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="291" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="920" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="1086" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1akfe0b_di" bpmnElement="ScriptTask_1akfe0b">
+ <dc:Bounds x="189" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0sztuly_di" bpmnElement="ServiceTask_0sztuly">
+ <dc:Bounds x="384" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="1020" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1086" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1053" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="563" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="738" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="-13" y="353" width="1021" height="404" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="83" y="547" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="101" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="913" y="547" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="931" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s5niqb_di" bpmnElement="SequenceFlow_1s5niqb">
+ <di:waypoint xsi:type="dc:Point" x="289" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="337" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06s5eu4_di" bpmnElement="SequenceFlow_06s5eu4">
+ <di:waypoint xsi:type="dc:Point" x="484" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="524" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="663" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="838" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="913" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="876" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1186" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1253" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1220" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="119" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="154" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rt8wax_di" bpmnElement="SequenceFlow_0rt8wax">
+ <di:waypoint xsi:type="dc:Point" x="442" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="515" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="479" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="615" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="673" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gpvlh8_di" bpmnElement="Task_19xbdbu">
+ <dc:Bounds x="342" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="515" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn
new file mode 100644
index 0000000..b974bd0
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_F0omAMXGEeW834CKd-K10Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DeleteVfModuleInfra" name="DeleteVfModuleInfra" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_7" name="DoDeleteVfModule (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.prepDoDeleteVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="ScriptTask_6" name="DoDeleteVfModule" calledElement="DoDeleteVfModule">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="DELVfModI_requestId" target="requestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vfModuleId" target="vfModuleId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="DELVfModI_vfModuleName" target="vfModuleName" />
+ <camunda:in source="vfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="cloudConfiguration" target="cloudConfiguration" />
+ <camunda:in source="&#34;1610&#34;" target="sdncVersion" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_6" />
+ <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVfModI_CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4" />
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("DeleteVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.completionHandlerPrep(execution, 'DELVfModI_CompletionHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_5" />
+ <bpmn2:serviceTask id="ScriptTask_8" name="UpdateInfraRequest">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${DELVfModI_updateInfraRequest}</camunda:inputParameter>
+ <camunda:outputParameter name="DELVfModI_updateInfraRequestResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELVfModI_updateInfraRequestResponseCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_8" targetRef="ScriptTask_10" />
+ <bpmn2:scriptTask id="ScriptTask_5" name="Update Infra Request (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.prepUpdateInfraRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_5" targetRef="ScriptTask_8" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_3" />
+ <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.falloutHandlerPrep(execution, 'DELVfModI_FalloutHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2" />
+ <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVfModI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_2" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="144" y="72" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="145" y="113" width="34" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds x="605" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="598" y="411" width="50" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="180" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="230" y="90" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="299" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="399" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="449" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="433" y="90" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="449" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125" targetElement="_BPMNShape_ScriptTask_130">
+ <di:waypoint xsi:type="dc:Point" x="498" y="130" />
+ <di:waypoint xsi:type="dc:Point" x="498" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="190" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="717" y="169" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="449" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
+ <di:waypoint xsi:type="dc:Point" x="549" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="605" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="723" y="186" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">
+ <dc:Bounds x="149" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds x="149" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds x="299" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
+ <di:waypoint xsi:type="dc:Point" x="249" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="65" y="536" width="565" height="241" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds x="129" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="98" y="671" width="98" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="209" y="608" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">
+ <di:waypoint xsi:type="dc:Point" x="165" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="948" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">
+ <di:waypoint xsi:type="dc:Point" x="309" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="325" y="648" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds x="533" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="551" y="671" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="612" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="627" y="671" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds x="704" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="671" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">
+ <di:waypoint xsi:type="dc:Point" x="648" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="693" y="948" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds x="377" y="608" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="399" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="449" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="439" y="356" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
+ <di:waypoint xsi:type="dc:Point" x="477" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="533" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="373" y="456" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="299" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_ScriptTask_181">
+ <di:waypoint xsi:type="dc:Point" x="249" y="230" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="230" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_182" bpmnElement="ScriptTask_5">
+ <dc:Bounds x="453" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_183" bpmnElement="ScriptTask_8">
+ <dc:Bounds x="598" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_181" targetElement="_BPMNShape_ScriptTask_182">
+ <di:waypoint xsi:type="dc:Point" x="399" y="230" />
+ <di:waypoint xsi:type="dc:Point" x="453" y="230" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="613" y="314" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_182" targetElement="_BPMNShape_ScriptTask_183">
+ <di:waypoint xsi:type="dc:Point" x="553" y="230" />
+ <di:waypoint xsi:type="dc:Point" x="598" y="230" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575" y="230" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_183" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="647" y="270" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="304" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="304" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="348" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="280" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000..163e50b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn
@@ -0,0 +1,568 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="DeleteVfModuleVolumeInfraV1" name="DeleteVfModuleVolumeInfraV1" isExecutable="true">
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('preProcessRequest', execution, isDebugLogEnabled)
+
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>
+ <bpmn2:startEvent id="deleteNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="deleteNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>
+ <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('sendSyncResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="ScriptTask_callRestCloudRegion"/>
+ <bpmn2:scriptTask id="ScriptTask_callRestCloudRegion" name="Call REST Query Cloud Region " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def delVfModuleVol = new DeleteVfModuleVolumeInfraV1()
+delVfModuleVol.executeMethod('callRESTQueryAAICloudRegion', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="prepareVnfAdapterDelete_ScriptTask_1" name="Prepare Vnf Adapter Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareVnfAdapterDeleteRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="prepareVnfAdapterDelete_ScriptTask_1" targetRef="callVnfAdapterDeleteSubflow_CallActivity"/>
+ <bpmn2:endEvent id="EndEvent_5">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="TenantId Match?" default="SequenceFlow_21">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ExclusiveGateway_3" targetRef="prepareVnfAdapterDelete_ScriptTask_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVfModVol_tenantId") == execution.getVariable("DELVfModVol_volumeGroupTenantId")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_2"/>
+ <bpmn2:callActivity id="callVnfAdapterDeleteSubflow_CallActivity" name="Call Vnf Adapter Delete subflow" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVfModVol_deleteVnfARequest" target="vnfAdapterRestV1Request"/>
+ <camunda:out source="vnfAdapterRestV1Response" target="DELVfModVol_deleteVnfAResponse"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in variables="all"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:out source="VNFREST_SuccessIndicator" target="VNFREST_SuccessIndicator"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callVnfAdapterDeleteSubflow_CallActivity" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Query AAI for Volume Group Info" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('queryAAIForVolumeGroup', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="callAAIQuery_scriptTask" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:scriptTask id="ScriptTask_2" name="Handle TenantId Mismatch" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('handleTenantIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_5"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_callRestCloudRegion" targetRef="ExclusiveGateway_1"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="is Cloud Region Ok?" default="SequenceFlow_4">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_3"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ExclusiveGateway_1" targetRef="callAAIQuery_scriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVfModVol_isCloudRegionGood") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
+ <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="ExclusiveGateway_synResponseSent"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_synResponseSent" name="Sync response sent?" default="SequenceFlow_responseNotSent">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_responseNotSent</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_responseSent</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Send Sync Ack Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_responseNotSent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('sendSyncError', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_responseNotSent" name="No" sourceRef="ExclusiveGateway_synResponseSent" targetRef="ScriptTask_4"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_responseSent" name="Yes" sourceRef="ExclusiveGateway_synResponseSent" targetRef="prepareFalloutHandler_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DELVfModVol_syncResponseSent == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_responseSent</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareFalloutHandler', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/>
+ <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all"/>
+ <camunda:out variables="all"/>
+ <camunda:in source="DELVfModVol_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode"/>
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse"/>
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_1"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_4" targetRef="prepareFalloutHandler_ScriptTask"/>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareDBRequest', execution, isDebugLogEnabled)
+
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Prepare Completion Handler Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareCompletionHandlerRequest', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Set Success" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("DELVfModVol_TransactionSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ScriptTask_3" targetRef="EndEvent_2"/>
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all"/>
+ <camunda:out variables="all"/>
+ <camunda:in source="DELVfModVol_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_3"/>
+ <bpmn2:endEvent id="EndEvent_2" name="End">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_3"/>
+ </bpmn2:endEvent>
+ <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda: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="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="DELVfModVol_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELVfModVol_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask"/>
+ <bpmn2:scriptTask id="callRESTDeleteVolGrpId_ScriptTask" name="Call REST Delete AAI Vol Grp Id" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_vnfAdapterCallOK</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('deleteVolGrpId', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTDeleteVolGrpId_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Is call to VNF Adapter OK?" default="SequenceFlow_vnfAdapterCallNotOK">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_vnfAdapterCallOK</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_vnfAdapterCallNotOK</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterCallOK" name="" sourceRef="ExclusiveGateway_2" targetRef="callRESTDeleteVolGrpId_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{VNFREST_SuccessIndicator == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_6">
+ <bpmn2:incoming>SequenceFlow_vnfAdapterCallNotOK</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_5" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterCallNotOK" name="" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_6"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" errorCode="java.lang.Exception" name="java.lang.Exception"/>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">
+ <dc:Bounds height="36.0" width="36.0" x="103.0" y="94.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="65.0" x="89.0" y="135.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="355.0" y="72.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="139.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="355.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="116.0" y="12.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="864.0" y="72.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="438.0" y="360.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="985.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds height="337.0" width="660.0" x="37.0" y="288.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds height="36.0" width="36.0" x="60.0" y="383.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="67.0" x="45.0" y="424.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="288.0" y="360.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="877.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="660.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="769.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="455.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="496.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="486.0" y="112.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="496.0" y="72.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_255">
+ <di:waypoint xsi:type="dc:Point" x="96.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="118.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="118.0" y="400.0"/>
+ <di:waypoint xsi:type="dc:Point" x="144.0" y="400.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="99.0" y="401.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3">
+ <di:waypoint xsi:type="dc:Point" x="388.0" y="400.0"/>
+ <di:waypoint xsi:type="dc:Point" x="438.0" y="400.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="413.0" y="400.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="849.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="877.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1258.0" y="857.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="957.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="985.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1289.0" y="898.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTDeleteVolGrpId_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="528.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_83">
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="608.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="660.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1291.0" y="557.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="740.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="769.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1258.0" y="751.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_22" bpmnElement="callVnfAdapterDeleteSubflow_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="300.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="prepareVnfAdapterDelete_ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="180.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_CallActivity_22">
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="260.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="300.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1112.0" y="280.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_22" targetElement="_BPMNShape_ExclusiveGateway_252">
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="380.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1042.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1042.0" y="422.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1039.0" y="415.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="588.0" y="382.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="606.0" y="423.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_163">
+ <di:waypoint xsi:type="dc:Point" x="538.0" y="400.0"/>
+ <di:waypoint xsi:type="dc:Point" x="588.0" y="400.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="558.0" y="400.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_167" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="1025.0" y="1201.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1029.0" y="1242.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_241">
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="1065.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="1093.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1258.0" y="1083.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_4">
+ <dc:Bounds height="80.0" width="100.0" x="120.0" y="492.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_ScriptTask_251">
+ <di:waypoint xsi:type="dc:Point" x="596.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="623.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="623.0" y="115.0"/>
+ <di:waypoint xsi:type="dc:Point" x="636.0" y="115.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="613.0" y="112.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_203">
+ <di:waypoint xsi:type="dc:Point" x="964.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1017.0" y="111.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1067.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_203" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1017.0" y="86.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="102.0" x="984.0" y="60.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_240" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="1104.0" y="72.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_203" targetElement="_BPMNShape_ScriptTask_160">
+ <di:waypoint xsi:type="dc:Point" x="1042.0" y="136.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="180.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1040.0" y="122.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_203" targetElement="_BPMNShape_ScriptTask_240">
+ <di:waypoint xsi:type="dc:Point" x="1067.0" y="111.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1085.0" y="111.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1085.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1104.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1216.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_5">
+ <dc:Bounds height="36.0" width="36.0" x="1242.0" y="95.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1260.0" y="136.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_240" targetElement="_BPMNShape_EndEvent_178">
+ <di:waypoint xsi:type="dc:Point" x="1204.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1222.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1222.0" y="113.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1242.0" y="113.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1220.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="ScriptTask_3">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="1093.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_241" targetElement="_BPMNShape_EndEvent_167">
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="1173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="1201.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1040.0" y="1320.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="ScriptTask_callRestCloudRegion">
+ <dc:Bounds height="80.0" width="100.0" x="636.0" y="75.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="774.0" y="89.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="125.0" x="735.0" y="40.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_215" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="781.0" y="170.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="799.0" y="211.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_EndEvent_215">
+ <di:waypoint xsi:type="dc:Point" x="798.0" y="139.0"/>
+ <di:waypoint xsi:type="dc:Point" x="798.0" y="153.0"/>
+ <di:waypoint xsi:type="dc:Point" x="799.0" y="153.0"/>
+ <di:waypoint xsi:type="dc:Point" x="799.0" y="170.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="796.0" y="166.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_251" targetElement="_BPMNShape_ExclusiveGateway_223">
+ <di:waypoint xsi:type="dc:Point" x="736.0" y="115.0"/>
+ <di:waypoint xsi:type="dc:Point" x="754.0" y="115.0"/>
+ <di:waypoint xsi:type="dc:Point" x="754.0" y="114.0"/>
+ <di:waypoint xsi:type="dc:Point" x="774.0" y="114.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="752.0" y="114.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_62">
+ <di:waypoint xsi:type="dc:Point" x="824.0" y="114.0"/>
+ <di:waypoint xsi:type="dc:Point" x="844.0" y="114.0"/>
+ <di:waypoint xsi:type="dc:Point" x="844.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="864.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="841.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1017.0" y="422.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="164.0" x="960.0" y="477.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_vnfAdapterCallOK" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_ScriptTask_134">
+ <di:waypoint xsi:type="dc:Point" x="1042.0" y="472.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="528.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1040.0" y="500.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_6">
+ <dc:Bounds height="36.0" width="36.0" x="1168.0" y="430.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1186.0" y="471.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_vnfAdapterCallNotOK" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_EndEvent_236">
+ <di:waypoint xsi:type="dc:Point" x="1067.0" y="447.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1117.0" y="447.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1117.0" y="448.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1168.0" y="448.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_synResponseSent" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="144.0" y="375.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="129.0" x="106.0" y="439.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_responseNotSent" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_234">
+ <di:waypoint xsi:type="dc:Point" x="169.0" y="425.0"/>
+ <di:waypoint xsi:type="dc:Point" x="169.0" y="458.0"/>
+ <di:waypoint xsi:type="dc:Point" x="170.0" y="458.0"/>
+ <di:waypoint xsi:type="dc:Point" x="170.0" y="492.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="159.0" y="458.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_responseSent" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_79">
+ <di:waypoint xsi:type="dc:Point" x="194.0" y="400.0"/>
+ <di:waypoint xsi:type="dc:Point" x="288.0" y="400.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="204.0" y="400.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_234" targetElement="_BPMNShape_ScriptTask_79">
+ <di:waypoint xsi:type="dc:Point" x="220.0" y="532.0"/>
+ <di:waypoint xsi:type="dc:Point" x="254.0" y="532.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="532.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="508.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="482.0"/>
+ <di:waypoint xsi:type="dc:Point" x="337.0" y="440.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="317.0" y="532.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn
new file mode 100644
index 0000000..765bb1f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn
@@ -0,0 +1,353 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_9MhrcHqVEea26OhQB97uCQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DeleteVnfInfra" name="DeleteVnfInfra" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
+ <bpmn2:scriptTask id="sendSyncResponse" name="Send Sync Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16ikne0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="sendSyncResponse" />
+ <bpmn2:subProcess id="bpmnErrorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="prepareFalloutHandlerRequest" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+String requestInfo = execution.getVariable("DELVI_requestInfo")
+ExceptionUtil ex = new ExceptionUtil()
+String falloutHandlerRequest = ex.processMainflowsBPMNException(execution, requestInfo)
+
+execution.setVariable("DELVI_falloutHandlerRequest", falloutHandlerRequest )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="prepareFalloutHandlerRequest" targetRef="callFalloutHandler" />
+ <bpmn2:callActivity id="callFalloutHandler" name="Fallout &#10;&#10;Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVI_falloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="DELVI_requestId" target="requestId" />
+ <camunda:in source="DELVI_serviceInstanceId" target="serviceInstanceId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callFalloutHandler" targetRef="EndEvent_3" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_37" />
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_94" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="StartEvent_2" targetRef="sendErrorResponse" />
+ <bpmn2:scriptTask id="sendErrorResponse" name="Send Error Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.sendErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="sendErrorResponse" targetRef="prepareFalloutHandlerRequest" />
+ </bpmn2:subProcess>
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" />
+ <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="postProcess" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0slfgmy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="postProcess" targetRef="callCompletionHandler" />
+ <bpmn2:callActivity id="callCompletionHandler" name="Completion &#10;&#10;Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVI_completionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="DELVI_requestId" target="mso-request-id" />
+ <camunda:in source="DELVI_serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="callCompletionHandler" targetRef="EndEvent_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="DeleteVnf" name="Delete VNF" calledElement="DoDeleteVnf">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DELVI_vnfId" target="vnfId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_00bhxtl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1f56g06</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1kvxtnz">
+ <bpmn2:incoming>SequenceFlow_16ikne0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00o02cv</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_00bhxtl</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16ikne0" sourceRef="sendSyncResponse" targetRef="ExclusiveGateway_1kvxtnz" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0r544im">
+ <bpmn2:incoming>SequenceFlow_1f56g06</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dy2xw0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0slfgmy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f56g06" sourceRef="DeleteVnf" targetRef="ExclusiveGateway_0r544im" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00o02cv" name="cascade delete" sourceRef="ExclusiveGateway_1kvxtnz" targetRef="Task_0ob25pp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVI_cascadeDelete")==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_0ob25pp" name="Delete VNF and Modules" calledElement="DoDeleteVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DELVI_requestId" target="requestId" />
+ <camunda:in source="DELVI_vnfId" target="vnfId" />
+ <camunda:in source="DELVI_serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="DELVI_cloudConfiguration" target="cloudConfiguration" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_00o02cv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0dy2xw0</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dy2xw0" sourceRef="Task_0ob25pp" targetRef="ExclusiveGateway_0r544im" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0slfgmy" sourceRef="ExclusiveGateway_0r544im" targetRef="postProcess" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00bhxtl" sourceRef="ExclusiveGateway_1kvxtnz" targetRef="DeleteVnf" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVnfInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
+ <dc:Bounds x="90" y="210" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="108" y="251" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
+ <dc:Bounds x="216" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="126" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="216" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="164" y="228" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="sendSyncResponse">
+ <dc:Bounds x="364" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_311" targetElement="_BPMNShape_ScriptTask_313">
+ <di:waypoint xsi:type="dc:Point" x="316" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="364" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="341" y="228" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1074" y="210" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1092" y="251" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_34" bpmnElement="bpmnErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="132" y="442" width="589" height="207" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_80" bpmnElement="StartEvent_2">
+ <dc:Bounds x="144" y="528" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="162" y="569" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_238" bpmnElement="EndEvent_3">
+ <dc:Bounds x="672" y="528" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="690" y="569" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_66" bpmnElement="callFalloutHandler">
+ <dc:Bounds x="516" y="506" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_317" bpmnElement="sendErrorResponse">
+ <dc:Bounds x="240" y="506" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="prepareFalloutHandlerRequest">
+ <dc:Bounds x="377" y="506" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_StartEvent_80" targetElement="_BPMNShape_ScriptTask_317">
+ <di:waypoint xsi:type="dc:Point" x="180" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="240" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="201" y="546" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_317" targetElement="_BPMNShape_ScriptTask_318">
+ <di:waypoint xsi:type="dc:Point" x="340" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="353" y="546" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_318" targetElement="_BPMNShape_CallActivity_66">
+ <di:waypoint xsi:type="dc:Point" x="477" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="516" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="491" y="546" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_66" targetElement="_BPMNShape_EndEvent_238">
+ <di:waypoint xsi:type="dc:Point" x="616" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="672" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="635" y="546" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="271" y="696" width="312" height="157" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
+ <dc:Bounds x="300" y="757" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="318" y="798" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds x="516" y="757" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="534" y="798" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
+ <dc:Bounds x="378" y="735" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">
+ <di:waypoint xsi:type="dc:Point" x="336" y="775" />
+ <di:waypoint xsi:type="dc:Point" x="378" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="354" y="775" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="478" y="775" />
+ <di:waypoint xsi:type="dc:Point" x="516" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="494" y="775" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_326" bpmnElement="postProcess">
+ <dc:Bounds x="776" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_326" targetElement="_BPMNShape_CallActivity_71">
+ <di:waypoint xsi:type="dc:Point" x="876" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="932" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="904" y="213" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_71" bpmnElement="callCompletionHandler">
+ <dc:Bounds x="932" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_CallActivity_71" targetElement="_BPMNShape_EndEvent_237">
+ <di:waypoint xsi:type="dc:Point" x="1032" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="1074" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1053" y="213" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_63" bpmnElement="DeleteVnf">
+ <dc:Bounds x="571" y="292" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1kvxtnz_di" bpmnElement="ExclusiveGateway_1kvxtnz" isMarkerVisible="true">
+ <dc:Bounds x="514" y="203" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="539" y="253" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16ikne0_di" bpmnElement="SequenceFlow_16ikne0">
+ <di:waypoint xsi:type="dc:Point" x="464" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="489" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="489" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="514" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="504" y="228" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0r544im_di" bpmnElement="ExclusiveGateway_0r544im" isMarkerVisible="true">
+ <dc:Bounds x="677" y="203" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="702" y="253" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f56g06_di" bpmnElement="SequenceFlow_1f56g06">
+ <di:waypoint xsi:type="dc:Point" x="671" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="253" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="307" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00o02cv_di" bpmnElement="SequenceFlow_00o02cv">
+ <di:waypoint xsi:type="dc:Point" x="539" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="118" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="461" y="157" width="74" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_01wzpfb_di" bpmnElement="Task_0ob25pp">
+ <dc:Bounds x="571" y="78" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dy2xw0_di" bpmnElement="SequenceFlow_0dy2xw0">
+ <di:waypoint xsi:type="dc:Point" x="671" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="93" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0slfgmy_di" bpmnElement="SequenceFlow_0slfgmy">
+ <di:waypoint xsi:type="dc:Point" x="727" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="776" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="752" y="213" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00bhxtl_di" bpmnElement="SequenceFlow_00bhxtl">
+ <di:waypoint xsi:type="dc:Point" x="539" y="253" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="332" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="554" y="283" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn
new file mode 100644
index 0000000..bba8b6f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn
@@ -0,0 +1,1016 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="UpdateNetworkInstanceInfra" name="UpdateNetworkInstanceInfra" isExecutable="true">
+ <bpmn2:startEvent id="updateNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="updateNetwork_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity" />
+ <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.validateSDNCResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>sdncTopoNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncTopoYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent" />
+ <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTReQuery1NetworkID_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask">
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent" />
+ <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">
+ <bpmn2:incoming>sdncTopoNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDNETI_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="UPDNETI_rollbackSDNCResponse" />
+ </bpmn2:extensionElements>
+ </bpmn2:callActivity>
+ <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" attachedToRef="callAssignSDNCAdapter_CallActivity">
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign Adapter V1 Sub-process" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDNETI_changeAssignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="sdncAdapterResponse" target="UPDNETI_changeAssignSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_sdncReturnCode" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="UPDNETI_WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:in variables="all" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &#38; Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" />
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
+ <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isRollbackOn_YesNetwork_SequenceFlow" name="Yes" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isRollbackOn_NoNetwork_SequenceFlow" name="No" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="InclusiveGateway_6" />
+ <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="isRollbackOn_Network_ExclusiveGateway" />
+ <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="isPONR?" default="isPONR_No_SequenceFlow">
+ <bpmn2:incoming>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="InclusiveGateway_6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isPONR") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isNetworkOk_ExclusiveGateway" />
+ <bpmn2:exclusiveGateway id="isNetworkOk_ExclusiveGateway" name="is Network Ok?" default="isNetworkOk_No_SequenceFlow">
+ <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isNetworkOk_No_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isNetworkOk_Yes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isNetworkOk_No_SequenceFlow" name="No" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway" />
+ <bpmn2:sequenceFlow id="isNetworkOk_Yes_SequenceFlow" name="Yes" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isNetworkRollbackNeeded") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway">
+ <bpmn2:incoming>isNetworkOk_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isNetworkOk_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>sdncOk_Yeso_ExclusiveGateway</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="prepareSDNCRollbackRequest_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="validateRollbacksResponse_ScriptTask_2" />
+ <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy">
+ <bpmn2:incoming>sdncOk_Yeso_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_53</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="sdncTopoRollback_IntermediateThrowEvent" />
+ <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback">
+ <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" waitForCompletion="true" activityRef="callRollbackSDNCAdapter_CallActivity" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_55" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="validateRollbacksResponse_ScriptTask_2" />
+ <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1" />
+ <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda: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="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ <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:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask" />
+ <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="UPDNETI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="validateRollbacksResponse_ScriptTask_2" name="Validate Rollback Responses" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming>
+ <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.validateRollbackResponses(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="validateRollbacksResponse_ScriptTask_2" targetRef="InclusiveGateway_6" />
+ <bpmn2:inclusiveGateway id="InclusiveGateway_6">
+ <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="prepareDBInfraErrorRequest_ScriptTask" />
+ <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def buildErrorResponse = new UpdateNetworkInstanceInfra()
+buildErrorResponse.buildErrorResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="callRESTReQuery2NetworkID_ScriptTask" name="Call REST ReQuery2 Network Id in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQuery2NetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask" />
+ <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareDBRequest(execution)
+
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask" />
+ <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda: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="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ <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:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask" />
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="UPDNETI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>siFoundYes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_ScriptTask" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>siFoundNo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2" />
+ <bpmn2:exclusiveGateway id="siFoundCheck" name="is SI Found?" default="siFoundNo">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>siFoundYes</bpmn2:outgoing>
+ <bpmn2:outgoing>siFoundNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="callRESTQueryNetworkId_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound" />
+ <bpmn2:callActivity id="callGetServiceInstance" name="Get &#10;Service &#10;Instance" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDNETI_serviceInstanceId" target="GENGS_serviceInstanceId" />
+ <camunda:out source="GENGS_serviceInstance" target="UPDNETI_serviceInstanceId" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator" />
+ <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator" />
+ <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="GENGS_type" target="GENGS_type" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck" />
+ <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance" />
+ <bpmn2:scriptTask id="validateUpdatePONetwork_ScriptTask" name="Validate Update PO Network" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateUpdatePONetwork_ScriptTask" targetRef="callRESTReQuery2NetworkID_ScriptTask" />
+ <bpmn2:serviceTask id="callUpdateNetwork_ServiceTask" name="Call Update Network">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="payload">${UPDNETI_updateNetworkRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}/${UPDNETI_networkId}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>
+ <camunda:entry key="content-type">application/xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">PUT</camunda:inputParameter>
+ <camunda:outputParameter name="UPDNETI_networkReturnCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="UPDNETI_updateNetworkResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="callUpdateNetwork_ServiceTask" targetRef="validateUpdatePONetwork_ScriptTask" />
+ <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def 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 org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTReQuery1NetworkID_ScriptTask" name="Call REST ReQuery1 Network Id in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.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 org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask" />
+ <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkInstanceInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="updateNetwork_startEvent">
+ <dc:Bounds x="192" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="193" y="226" width="34" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="350" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="228" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="350" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="249" y="203" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateUpdatePONetwork_ScriptTask">
+ <dc:Bounds x="1343" y="1311" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
+ <dc:Bounds x="996" y="806" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callUpdateNetwork_ServiceTask">
+ <dc:Bounds x="1342" y="1176" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
+ <dc:Bounds x="1343" y="276" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds x="137" y="1395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds x="17" y="585" width="1122" height="567" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds x="48" y="1040" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="33" y="1081" width="67" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
+ <dc:Bounds x="756" y="806" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1523" y="520" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1487" y="569" width="125" height="22" />
+ </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" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1682" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1577" y="546" width="22" height="22" />
+ </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" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1500" y="545" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="347" y="1392" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
+ <dc:Bounds x="792" y="1390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
+ <dc:Bounds x="564" y="1392" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
+ <dc:Bounds x="1682" y="528" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1663" y="569" width="74" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">
+ <dc:Bounds x="1341" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent">
+ <dc:Bounds x="1323" y="434" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1280" y="474" width="82" height="22" />
+ </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" y="356" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="374" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="374" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="395" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1389" y="374" width="6" height="6" />
+ </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" y="435" />
+ <di:waypoint xsi:type="dc:Point" x="1499" y="435" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1473" y="435" width="6" height="6" />
+ </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" y="447" />
+ <di:waypoint xsi:type="dc:Point" x="1290" y="438" />
+ </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" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="516" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="481" y="203" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="516" y="163" width="100" height="80" />
+ </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" y="1058" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="1058" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="161" y="1057" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="96" y="1058" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent">
+ <dc:Bounds x="470" y="867" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="906" width="96" height="22" />
+ </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" y="846" />
+ <di:waypoint xsi:type="dc:Point" x="996" y="846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="881" y="846" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
+ <dc:Bounds x="1499" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">
+ <di:waypoint xsi:type="dc:Point" x="1549" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="1549" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="1548" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="1548" y="520" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1545" y="503" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">
+ <di:waypoint xsi:type="dc:Point" x="564" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="506" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="506" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="447" y="1432" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="528" y="1432" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+ <di:waypoint xsi:type="dc:Point" x="347" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="1435" />
+ <di:waypoint xsi:type="dc:Point" x="237" y="1435" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="290" y="1512" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity">
+ <dc:Bounds x="1190" y="384" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">
+ <dc:Bounds x="984" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQuery2NetworkID_ScriptTask">
+ <dc:Bounds x="1176" y="1390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">
+ <dc:Bounds x="984" y="1392" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135">
+ <di:waypoint xsi:type="dc:Point" x="1176" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="1084" y="1432" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1143" y="1657" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">
+ <di:waypoint xsi:type="dc:Point" x="792" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="691" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="691" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="1432" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="773" y="1430" width="6" height="6" />
+ </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" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="892" y="1430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="947" y="1432" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">
+ <dc:Bounds x="1341" y="688" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215">
+ <di:waypoint xsi:type="dc:Point" x="1391" y="768" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="810" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1388" y="781" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63">
+ <di:waypoint xsi:type="dc:Point" x="1392" y="1256" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="1311" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1390" y="1284" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">
+ <dc:Bounds x="1342" y="1052" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83">
+ <di:waypoint xsi:type="dc:Point" x="1392" y="1132" />
+ <di:waypoint xsi:type="dc:Point" x="1392" y="1176" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1389" y="1159" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="161" y="1032" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="138" y="1092" width="98" height="22" />
+ </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" y="1032" />
+ <di:waypoint xsi:type="dc:Point" x="186" y="1004" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="186" y="1020" width="29" height="22" />
+ </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" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="1004" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="1062" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">
+ <dc:Bounds x="1341" y="810" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_335">
+ <di:waypoint xsi:type="dc:Point" x="1391" y="890" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="926" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1388" y="900" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6">
+ <dc:Bounds x="336" y="954" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="361" y="1009" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="161" y="954" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="969" width="60" height="22" />
+ </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" y="979" />
+ <di:waypoint xsi:type="dc:Point" x="336" y="979" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="983" width="29" height="22" />
+ </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" y="954" />
+ <di:waypoint xsi:type="dc:Point" x="186" y="884" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="191" y="933" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_216" bpmnElement="isNetworkOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="161" y="834" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="68" y="849" width="95" height="22" />
+ </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" y="859" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="859" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="781" />
+ <di:waypoint xsi:type="dc:Point" x="336" y="781" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="863" width="22" height="22" />
+ </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" y="834" />
+ <di:waypoint xsi:type="dc:Point" x="186" y="781" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="781" />
+ <di:waypoint xsi:type="dc:Point" x="336" y="781" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="192" y="814" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="336" y="756" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="722" width="78" height="22" />
+ </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" y="781" />
+ <di:waypoint xsi:type="dc:Point" x="438" y="781" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="386" y="779" width="29" height="22" />
+ </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" y="806" />
+ <di:waypoint xsi:type="dc:Point" x="362" y="845" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="806" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="169" y="1536" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="187" y="1577" width="0" height="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" y="1475" />
+ <di:waypoint xsi:type="dc:Point" x="187" y="1536" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="184" y="1475" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">
+ <dc:Bounds x="1028" y="924" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1046" y="965" width="0" height="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" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="924" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1043" y="888" width="6" height="6" />
+ </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" y="846" />
+ <di:waypoint xsi:type="dc:Point" x="756" y="846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="686" y="846" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">
+ <dc:Bounds x="576" y="806" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">
+ <dc:Bounds x="576" y="940" width="100" height="80" />
+ </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" y="940" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="886" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="623" y="927" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
+ <dc:Bounds x="1200" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67">
+ <di:waypoint xsi:type="dc:Point" x="1300" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1394" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="276" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1314" y="140" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">
+ <dc:Bounds x="1581" y="377" width="36" height="36" />
+ </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" y="395" />
+ <di:waypoint xsi:type="dc:Point" x="1700" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1700" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1697" y="467" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">
+ <dc:Bounds x="438" y="742" width="100" height="79" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_262" bpmnElement="validateRollbacksResponse_ScriptTask_2">
+ <dc:Bounds x="312" y="845" width="100" height="80" />
+ </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" y="979" />
+ <di:waypoint xsi:type="dc:Point" x="548" y="979" />
+ <di:waypoint xsi:type="dc:Point" x="548" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="576" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="393" y="979" width="6" height="6" />
+ </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" y="820" />
+ <di:waypoint xsi:type="dc:Point" x="488" y="867" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="485" y="847" width="6" height="6" />
+ </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" y="885" />
+ <di:waypoint xsi:type="dc:Point" x="441" y="885" />
+ <di:waypoint xsi:type="dc:Point" x="441" y="885" />
+ <di:waypoint xsi:type="dc:Point" x="412" y="885" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="448" y="885" width="6" height="6" />
+ </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" y="925" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="954" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="358" y="948" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134">
+ <di:waypoint xsi:type="dc:Point" x="1393" y="1391" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="1310" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="1276" y="1430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1390" y="1425" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="21" y="381" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="54" y="458" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="499" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="169" y="436" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="330" y="458" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="348" y="499" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
+ <di:waypoint xsi:type="dc:Point" x="90" y="476" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="476" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="476" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
+ <di:waypoint xsi:type="dc:Point" x="269" y="476" />
+ <di:waypoint xsi:type="dc:Point" x="330" y="476" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="301" y="476" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
+ <dc:Bounds x="686" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
+ <dc:Bounds x="836" y="177" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="891" y="195" width="79" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244">
+ <di:waypoint xsi:type="dc:Point" x="786" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="805" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="805" y="202" />
+ <di:waypoint xsi:type="dc:Point" x="836" y="202" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="799" y="203" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="861" y="177" />
+ <di:waypoint xsi:type="dc:Point" x="861" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="910" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="984" y="140" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="868" y="157" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1155" y="278" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1173" y="319" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
+ <dc:Bounds x="984" y="256" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331">
+ <di:waypoint xsi:type="dc:Point" x="861" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="861" y="296" />
+ <di:waypoint xsi:type="dc:Point" x="984" y="296" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="871" y="233" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">
+ <di:waypoint xsi:type="dc:Point" x="1084" y="296" />
+ <di:waypoint xsi:type="dc:Point" x="1155" y="296" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1103" y="296" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_245">
+ <di:waypoint xsi:type="dc:Point" x="1084" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1200" y="140" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1127" y="140" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_72">
+ <di:waypoint xsi:type="dc:Point" x="616" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="686" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="632" y="203" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
+ <dc:Bounds x="1341" y="926" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_335" targetElement="_BPMNShape_ScriptTask_157">
+ <di:waypoint xsi:type="dc:Point" x="1391" y="1006" />
+ <di:waypoint xsi:type="dc:Point" x="1392" y="1052" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1388" y="1028" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_336" bpmnElement="callRESTReQuery1NetworkID_ScriptTask">
+ <dc:Bounds x="1343" y="576" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_336" targetElement="_BPMNShape_ScriptTask_156">
+ <di:waypoint xsi:type="dc:Point" x="1393" y="656" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="672" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="672" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="688" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1390" y="666" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleInfra.bpmn
new file mode 100644
index 0000000..1d20bd0
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/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://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_F0omAMXGEeW834CKd-K10Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="UpdateVfModuleInfra" name="UpdateVfModuleInfra" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7"/>
+ <bpmn2:scriptTask id="ScriptTask_2" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_1"/>
+ <bpmn2:scriptTask id="ScriptTask_7" name="DoUpdateVfModule (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.prepDoUpdateVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="ScriptTask_6" name="DoUpdateVfModule" calledElement="DoUpdateVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_Request" target="DoUpdateVfModuleRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_6"/>
+ <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_CompletionHandlerRequest" target="CompleteMsoProcessRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4"/>
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1"/>
+ <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.completionHandlerPrep(execution, 'UPDVfModI_CompletionHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1"/>
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_3"/>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.falloutHandlerPrep(execution, 'UPDVfModI_FalloutHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2"/>
+ <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2"/>
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2"/>
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3"/>
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_10"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="149.0" y="72.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="150.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="605.0" y="370.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="598.0" y="411.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="185.0" y="90.0"/>
+ <di:waypoint xsi:type="dc:Point" x="299.0" y="90.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="235.0" y="90.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="299.0" y="50.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="399.0" y="90.0"/>
+ <di:waypoint xsi:type="dc:Point" x="449.0" y="90.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="433.0" y="90.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="449.0" y="50.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125" targetElement="_BPMNShape_ScriptTask_130">
+ <di:waypoint xsi:type="dc:Point" x="498.0" y="130.0"/>
+ <di:waypoint xsi:type="dc:Point" x="498.0" y="160.0"/>
+ <di:waypoint xsi:type="dc:Point" x="199.0" y="160.0"/>
+ <di:waypoint xsi:type="dc:Point" x="199.0" y="190.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="717.0" y="169.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds height="80.0" width="100.0" x="449.0" y="348.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
+ <di:waypoint xsi:type="dc:Point" x="549.0" y="388.0"/>
+ <di:waypoint xsi:type="dc:Point" x="605.0" y="388.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="723.0" y="186.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">
+ <dc:Bounds height="80.0" width="100.0" x="149.0" y="190.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds height="80.0" width="100.0" x="149.0" y="348.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds height="80.0" width="100.0" x="299.0" y="348.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
+ <di:waypoint xsi:type="dc:Point" x="249.0" y="388.0"/>
+ <di:waypoint xsi:type="dc:Point" x="299.0" y="388.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="271.0" y="394.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds height="241.0" width="565.0" x="65.0" y="536.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="129.0" y="630.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="98.0" x="98.0" y="671.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds height="80.0" width="100.0" x="209.0" y="608.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">
+ <di:waypoint xsi:type="dc:Point" x="165.0" y="648.0"/>
+ <di:waypoint xsi:type="dc:Point" x="209.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="209.0" y="948.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">
+ <di:waypoint xsi:type="dc:Point" x="309.0" y="648.0"/>
+ <di:waypoint xsi:type="dc:Point" x="377.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="325.0" y="648.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="533.0" y="630.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="551.0" y="671.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="612.0" y="630.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="627.0" y="671.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="704.0" y="630.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="722.0" y="671.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">
+ <di:waypoint xsi:type="dc:Point" x="648.0" y="648.0"/>
+ <di:waypoint xsi:type="dc:Point" x="704.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="693.0" y="948.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds height="80.0" width="100.0" x="377.0" y="608.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="399.0" y="388.0"/>
+ <di:waypoint xsi:type="dc:Point" x="449.0" y="388.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="439.0" y="356.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
+ <di:waypoint xsi:type="dc:Point" x="477.0" y="648.0"/>
+ <di:waypoint xsi:type="dc:Point" x="533.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="373.0" y="456.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
+ <dc:Bounds height="80.0" width="100.0" x="299.0" y="190.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_ScriptTask_181">
+ <di:waypoint xsi:type="dc:Point" x="249.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="299.0" y="230.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_181" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="399.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="233.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="294.0"/>
+ <di:waypoint xsi:type="dc:Point" x="99.0" y="294.0"/>
+ <di:waypoint xsi:type="dc:Point" x="99.0" y="388.0"/>
+ <di:waypoint xsi:type="dc:Point" x="149.0" y="388.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="500.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000..75b88b2
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn
@@ -0,0 +1,517 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_ZBLUcCkQEeaY6ZhIaNLwzg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="UpdateVfModuleVolumeInfraV1" name="UpdateVfModuleVolumeInfraV1" isExecutable="true">
+ <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallActivity_completionHandler" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModVol_CompletionHandlerRequest" target="CompleteMsoProcessRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:out source="CMSO_ResponseCode" target="UPDVfModVol_CMSO_ResponseCode"/>
+ <camunda:out source="CMSO_ErrorResponse" target="UPDVfModVol_CMSO_ErrorResponse"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_completionHandler" targetRef="ScriptTask_postProcessTemp"/>
+ <bpmn2:serviceTask id="ServiceTask_callUpdateInfraDb" name="Call Update Infra DB">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${UPDVfModVol_updateInfraRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ <camunda:entry key="content-type">aapplication/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="UPDVfModVol_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="UPDVfModVol_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ServiceTask_callUpdateInfraDb" targetRef="ScriptTask_prepCompletionHandlerRequest"/>
+ <bpmn2:scriptTask id="ScriptTask_prepVnfRest" name="Prepare VNF Adapter Rest Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepVnfAdapterRest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ScriptTask_prepVnfRest" targetRef="CallActivity_callVNFAdapterRest"/>
+ <bpmn2:scriptTask id="ScriptTask_prepCompletionHandlerRequest" name="Prep Completion Handler Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepCompletionHandlerRequest', execution, UPDVfModVol_requestId, 'UPDATE', UPDVfModVol_source, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_prepCompletionHandlerRequest" targetRef="CallActivity_completionHandler"/>
+ <bpmn2:callActivity id="CallActivity_callVNFAdapterRest" name="VNFAdapterRest" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:out source="vnfAdapterRestV1Response" target="UPDVfModVol_vnfAdapterRestResponse"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="UPDVfModVol_vnfAdapterRestRequest" target="vnfAdapterRestV1Request"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_callVNFAdapterRest" targetRef="ScriptTask_prepDbInfraRequest"/>
+ <bpmn2:scriptTask id="ScriptTask_prepDbInfraRequest" name="Prep DB Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepDbInfraDbRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_prepDbInfraRequest" targetRef="ServiceTask_callUpdateInfraDb"/>
+ <bpmn2:scriptTask id="ScriptTask_postProcessTemp" name="Set Success" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleVolumeSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ScriptTask_postProcessTemp" targetRef="EndEvent_4"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
+ <bpmn2:incoming>SequenceFlow_noVfModuleRelation</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_personaModelIdMatchYes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:subProcess id="SubProcess_errorHandler" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_catchAllErrors" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_77"/>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_catchAllErrors" targetRef="ScriptTask_preFalloutHandler"/>
+ <bpmn2:scriptTask id="ScriptTask_preFalloutHandler" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepFalloutHandler', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_preFalloutHandler" targetRef="CallActivity_falloutHandler"/>
+ <bpmn2:callActivity id="CallActivity_falloutHandler" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModVol_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="FH_ResponseCode" target="UPDVfModVol_FH_ResponseCode"/>
+ <camunda:out source="FH_ErrorResponse" target="UPDVfModVol_FH_ErrorResponse"/>
+ <camunda:out source="FalloutHandlerResponse" target="UPDVfModVol_FalloutHandlerResponse"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="CallActivity_falloutHandler" targetRef="EndEvent_3"/>
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_prepVnfRest"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_personaModelIdMatch" name="Persona Model ID match?">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_personaModelIdMatchYes</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_personaModelidMatchNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_personaModelIdMatchYes" name="Yes" sourceRef="ExclusiveGateway_personaModelIdMatch" targetRef="ExclusiveGateway_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{UPDVfModVol_modelInvariantId == UPDVfModVol_personaModelId}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_personaModelidMatchNo" name="No" sourceRef="ExclusiveGateway_personaModelIdMatch" targetRef="ScriptTask_handlePersonaModelIdMismatch"/>
+ <bpmn2:scriptTask id="ScriptTask_queryAaiForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_YesVfModuleRelation</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('queryAAIForVfModule', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_queryAaiForVfModule" targetRef="ExclusiveGateway_personaModelIdMatch"/>
+ <bpmn2:scriptTask id="ScriptTask_handlePersonaModelIdMismatch" name="Handle Persona Model ID Mismatch" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_personaModelidMatchNo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('handlePersonaModelIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="ScriptTask_handlePersonaModelIdMismatch" targetRef="EndEvent_personaModelIdMismatch"/>
+ <bpmn2:endEvent id="EndEvent_personaModelIdMismatch">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Pre-process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_sendSynchResponse"/>
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_preProcessRequest"/>
+ <bpmn2:scriptTask id="ScriptTask_sendSynchResponse" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('sendSynchResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_sendSynchResponse" targetRef="ScriptTask_queryAaiGenricVnf"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="VF-MODULE relation?" default="SequenceFlow_noVfModuleRelation">
+ <bpmn2:incoming>SequenceFlow_tenantIsMatch</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_YesVfModuleRelation</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_noVfModuleRelation</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_YesVfModuleRelation" name="Yes" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_queryAaiForVfModule">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{UPDVfModVol_relatedVfModuleLink != ''}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_noVfModuleRelation" name="No" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isTenantMatch" name="TenantId Match?" default="SequenceFlow_NoTenantMatch">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_NoTenantMatch</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_tenantIsMatch</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_NoTenantMatch" name="No" sourceRef="ExclusiveGateway_isTenantMatch" targetRef="ScriptTask_tenantIdMismatch"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_tenantIsMatch" name="Yes" sourceRef="ExclusiveGateway_isTenantMatch" targetRef="ExclusiveGateway_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{UPDVfModVol_tenantId == UPDVfModVol_volumeGroupTenantId}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_tenantIdMismatch" name="Handle TenantId Mismatch" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_NoTenantMatch</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('handleTenantIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_tenantIdMismatch" targetRef="EndEvent_2"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_76" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_queryAAI" name="Query AAI for Volume Group Info" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('queryAAIForVolumeGroup', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_queryAAI" targetRef="ExclusiveGateway_isTenantMatch"/>
+ <bpmn2:scriptTask id="ScriptTask_queryAaiGenricVnf" name="Query AAI for Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('queryAAIForGenericVnf', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_queryAaiGenricVnf" targetRef="ScriptTask_queryAAI"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_62" bpmnElement="StartEvent_1">
+ <dc:Bounds height="37.0" width="37.0" x="191.0" y="131.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="192.0" y="173.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_StartEvent_62" targetElement="_BPMNShape_ScriptTask_231">
+ <di:waypoint xsi:type="dc:Point" x="227.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="268.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="268.0" y="150.0"/>
+ <di:waypoint xsi:type="dc:Point" x="295.0" y="150.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="248.0" y="149.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_42" bpmnElement="CallActivity_callVNFAdapterRest">
+ <dc:Bounds height="80.0" width="100.0" x="591.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_230" bpmnElement="ScriptTask_postProcessTemp">
+ <dc:Bounds height="80.0" width="109.0" x="1318.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_231" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds height="78.0" width="109.0" x="295.0" y="111.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_232" bpmnElement="ScriptTask_sendSynchResponse">
+ <dc:Bounds height="76.0" width="109.0" x="454.0" y="112.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_231" targetElement="_BPMNShape_ScriptTask_232">
+ <di:waypoint xsi:type="dc:Point" x="403.0" y="150.0"/>
+ <di:waypoint xsi:type="dc:Point" x="454.0" y="150.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="418.0" y="150.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_233" bpmnElement="ScriptTask_prepDbInfraRequest">
+ <dc:Bounds height="80.0" width="109.0" x="730.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_101" bpmnElement="ServiceTask_callUpdateInfraDb">
+ <dc:Bounds height="80.0" width="109.0" x="868.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_233" targetElement="_BPMNShape_ServiceTask_101">
+ <di:waypoint xsi:type="dc:Point" x="838.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="868.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="853.0" y="491.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ServiceTask_101" targetElement="_BPMNShape_ScriptTask_234">
+ <di:waypoint xsi:type="dc:Point" x="976.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1014.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="959.0" y="497.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_prepCompletionHandlerRequest">
+ <dc:Bounds height="80.0" width="109.0" x="1014.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_43" bpmnElement="CallActivity_completionHandler">
+ <dc:Bounds height="61.0" width="109.0" x="1162.0" y="429.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_234" targetElement="_BPMNShape_CallActivity_43">
+ <di:waypoint xsi:type="dc:Point" x="1122.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1162.0" y="459.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1134.0" y="477.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_43" targetElement="_BPMNShape_ScriptTask_230">
+ <di:waypoint xsi:type="dc:Point" x="1270.0" y="459.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1318.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1216.0" y="521.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_235" bpmnElement="ScriptTask_queryAAI">
+ <dc:Bounds height="73.0" width="109.0" x="742.0" y="113.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_126" bpmnElement="ExclusiveGateway_isTenantMatch" isMarkerVisible="true">
+ <dc:Bounds height="34.0" width="34.0" x="931.0" y="132.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="102.0" x="898.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_236" bpmnElement="ScriptTask_tenantIdMismatch">
+ <dc:Bounds height="75.0" width="97.0" x="1064.0" y="112.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_235" targetElement="_BPMNShape_ExclusiveGateway_126">
+ <di:waypoint xsi:type="dc:Point" x="850.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="931.0" y="149.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="877.0" y="149.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_NoTenantMatch" sourceElement="_BPMNShape_ExclusiveGateway_126" targetElement="_BPMNShape_ScriptTask_236">
+ <di:waypoint xsi:type="dc:Point" x="965.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1064.0" y="149.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="986.0" y="149.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_2">
+ <dc:Bounds height="49.0" width="49.0" x="1225.0" y="125.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1249.0" y="179.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_236" targetElement="_BPMNShape_EndEvent_169">
+ <di:waypoint xsi:type="dc:Point" x="1160.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1225.0" y="149.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1179.0" y="149.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_tenantIsMatch" sourceElement="_BPMNShape_ExclusiveGateway_126" targetElement="_BPMNShape_ExclusiveGateway_254">
+ <di:waypoint xsi:type="dc:Point" x="948.0" y="166.0"/>
+ <di:waypoint xsi:type="dc:Point" x="948.0" y="244.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="915.0" y="173.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_42" targetElement="_BPMNShape_ScriptTask_233">
+ <di:waypoint xsi:type="dc:Point" x="691.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="730.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="712.0" y="531.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_232" targetElement="_BPMNShape_ScriptTask_318">
+ <di:waypoint xsi:type="dc:Point" x="562.0" y="150.0"/>
+ <di:waypoint xsi:type="dc:Point" x="581.0" y="150.0"/>
+ <di:waypoint xsi:type="dc:Point" x="581.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="612.0" y="149.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="578.0" y="150.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="ScriptTask_prepVnfRest">
+ <dc:Bounds height="80.0" width="109.0" x="454.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_237" targetElement="_BPMNShape_CallActivity_42">
+ <di:waypoint xsi:type="dc:Point" x="562.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="591.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="446.0" y="460.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_18" bpmnElement="SubProcess_errorHandler" isExpanded="true">
+ <dc:Bounds height="187.0" width="781.0" x="250.0" y="786.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="StartEvent_catchAllErrors">
+ <dc:Bounds height="37.0" width="37.0" x="301.0" y="844.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="98.0" x="270.0" y="886.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_238" bpmnElement="ScriptTask_preFalloutHandler">
+ <dc:Bounds height="61.0" width="109.0" x="445.0" y="832.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_44" bpmnElement="CallActivity_falloutHandler">
+ <dc:Bounds height="61.0" width="109.0" x="639.0" y="832.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_238" targetElement="_BPMNShape_CallActivity_44">
+ <di:waypoint xsi:type="dc:Point" x="553.0" y="862.0"/>
+ <di:waypoint xsi:type="dc:Point" x="639.0" y="862.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="573.0" y="946.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_170" bpmnElement="EndEvent_3">
+ <dc:Bounds height="37.0" width="37.0" x="862.0" y="844.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="880.0" y="886.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_CallActivity_44" targetElement="_BPMNShape_EndEvent_170">
+ <di:waypoint xsi:type="dc:Point" x="747.0" y="862.0"/>
+ <di:waypoint xsi:type="dc:Point" x="862.0" y="862.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="765.0" y="1030.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_171" bpmnElement="EndEvent_4">
+ <dc:Bounds height="43.0" width="43.0" x="1461.0" y="438.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="1457.0" y="486.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ScriptTask_230" targetElement="_BPMNShape_EndEvent_171">
+ <di:waypoint xsi:type="dc:Point" x="1426.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1461.0" y="459.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1442.0" y="467.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_238">
+ <di:waypoint xsi:type="dc:Point" x="337.0" y="862.0"/>
+ <di:waypoint xsi:type="dc:Point" x="445.0" y="862.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="385.0" y="1030.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="34.0" width="34.0" x="931.0" y="244.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="135.0" x="881.0" y="283.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_YesVfModuleRelation" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ScriptTask_313">
+ <di:waypoint xsi:type="dc:Point" x="931.0" y="261.0"/>
+ <di:waypoint xsi:type="dc:Point" x="634.0" y="261.0"/>
+ <di:waypoint xsi:type="dc:Point" x="634.0" y="262.0"/>
+ <di:waypoint xsi:type="dc:Point" x="405.0" y="262.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="729.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="ScriptTask_queryAaiForVfModule">
+ <dc:Bounds height="80.0" width="109.0" x="297.0" y="222.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_personaModelIdMatch" isMarkerVisible="true">
+ <dc:Bounds height="34.0" width="34.0" x="333.0" y="346.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="156.0" x="272.0" y="385.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_313" targetElement="_BPMNShape_ExclusiveGateway_255">
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="302.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="329.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="346.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="347.0" y="318.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_personaModelIdMatchYes" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ExclusiveGateway_256">
+ <di:waypoint xsi:type="dc:Point" x="367.0" y="363.0"/>
+ <di:waypoint xsi:type="dc:Point" x="491.0" y="363.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="398.0" y="363.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="34.0" width="34.0" x="491.0" y="346.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="508.0" y="385.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_noVfModuleRelation" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ExclusiveGateway_256">
+ <di:waypoint xsi:type="dc:Point" x="948.0" y="278.0"/>
+ <di:waypoint xsi:type="dc:Point" x="948.0" y="363.0"/>
+ <di:waypoint xsi:type="dc:Point" x="701.0" y="363.0"/>
+ <di:waypoint xsi:type="dc:Point" x="525.0" y="363.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="795.0" y="363.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_personaModelidMatchNo" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_315">
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="380.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="351.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="350.0" y="409.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="ScriptTask_handlePersonaModelIdMismatch">
+ <dc:Bounds height="80.0" width="109.0" x="297.0" y="460.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_172" bpmnElement="EndEvent_personaModelIdMismatch">
+ <dc:Bounds height="43.0" width="43.0" x="330.0" y="600.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="351.0" y="648.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_315" targetElement="_BPMNShape_EndEvent_172">
+ <di:waypoint xsi:type="dc:Point" x="351.0" y="540.0"/>
+ <di:waypoint xsi:type="dc:Point" x="351.0" y="600.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="348.0" y="560.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_ScriptTask_237">
+ <di:waypoint xsi:type="dc:Point" x="508.0" y="380.0"/>
+ <di:waypoint xsi:type="dc:Point" x="508.0" y="420.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="ScriptTask_queryAaiGenricVnf">
+ <dc:Bounds height="75.0" width="97.0" x="612.0" y="112.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_318" targetElement="_BPMNShape_ScriptTask_235">
+ <di:waypoint xsi:type="dc:Point" x="708.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="742.0" y="149.0"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties b/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties
new file mode 100644
index 0000000..d071fda
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties
@@ -0,0 +1,20 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP MSO
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+processEngineName=infrastructure
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
new file mode 100644
index 0000000..59f8201
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
@@ -0,0 +1,1385 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateNetworkInstance" name="DoCreateNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1n61wit</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="aai_Error_EndEvent" name="AAI Name Error">
+ <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:inclusiveGateway id="InclusiveGateway">
+ <bpmn2:incoming>isNetworkActiveNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" sourceRef="InclusiveGateway" targetRef="callRESTQueryCloudRegion_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:incoming>isNameSentNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="isSdncRpc1_ExclusiveGateway1" />
+ <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare Assign SDNC Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc1No_SequenceFlow1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity" />
+ <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Assign Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0d93bqw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.validateSDNCResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>sdncTopoNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncTopoYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent" />
+ <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTQueryNetworkId_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask">
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent" />
+ <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">
+ <bpmn2:incoming>sdncTopoNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask" />
+ <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign Adapter V1 " calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENWKI_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKI_assignSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_sdncReturnCode" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:scriptTask id="validateCreatePONetwork_ScriptTask" name="Validate Create PO Network" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.validateCreateNetworkResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="isNetworkActive_ExclusiveGateway" name="Is Network Active?" default="isNetworkActiveNo_SequenceFlow">
+ <bpmn2:incoming>isAAIQueryNameYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isNetworkActiveYes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isNetworkActiveNo_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isNetworkActiveYes_SequenceFlow" name="Yes" sourceRef="isNetworkActive_ExclusiveGateway" targetRef="ScriptTask_0p3v749">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isNetworkActiveNo_SequenceFlow" name="No" sourceRef="isNetworkActive_ExclusiveGateway" targetRef="InclusiveGateway" />
+ <bpmn2:exclusiveGateway id="isAAIQueryNameOk_ExclusiveGateway" name="Is Query Name&#10; Ok?&#10;" default="isAAIQueryNameNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>isAAIQueryNameNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isAAIQueryNameYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isAAIQueryNameNo_SequenceFlow" name="No" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="isReturnCode404_ExclusiveGateway" />
+ <bpmn2:sequenceFlow id="isAAIQueryNameYes_SequenceFlow" name="Yes" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="isNetworkActive_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isAAIqueryNameGood") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Code 404?" default="isReturnCode404_No_SequenceFlow">
+ <bpmn2:incoming>isAAIQueryNameNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="No" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="aai_Error_EndEvent" />
+ <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="InclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_aaiNameReturnCode" ) == "404"}
+
+]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Prepare Rollback Data" triggeredByEvent="true">
+ <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="ScriptTask_0j3058g" />
+ <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="isPONR?" default="isPONR_No_SequenceFlow">
+ <bpmn2:incoming>isRollbackOn_SequenceFlow_Yes</bpmn2:incoming>
+ <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="ExclusiveGateway_1umhuft">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isPONR") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isSDNCActivate_ExclusiveGateway" />
+ <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is SDNC Topo Ok?" default="sdncOk_No_ExclusiveGateway">
+ <bpmn2:incoming>SequenceFlow_0k7y7b5</bpmn2:incoming>
+ <bpmn2:outgoing>sdncOk_Yeso_ExclusiveGateway</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="isSdncRpc4_ExclusiveGateway4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="ExclusiveGateway_1qb2vwe" />
+ <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc4No_SequenceFlow4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0lndbvr</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="isSDNCActivate_ExclusiveGateway" name="is SDNC Activate Ok?" default="SequenceFlow_12tlymf">
+ <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cly7z2</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_12tlymf</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0cly7z2" name="Yes" sourceRef="isSDNCActivate_ExclusiveGateway" targetRef="Task_1imzwi3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isSdncActivateRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_12tlymf" name="No" sourceRef="isSDNCActivate_ExclusiveGateway" targetRef="ExclusiveGateway_1bk0tqd" />
+ <bpmn2:exclusiveGateway id="isSdncRpc4_ExclusiveGateway4" name="is &#39;1702&#39; SNDC Call?" default="isSdncRpc4No_SequenceFlow4">
+ <bpmn2:incoming>sdncOk_Yeso_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:outgoing>isSdncRpc4Yes_SequenceFlow4</bpmn2:outgoing>
+ <bpmn2:outgoing>isSdncRpc4No_SequenceFlow4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isSdncRpc4Yes_SequenceFlow4" name="Yes" sourceRef="isSdncRpc4_ExclusiveGateway4" targetRef="Task_0q6pzpn">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isSdncRpc4No_SequenceFlow4" name="No" sourceRef="isSdncRpc4_ExclusiveGateway4" targetRef="prepareSDNCRollbackRequest_ScriptTask" />
+ <bpmn2:scriptTask id="Task_0q6pzpn" name="Prepare RSRC SDNCRollback Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc4Yes_SequenceFlow4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bwpkkb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRpcSDNCRollbackRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1kpt4kc">
+ <bpmn2:incoming>SequenceFlow_1qwubew</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0myjg9k" name="Prepare RollbackData" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15sffxc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_096tad6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRollbackData(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0b8j5rw" sourceRef="Task_1imzwi3" targetRef="ExclusiveGateway_1bk0tqd" />
+ <bpmn2:scriptTask id="Task_1imzwi3" name="Prepare RSRC SDNC Activate Rollback Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cly7z2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0b8j5rw</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRpcSDNCActivateRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1u07hp7" name="DoCreate&#10;NetworkInstanceRollback&#10;" calledElement="DoCreateNetworkInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="wasDeleted" target="wasDeleted" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="workflowException" target="workflowException" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="SavedWorkflowException1" target="SavedWorkflowException1" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_096tad6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vzsyrd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0vzsyrd" sourceRef="CallActivity_1u07hp7" targetRef="ScriptTask_0w2ekuz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0bwpkkb" sourceRef="Task_0q6pzpn" targetRef="ExclusiveGateway_1qb2vwe" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0lndbvr" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="ExclusiveGateway_1qb2vwe" />
+ <bpmn2:sequenceFlow id="SequenceFlow_096tad6" sourceRef="ScriptTask_0myjg9k" targetRef="CallActivity_1u07hp7" />
+ <bpmn2:scriptTask id="ScriptTask_0w2ekuz" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0vzsyrd</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17nx822</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qwubew</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qwubew" sourceRef="ScriptTask_0w2ekuz" targetRef="EndEvent_1kpt4kc" />
+ <bpmn2:exclusiveGateway id="isRollbackOn_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_SequenceFlow_No">
+ <bpmn2:incoming>SequenceFlow_10ttvwn</bpmn2:incoming>
+ <bpmn2:outgoing>isRollbackOn_SequenceFlow_Yes</bpmn2:outgoing>
+ <bpmn2:outgoing>isRollbackOn_SequenceFlow_No</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isRollbackOn_SequenceFlow_Yes" name="Yes" sourceRef="isRollbackOn_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_rollbackEnabled") == true && execution.getVariable("CRENWKI_isSdncRollbackNeeded") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isRollbackOn_SequenceFlow_No" name="No" sourceRef="isRollbackOn_ExclusiveGateway" targetRef="ExclusiveGateway_1umhuft" />
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_1qb2vwe">
+ <bpmn2:incoming>SequenceFlow_0lndbvr</bpmn2:incoming>
+ <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0bwpkkb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15sffxc</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_15sffxc" sourceRef="ExclusiveGateway_1qb2vwe" targetRef="ScriptTask_0myjg9k" />
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_1bk0tqd">
+ <bpmn2:incoming>SequenceFlow_0b8j5rw</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_12tlymf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k7y7b5</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k7y7b5" sourceRef="ExclusiveGateway_1bk0tqd" targetRef="sdncOk_ExclusiveGateway" />
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_1umhuft">
+ <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isRollbackOn_SequenceFlow_No</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17nx822</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_17nx822" sourceRef="ExclusiveGateway_1umhuft" targetRef="ScriptTask_0w2ekuz" />
+ <bpmn2:scriptTask id="ScriptTask_0j3058g" name="Set Exception Flag" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10ttvwn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.setExceptionFlag(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10ttvwn" sourceRef="ScriptTask_0j3058g" targetRef="isRollbackOn_ExclusiveGateway" />
+ <bpmn2:textAnnotation id="TextAnnotation_1py1p84"> <bpmn2:text><![CDATA[  
+Include ONLY inputs/varrables:  
+rollbackData, as Map
+-rollbackSDNCRequest
+-rollbackActivateSDNCRequest
+-rollbackNetworkRequest
+WorkflowException
+ ]]></bpmn2:text>
+</bpmn2:textAnnotation>
+ <bpmn2:association id="Association_0nketgd" sourceRef="CallActivity_1u07hp7" targetRef="TextAnnotation_1py1p84" />
+ <bpmn2:textAnnotation id="TextAnnotation_0wjpv6r"> <bpmn2:text>PO Network Rollback is created in validation.</bpmn2:text>
+</bpmn2:textAnnotation>
+ <bpmn2:association id="Association_0eolbkz" sourceRef="ExclusiveGateway_1bk0tqd" targetRef="TextAnnotation_0wjpv6r" />
+ </bpmn2:subProcess>
+ <bpmn2:serviceTask id="callCreateNetwork_ServiceTask" name="Call Create Network">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="payload">${CRENWKI_createNetworkRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>
+ <camunda:entry key="content-type">application/xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CRENWKI_networkReturnCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CRENWKI_createNetworkResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="callCreateNetwork_ServiceTask" targetRef="validateCreatePONetwork_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateCreatePONetwork_ScriptTask" targetRef="isSdncRpc2_ExclusiveGateway2" />
+ <bpmn2:scriptTask id="callRESTReQueryNetworkID_ScriptTask" name="Call REST ReQuery Network Id in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc2No_SequenceFlow2</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1jia57e</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQueryNetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ipz2ze</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="callGetServiceInstance" name="Get&#10;Service&#10;Instance" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENWKI_serviceInstanceId" target="GENGS_serviceInstanceId" />
+ <camunda:out source="GENGS_serviceInstance" target="CRENWKI_serviceInstance" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator" />
+ <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator" />
+ <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="GENGS_type" target="GENGS_type" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ftylq3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query Network Name In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>isNameSentYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkName(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="isAAIQueryNameOk_ExclusiveGateway" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck" />
+ <bpmn2:exclusiveGateway id="siFoundCheck" name="Service Instance Found?" default="siFoundNo">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>siFoundYes</bpmn2:outgoing>
+ <bpmn2:outgoing>siFoundNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="isNameSent_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound" />
+ <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>siFoundNo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.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 org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask" />
+ <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareCreateNetworkRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callCreateNetwork_ServiceTask" />
+ <bpmn2:scriptTask id="callRESTQueryNetworkTableRef_ScriptTask" name="Call REST Query Network TableRef in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1n61wit" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_preprocess" />
+ <bpmn2:scriptTask id="ScriptTask_preprocess" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1n61wit</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ftylq3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ftylq3" sourceRef="ScriptTask_preprocess" targetRef="callGetServiceInstance" />
+ <bpmn2:exclusiveGateway id="isNameSent_ExclusiveGateway" name="is Network Name &#10;Sent?&#10;" default="isNameSentNo_SequenceFlow">
+ <bpmn2:incoming>siFoundYes</bpmn2:incoming>
+ <bpmn2:outgoing>isNameSentYes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isNameSentNo_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isNameSentYes_SequenceFlow" name="Yes" sourceRef="isNameSent_ExclusiveGateway" targetRef="callAAIQuery_scriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_networkName") != ""}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isNameSentNo_SequenceFlow" name="No" sourceRef="isNameSent_ExclusiveGateway" targetRef="callRESTQueryCloudRegion_ScriptTask" />
+ <bpmn2:callActivity id="Task_1ipbwbj" name="Call SDNC RSRC Activate&#10; Adapter V1&#10;" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENWKI_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKI_activateSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_sdncActivateReturnCode" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13deudk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08qibb9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="Task_1rd6dg6" name="Prepare SDNC RSRC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc2Yes_SequenceFlow2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13deudk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRpcSDNCActivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0n0ptg6" name="is SDNC PRC&#10;Activate Ok?&#10;" default="SequenceFlow_18ybfu5">
+ <bpmn2:incoming>SequenceFlow_1t03rs2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jia57e</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_18ybfu5</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13deudk" sourceRef="Task_1rd6dg6" targetRef="Task_1ipbwbj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_08qibb9" sourceRef="Task_1ipbwbj" targetRef="validateSDNCActivate_Task" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1t03rs2" sourceRef="validateSDNCActivate_Task" targetRef="ExclusiveGateway_0n0ptg6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1jia57e" name="Yes" sourceRef="ExclusiveGateway_0n0ptg6" targetRef="callRESTReQueryNetworkID_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_18ybfu5" name="No" sourceRef="ExclusiveGateway_0n0ptg6" targetRef="EndEvent_13v46cq" />
+ <bpmn2:scriptTask id="validateSDNCActivate_Task" name="Validate SDNCRSRC Activate&#10;Response&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_08qibb9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1t03rs2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.validateRpcSDNCActivateResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:boundaryEvent id="BoundaryEvent_0vb26bm" attachedToRef="validateSDNCActivate_Task">
+ <bpmn2:outgoing>SequenceFlow_0s51ns0</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0s51ns0" sourceRef="BoundaryEvent_0vb26bm" targetRef="EndEvent_13v46cq" />
+ <bpmn2:endEvent id="EndEvent_13v46cq" name="SNDC Activate &#10;Error&#10;">
+ <bpmn2:incoming>SequenceFlow_18ybfu5</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0s51ns0</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="isSdncRpc1_ExclusiveGateway1" name="is &#39;1702&#39; SNDC Call?" default="isSdncRpc1No_SequenceFlow1">
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>isSdncRpc1No_SequenceFlow1</bpmn2:outgoing>
+ <bpmn2:outgoing>isSdncRpc1Yes_SequenceFlow1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isSdncRpc1No_SequenceFlow1" name="No" sourceRef="isSdncRpc1_ExclusiveGateway1" targetRef="prepareSDNCTopoRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="isSdncRpc1Yes_SequenceFlow1" name="Yes" sourceRef="isSdncRpc1_ExclusiveGateway1" targetRef="Task_10lubzj">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_0pbtywn" name="Call SDNC RSRC Assign Adapter V1 " calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENWKI_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKI_assignSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_sdncReturnCode" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0j8bxnb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0d93bqw</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0j8bxnb" sourceRef="Task_10lubzj" targetRef="Task_0pbtywn" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0d93bqw" sourceRef="Task_0pbtywn" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:exclusiveGateway id="isSdncRpc2_ExclusiveGateway2" name="is &#39;1702&#39; SNDC Call?" default="isSdncRpc2No_SequenceFlow2">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>isSdncRpc2Yes_SequenceFlow2</bpmn2:outgoing>
+ <bpmn2:outgoing>isSdncRpc2No_SequenceFlow2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isSdncRpc2Yes_SequenceFlow2" name="Yes" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="Task_1rd6dg6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isSdncRpc2No_SequenceFlow2" name="No" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="callRESTReQueryNetworkID_ScriptTask" />
+ <bpmn2:scriptTask id="Task_10lubzj" name="Prepare Assign SDNC RPC Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc1Yes_SequenceFlow1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0j8bxnb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRpcSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1te02c4">
+ <bpmn2:incoming>SequenceFlow_1s8b1m1</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_0ti2ctu" name="Silent Success">
+ <bpmn2:incoming>SequenceFlow_18ylufb</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s8b1m1" sourceRef="Task_0zzobg6" targetRef="EndEvent_1te02c4" />
+ <bpmn2:scriptTask id="Task_0zzobg6" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ipz2ze</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s8b1m1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ipz2ze" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="Task_0zzobg6" />
+ <bpmn2:scriptTask id="ScriptTask_0p3v749" name="Post Process Response" scriptFormat="groovy">
+ <bpmn2:incoming>isNetworkActiveYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18ylufb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18ylufb" sourceRef="ScriptTask_0p3v749" targetRef="EndEvent_0ti2ctu" />
+ <bpmn2:textAnnotation id="TextAnnotation_1orb6o6"> <bpmn2:text><![CDATA[if '200', Prepare PO Network Rollback]]></bpmn2:text>
+</bpmn2:textAnnotation>
+ <bpmn2:association id="Association_0c315jr" sourceRef="validateCreatePONetwork_ScriptTask" targetRef="TextAnnotation_1orb6o6" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
+ <dc:Bounds x="397" y="177" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="390" y="218" width="49" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
+ <dc:Bounds x="926" y="-31" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_62" bpmnElement="isAAIQueryNameOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1098" y="-16" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1085" y="-56" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_62">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="8" />
+ <di:waypoint xsi:type="dc:Point" x="1098" y="9" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1062" y="-6.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateCreatePONetwork_ScriptTask">
+ <dc:Bounds x="1457" y="1258" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="isAAIQueryNameNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_64">
+ <di:waypoint xsi:type="dc:Point" x="1123" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="1123" y="91" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1131" y="39.0514827586207" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="isAAIQueryNameYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_73">
+ <di:waypoint xsi:type="dc:Point" x="1148" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1224" y="9" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1151" y="14.164179104477611" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1098" y="91" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1026" y="110" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_EndEvent_118">
+ <di:waypoint xsi:type="dc:Point" x="1123" y="141" />
+ <di:waypoint xsi:type="dc:Point" x="1123" y="187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1132" y="138.4109225063519" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_InclusiveGateway_4">
+ <di:waypoint xsi:type="dc:Point" x="1148" y="116" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="116" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="116" />
+ <di:waypoint xsi:type="dc:Point" x="1224" y="116" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1151" y="118.55844155844156" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">
+ <dc:Bounds x="1105" y="187" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1085" y="228" width="77" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callCreateNetwork_ServiceTask">
+ <dc:Bounds x="1454" y="1135" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
+ <dc:Bounds x="1590" y="155" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds x="25" y="610" width="1266" height="686" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds x="101" y="1168" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="95" y="1209" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1615" y="520" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1606" y="580" width="67" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1665" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1739" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1670" y="545.8651480742376" width="14" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="1615" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1554" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1587" y="549.9992641545633" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
+ <dc:Bounds x="1739" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1727" y="576" width="59" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">
+ <dc:Bounds x="1590" y="276" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19">
+ <di:waypoint xsi:type="dc:Point" x="1640" y="235" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="276" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1655" y="255.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">
+ <di:waypoint xsi:type="dc:Point" x="1640" y="356" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="395" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1655" y="375.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50">
+ <di:waypoint xsi:type="dc:Point" x="137" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="164" y="1186" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="1171" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
+ <dc:Bounds x="1590" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">
+ <di:waypoint xsi:type="dc:Point" x="1640" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="498" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="498" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="520" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1655" y="498" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_73" bpmnElement="isNetworkActive_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1224" y="-16" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1221" y="-57" width="56" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="isNetworkActiveYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73">
+ <di:waypoint xsi:type="dc:Point" x="1274" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1335" y="9" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1275" y="14.380425096632202" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_44" bpmnElement="isNetworkActiveNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73" targetElement="_BPMNShape_InclusiveGateway_4">
+ <di:waypoint xsi:type="dc:Point" x="1249" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="1249" y="91" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1258" y="37.520779498373976" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_45" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_InclusiveGateway_4" targetElement="_BPMNShape_ScriptTask_245">
+ <di:waypoint xsi:type="dc:Point" x="1249" y="141" />
+ <di:waypoint xsi:type="dc:Point" x="1249" y="276" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1264" y="208.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_4" bpmnElement="InclusiveGateway">
+ <dc:Bounds x="1224" y="91" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1306" y="86" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">
+ <dc:Bounds x="1454" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQueryNetworkID_ScriptTask">
+ <dc:Bounds x="909" y="1392" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">
+ <dc:Bounds x="735" y="1392" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135">
+ <di:waypoint xsi:type="dc:Point" x="909" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="835" y="1432" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="872" y="1417" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">
+ <dc:Bounds x="1454" y="627" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="727" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="727" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="750" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="727" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_49" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_156">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="627" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="606" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63">
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1215" />
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1237" />
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1237" />
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1520" y="1237" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">
+ <dc:Bounds x="1454" y="1009" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1089" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1111" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1111" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1135" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="1111" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">
+ <dc:Bounds x="1454" y="750" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_333">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="830" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="854.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="298" y="1062" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="242" y="1080" width="46" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215">
+ <di:waypoint xsi:type="dc:Point" x="348" y="1087" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="1087" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="1161" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="1090" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215">
+ <di:waypoint xsi:type="dc:Point" x="323" y="1062" />
+ <di:waypoint xsi:type="dc:Point" x="323" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="1053" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="521" y="847" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="579" y="860" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261">
+ <di:waypoint xsi:type="dc:Point" x="546" y="847" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="778" />
+ <di:waypoint xsi:type="dc:Point" x="707" y="778" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="553" y="831" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217">
+ <di:waypoint xsi:type="dc:Point" x="545" y="896" />
+ <di:waypoint xsi:type="dc:Point" x="545" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="707" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="553" y="897" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
+ <dc:Bounds x="1199" y="276" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67">
+ <di:waypoint xsi:type="dc:Point" x="1299" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="1337" y="316" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1318" y="301" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">
+ <dc:Bounds x="1672" y="457" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1690" y="493" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1702" y="488" />
+ <di:waypoint xsi:type="dc:Point" x="1745" y="533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1724" y="495.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">
+ <dc:Bounds x="880" y="832" width="100" height="79" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134">
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1338" />
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1373" />
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1373" />
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1522" y="1373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="21" y="381" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="54" y="458" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="499" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="169" y="436" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="330" y="458" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="348" y="499" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
+ <di:waypoint xsi:type="dc:Point" x="90" y="476" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="476" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="476" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
+ <di:waypoint xsi:type="dc:Point" x="269" y="476" />
+ <di:waypoint xsi:type="dc:Point" x="330" y="476" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="301" y="476" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
+ <dc:Bounds x="759" y="155" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
+ <dc:Bounds x="784" y="291" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="696" y="304" width="80" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244">
+ <di:waypoint xsi:type="dc:Point" x="809" y="235" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="291" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="824" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_62">
+ <di:waypoint xsi:type="dc:Point" x="834" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="951" y="316" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="851" y="319" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2">
+ <dc:Bounds x="791" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
+ <dc:Bounds x="759" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331">
+ <di:waypoint xsi:type="dc:Point" x="809" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="395" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="823" y="340.55618916742606" width="14" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">
+ <di:waypoint xsi:type="dc:Point" x="809" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="527" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="824" y="501" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_333" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
+ <dc:Bounds x="1454" y="879" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_333" targetElement="_BPMNShape_ScriptTask_157">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="959" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="981" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="981" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1009" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="981" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n61wit_di" bpmnElement="SequenceFlow_1n61wit">
+ <di:waypoint xsi:type="dc:Point" x="433" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="195" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="507" y="195" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1jay2gg_di" bpmnElement="ScriptTask_preprocess">
+ <dc:Bounds x="546" y="155" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ftylq3_di" bpmnElement="SequenceFlow_0ftylq3">
+ <di:waypoint xsi:type="dc:Point" x="646" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="706" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="706" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="759" y="195" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="721" y="195" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0lw40k5_di" bpmnElement="isNameSent_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="951" y="291" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="933" y="349" width="85" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0635hhm_di" bpmnElement="isNameSentYes_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="976" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="170" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="170" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="49" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="988" y="275" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sirjgc_di" bpmnElement="isNameSentNo_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1001" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="1199" y="316" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1005" y="328" width="14" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1uxa4p9_di" bpmnElement="Task_1ipbwbj">
+ <dc:Bounds x="1267" y="1538" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0m5hrmn_di" bpmnElement="Task_1rd6dg6">
+ <dc:Bounds x="1457" y="1538" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0n0ptg6_di" bpmnElement="ExclusiveGateway_0n0ptg6" isMarkerVisible="true">
+ <dc:Bounds x="934" y="1553" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="857" y="1566" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13deudk_di" bpmnElement="SequenceFlow_13deudk">
+ <di:waypoint xsi:type="dc:Point" x="1457" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1367" y="1578" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1412" y="1563" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_08qibb9_di" bpmnElement="SequenceFlow_08qibb9">
+ <di:waypoint xsi:type="dc:Point" x="1267" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1229" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1229" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1191" y="1578" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1244" y="1578" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t03rs2_di" bpmnElement="SequenceFlow_1t03rs2">
+ <di:waypoint xsi:type="dc:Point" x="1091" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1038" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1038" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="984" y="1578" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1053" y="1578" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jia57e_di" bpmnElement="SequenceFlow_1jia57e">
+ <di:waypoint xsi:type="dc:Point" x="959" y="1553" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="1472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="972" y="1542.77440535676" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18ybfu5_di" bpmnElement="SequenceFlow_18ybfu5">
+ <di:waypoint xsi:type="dc:Point" x="959" y="1603" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="1662" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="968" y="1601.171717171717" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1v458g5_di" bpmnElement="validateSDNCActivate_Task">
+ <dc:Bounds x="1091" y="1538" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_0pg57au_di" bpmnElement="BoundaryEvent_0vb26bm">
+ <dc:Bounds x="1097" y="1600" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1115" y="1636" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0s51ns0_di" bpmnElement="SequenceFlow_0s51ns0">
+ <di:waypoint xsi:type="dc:Point" x="1115" y="1636" />
+ <di:waypoint xsi:type="dc:Point" x="1115" y="1680" />
+ <di:waypoint xsi:type="dc:Point" x="977" y="1680" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1130" y="1658" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0h7h49p_di" bpmnElement="EndEvent_13v46cq">
+ <dc:Bounds x="941" y="1662" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="921" y="1708" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0f9d94i_di" bpmnElement="isSDNCActivate_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="298" y="955" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="968" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cly7z2_di" bpmnElement="SequenceFlow_0cly7z2">
+ <di:waypoint xsi:type="dc:Point" x="323" y="955" />
+ <di:waypoint xsi:type="dc:Point" x="323" y="912" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="329" y="939" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12tlymf_di" bpmnElement="SequenceFlow_12tlymf">
+ <di:waypoint xsi:type="dc:Point" x="348" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="897" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="990" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ts3ph0_di" bpmnElement="isSdncRpc1_ExclusiveGateway1" isMarkerVisible="true">
+ <dc:Bounds x="1337.228" y="291" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1394" y="304" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1r5sja0_di" bpmnElement="isSdncRpc1No_SequenceFlow1">
+ <di:waypoint xsi:type="dc:Point" x="1362" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="1362" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="1590" y="195" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1371" y="273" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ow57qy_di" bpmnElement="isSdncRpc1Yes_SequenceFlow1">
+ <di:waypoint xsi:type="dc:Point" x="1362" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="1362" y="395" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1373" y="341" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_067czgj_di" bpmnElement="Task_0pbtywn">
+ <dc:Bounds x="1454" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j8bxnb_di" bpmnElement="SequenceFlow_0j8bxnb">
+ <di:waypoint xsi:type="dc:Point" x="1412" y="435" />
+ <di:waypoint xsi:type="dc:Point" x="1454" y="435" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1433" y="420" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0d93bqw_di" bpmnElement="SequenceFlow_0d93bqw">
+ <di:waypoint xsi:type="dc:Point" x="1554" y="435" />
+ <di:waypoint xsi:type="dc:Point" x="1590" y="435" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1572" y="420" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_00dh41t_di" bpmnElement="isSdncRpc4_ExclusiveGateway4" isMarkerVisible="true">
+ <dc:Bounds x="707" y="753" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="712" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0suu90e_di" bpmnElement="isSdncRpc4Yes_SequenceFlow4">
+ <di:waypoint xsi:type="dc:Point" x="732" y="803" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="832" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="802" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xnyl6e_di" bpmnElement="isSdncRpc4No_SequenceFlow4">
+ <di:waypoint xsi:type="dc:Point" x="757" y="778" />
+ <di:waypoint xsi:type="dc:Point" x="930" y="778" />
+ <di:waypoint xsi:type="dc:Point" x="930" y="832" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="766" y="757" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gghe34_di" bpmnElement="isSdncRpc2_ExclusiveGateway2" isMarkerVisible="true">
+ <dc:Bounds x="1482" y="1407" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1540" y="1420" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lphs99_di" bpmnElement="isSdncRpc2Yes_SequenceFlow2">
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1457" />
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1498" />
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1498" />
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1538" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1511" y="1459.0987654320988" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lk1uut_di" bpmnElement="isSdncRpc2No_SequenceFlow2">
+ <di:waypoint xsi:type="dc:Point" x="1482" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="1009" y="1432" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1460" y="1410" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1lkq0a3_di" bpmnElement="Task_10lubzj">
+ <dc:Bounds x="1312" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_19o9l99_di" bpmnElement="Task_0q6pzpn">
+ <dc:Bounds x="682" y="832" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1te02c4_di" bpmnElement="EndEvent_1te02c4">
+ <dc:Bounds x="459" y="1414" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="478" y="1450" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1kpt4kc_di" bpmnElement="EndEvent_1kpt4kc">
+ <dc:Bounds x="1154" y="1077" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1173" y="1113" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ti2ctu_di" bpmnElement="EndEvent_0ti2ctu">
+ <dc:Bounds x="1486" y="-9" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1468" y="38" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s8b1m1_di" bpmnElement="SequenceFlow_1s8b1m1">
+ <di:waypoint xsi:type="dc:Point" x="576" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="525" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="525" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="495" y="1432" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="540" y="1432" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1feo4ms_di" bpmnElement="Task_0zzobg6">
+ <dc:Bounds x="576" y="1392" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0myjg9k_di" bpmnElement="ScriptTask_0myjg9k">
+ <dc:Bounds x="682" y="1055" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b8j5rw_di" bpmnElement="SequenceFlow_0b8j5rw">
+ <di:waypoint xsi:type="dc:Point" x="373" y="872" />
+ <di:waypoint xsi:type="dc:Point" x="426" y="872" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="400" y="857" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_17adm0m_di" bpmnElement="Task_1imzwi3">
+ <dc:Bounds x="273" y="832" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ipz2ze_di" bpmnElement="SequenceFlow_1ipz2ze">
+ <di:waypoint xsi:type="dc:Point" x="735" y="1432" />
+ <di:waypoint xsi:type="dc:Point" x="676" y="1432" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="706" y="1417" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1u07hp7_di" bpmnElement="CallActivity_1u07hp7">
+ <dc:Bounds x="835" y="1055" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vzsyrd_di" bpmnElement="SequenceFlow_0vzsyrd">
+ <di:waypoint xsi:type="dc:Point" x="935" y="1095" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="1095" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="968" y="1080" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bwpkkb_di" bpmnElement="SequenceFlow_0bwpkkb">
+ <di:waypoint xsi:type="dc:Point" x="732" y="912" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="955" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="747" y="924" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lndbvr_di" bpmnElement="SequenceFlow_0lndbvr">
+ <di:waypoint xsi:type="dc:Point" x="930" y="911" />
+ <di:waypoint xsi:type="dc:Point" x="930" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="757" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="946" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_096tad6_di" bpmnElement="SequenceFlow_096tad6">
+ <di:waypoint xsi:type="dc:Point" x="782" y="1095" />
+ <di:waypoint xsi:type="dc:Point" x="835" y="1095" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="1080" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="TextAnnotation_1py1p84_di" bpmnElement="TextAnnotation_1py1p84">
+ <dc:Bounds x="1030" y="903" width="252" height="119" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0nketgd_di" bpmnElement="Association_0nketgd">
+ <di:waypoint xsi:type="dc:Point" x="935" y="1071" />
+ <di:waypoint xsi:type="dc:Point" x="1035" y="1022" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0w2ekuz_di" bpmnElement="ScriptTask_0w2ekuz">
+ <dc:Bounds x="1001" y="1055" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qwubew_di" bpmnElement="SequenceFlow_1qwubew">
+ <di:waypoint xsi:type="dc:Point" x="1101" y="1095" />
+ <di:waypoint xsi:type="dc:Point" x="1154" y="1095" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1128" y="1070" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1r7vhm5_di" bpmnElement="isRollbackOn_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="298" y="1161" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="284" y="1211" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19kcbiw_di" bpmnElement="isRollbackOn_SequenceFlow_Yes">
+ <di:waypoint xsi:type="dc:Point" x="323" y="1161" />
+ <di:waypoint xsi:type="dc:Point" x="323" y="1112" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="331" y="1144" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pl3e54_di" bpmnElement="isRollbackOn_SequenceFlow_No">
+ <di:waypoint xsi:type="dc:Point" x="348" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="426" y="1186" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="349" y="1192" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0zl5xa8_di" bpmnElement="ExclusiveGateway_1qb2vwe">
+ <dc:Bounds x="707" y="955" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="732" y="1005" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15sffxc_di" bpmnElement="SequenceFlow_15sffxc">
+ <di:waypoint xsi:type="dc:Point" x="732" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="1055" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="747" y="1030" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0t3i8it_di" bpmnElement="ExclusiveGateway_1bk0tqd">
+ <dc:Bounds x="426" y="847" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="451" y="897" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k7y7b5_di" bpmnElement="SequenceFlow_0k7y7b5">
+ <di:waypoint xsi:type="dc:Point" x="476" y="872" />
+ <di:waypoint xsi:type="dc:Point" x="521" y="872" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="847" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0p3v749_di" bpmnElement="ScriptTask_0p3v749">
+ <dc:Bounds x="1335" y="-31" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18ylufb_di" bpmnElement="SequenceFlow_18ylufb">
+ <di:waypoint xsi:type="dc:Point" x="1435" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1486" y="9" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1461" y="-6" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_1eochiz_di" bpmnElement="ExclusiveGateway_1umhuft">
+ <dc:Bounds x="426" y="1161" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="451" y="1211" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_17nx822_di" bpmnElement="SequenceFlow_17nx822">
+ <di:waypoint xsi:type="dc:Point" x="476" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="1051" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="1051" y="1135" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="764" y="1171" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="TextAnnotation_1orb6o6_di" bpmnElement="TextAnnotation_1orb6o6">
+ <dc:Bounds x="1606" y="1241" width="233" height="37" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0c315jr_di" bpmnElement="Association_0c315jr">
+ <di:waypoint xsi:type="dc:Point" x="1557" y="1289" />
+ <di:waypoint xsi:type="dc:Point" x="1621" y="1278" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="TextAnnotation_0wjpv6r_di" bpmnElement="TextAnnotation_0wjpv6r">
+ <dc:Bounds x="335" y="737" width="180" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0eolbkz_di" bpmnElement="Association_0eolbkz">
+ <di:waypoint xsi:type="dc:Point" x="446" y="852" />
+ <di:waypoint xsi:type="dc:Point" x="429" y="773" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0j3058g_di" bpmnElement="ScriptTask_0j3058g">
+ <dc:Bounds x="164" y="1146" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10ttvwn_di" bpmnElement="SequenceFlow_10ttvwn">
+ <di:waypoint xsi:type="dc:Point" x="264" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="298" y="1186" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="281" y="1161" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn
new file mode 100644
index 0000000..00ef41c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn
@@ -0,0 +1,517 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
+ <bpmn:process id="DoCreateNetworkInstanceRollback" name="DoCreateNetworkInstanceRollback" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_1krl2dg</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="Task_0whino1" name="PreProcess Incoming Data" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1krl2dg</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0u41iz2</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+DoCreateNetworkInstanceRollback.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1krl2dg" sourceRef="StartEvent_1" targetRef="Task_0whino1" />
+ <bpmn:sequenceFlow id="SequenceFlow_0u41iz2" sourceRef="Task_0whino1" targetRef="ExclusiveGateway_0p5zgdb" />
+ <bpmn:callActivity id="CallActivity_1x88fsq" name="Call RSRC SDNC Deactivate Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="CRENWKIR_rollbackActivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKIR_rollbackActivateSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKIR_rollbackActivateSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1mxbdps</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07s5r14</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:callActivity id="CallActivity_0kbwa1x" name="Call Unassign RSRC SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="CRENWKIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0mw0dgd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1rrutp3</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0p5zgdb" name="is RPC Activate Rollback?" default="SequenceFlow_1bb7zpp">
+ <bpmn:incoming>SequenceFlow_0u41iz2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1bb7zpp</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1mxbdps</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0v0en47" name="is PO Network Rollback?" default="SequenceFlow_1lteduj">
+ <bpmn:incoming>SequenceFlow_1bb7zpp</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_07s5r14</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0e1uixp</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1lteduj</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:callActivity id="CallActivity_1xilevb" name="Call Rollback SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="CRENWKIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_101y57s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0790olb</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_17g4q5c" name="is RSRC SDNC?" default="SequenceFlow_101y57s">
+ <bpmn:incoming>SequenceFlow_0virkpu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_101y57s</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0mw0dgd</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_1ggaxfu" name="Validate Rollback Responses" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0qc4v9t</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0el8yzs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yto4gz</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+DoCreateNetworkInstanceRollback.validateRollbackResponses(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1n5jck8" name="is SDNC Rollback?" default="SequenceFlow_0qc4v9t">
+ <bpmn:incoming>SequenceFlow_1lteduj</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_17o4w67</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0virkpu</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0qc4v9t</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1bb7zpp" name="No" sourceRef="ExclusiveGateway_0p5zgdb" targetRef="ExclusiveGateway_0v0en47" />
+ <bpmn:sequenceFlow id="SequenceFlow_1mxbdps" name="Yes" sourceRef="ExclusiveGateway_0p5zgdb" targetRef="CallActivity_1x88fsq">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKIR_rollbackActivateSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0e1uixp" name="Yes" sourceRef="ExclusiveGateway_0v0en47" targetRef="ServiceTask_0bqh5yl">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKIR_rollbackNetworkRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_07s5r14" sourceRef="CallActivity_1x88fsq" targetRef="ExclusiveGateway_0v0en47" />
+ <bpmn:sequenceFlow id="SequenceFlow_1lteduj" name="No" sourceRef="ExclusiveGateway_0v0en47" targetRef="ExclusiveGateway_1n5jck8" />
+ <bpmn:sequenceFlow id="SequenceFlow_0virkpu" name="Yes" sourceRef="ExclusiveGateway_1n5jck8" targetRef="ExclusiveGateway_17g4q5c">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKIR_rollbackSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_17o4w67" sourceRef="ServiceTask_0bqh5yl" targetRef="ExclusiveGateway_1n5jck8" />
+ <bpmn:sequenceFlow id="SequenceFlow_101y57s" name="No" sourceRef="ExclusiveGateway_17g4q5c" targetRef="CallActivity_1xilevb" />
+ <bpmn:sequenceFlow id="SequenceFlow_0mw0dgd" name="Yes" sourceRef="ExclusiveGateway_17g4q5c" targetRef="CallActivity_0kbwa1x">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:endEvent id="EndEvent_1fvr7ad">
+ <bpmn:incoming>SequenceFlow_0yto4gz</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0qc4v9t" name="No" sourceRef="ExclusiveGateway_1n5jck8" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0790olb" sourceRef="CallActivity_1xilevb" targetRef="ExclusiveGateway_0b9kbop" />
+ <bpmn:sequenceFlow id="SequenceFlow_1rrutp3" sourceRef="CallActivity_0kbwa1x" targetRef="ExclusiveGateway_0b9kbop" />
+ <bpmn:subProcess id="SubProcess_1p4663w" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0by1uwk" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xktw7v</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0soe5t3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+DoCreateNetworkInstanceRollback.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_1j0eixl">
+ <bpmn:outgoing>SequenceFlow_0xktw7v</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_1" />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0jxh015">
+ <bpmn:incoming>SequenceFlow_0soe5t3</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0xktw7v" name="" sourceRef="StartEvent_1j0eixl" targetRef="ScriptTask_0by1uwk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0soe5t3" name="" sourceRef="ScriptTask_0by1uwk" targetRef="EndEvent_0jxh015" />
+ </bpmn:subProcess>
+ <bpmn:inclusiveGateway id="ExclusiveGateway_0b9kbop">
+ <bpmn:incoming>SequenceFlow_1rrutp3</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0790olb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0el8yzs</bpmn:outgoing>
+ </bpmn:inclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0el8yzs" sourceRef="ExclusiveGateway_0b9kbop" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0yto4gz" sourceRef="ScriptTask_1ggaxfu" targetRef="EndEvent_1fvr7ad" />
+ <bpmn:subProcess id="SubProcess_0y6ppiy" triggeredByEvent="true">
+ <bpmn:endEvent id="EndEvent_1aqh7ih">
+ <bpmn:incoming>SequenceFlow_0lomcvn</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="Task_07i164j" name="Catch Exception" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0q0te67</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0lomcvn</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+execution.setVariable("workflowException", execution.getVariable("WorkflowException")
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0q0te67" sourceRef="StartEvent_1p75ok8" targetRef="Task_07i164j" />
+ <bpmn:sequenceFlow id="SequenceFlow_0lomcvn" sourceRef="Task_07i164j" targetRef="EndEvent_1aqh7ih" />
+ <bpmn:startEvent id="StartEvent_1p75ok8">
+ <bpmn:outgoing>SequenceFlow_0q0te67</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:startEvent>
+ </bpmn:subProcess>
+ <bpmn:boundaryEvent id="BoundaryEvent_0dnnott" attachedToRef="CallActivity_1x88fsq">
+ <bpmn:outgoing>SequenceFlow_0ctlrql</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0ctlrql" sourceRef="BoundaryEvent_0dnnott" targetRef="EndEvent_0n9y395" />
+ <bpmn:endEvent id="EndEvent_0n9y395">
+ <bpmn:incoming>SequenceFlow_0ctlrql</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:endEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_1yj6513" attachedToRef="CallActivity_0kbwa1x">
+ <bpmn:outgoing>SequenceFlow_1j55a94</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_1y8kgef" attachedToRef="CallActivity_1xilevb">
+ <bpmn:outgoing>SequenceFlow_1yn24xq</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:endEvent id="EndEvent_05tcxw3">
+ <bpmn:incoming>SequenceFlow_1j55a94</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1yn24xq</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1j55a94" sourceRef="BoundaryEvent_1yj6513" targetRef="EndEvent_05tcxw3" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yn24xq" sourceRef="BoundaryEvent_1y8kgef" targetRef="EndEvent_05tcxw3" />
+ <bpmn:scriptTask id="ServiceTask_0bqh5yl" name="Call Rollback Network" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0e1uixp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_17o4w67</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+DoCreateNetworkInstanceRollback.callPONetworkAdapter(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:textAnnotation id="TextAnnotation_000ap15"> <bpmn:text><![CDATA[Include ONLY inputs/varrables:  
+rollbackData, as Map
+-rollbackSDNCRequest
+-rollbackActivateSDNCRequest
+-rollbackNetworkRequest
+WorkflowException
+ 
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_0ybkmal" sourceRef="Task_0whino1" targetRef="TextAnnotation_000ap15" />
+ <bpmn:textAnnotation id="TextAnnotation_0vwyo82"> <bpmn:text><![CDATA[set value for:
+WorkflowException
+rolledBack
+wasDeleted
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_1gx121b" sourceRef="ScriptTask_1ggaxfu" targetRef="TextAnnotation_0vwyo82" />
+ </bpmn:process>
+ <bpmn:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateNetworkInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="214" y="240" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="232" y="276" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1dqe09s_di" bpmnElement="Task_0whino1">
+ <dc:Bounds x="333" y="218" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1krl2dg_di" bpmnElement="SequenceFlow_1krl2dg">
+ <di:waypoint xsi:type="dc:Point" x="250" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="333" y="258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="292" y="243" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u41iz2_di" bpmnElement="SequenceFlow_0u41iz2">
+ <di:waypoint xsi:type="dc:Point" x="433" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="243" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1x88fsq_di" bpmnElement="CallActivity_1x88fsq">
+ <dc:Bounds x="506" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0kbwa1x_di" bpmnElement="CallActivity_0kbwa1x">
+ <dc:Bounds x="972" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0p5zgdb_di" bpmnElement="ExclusiveGateway_0p5zgdb" isMarkerVisible="true">
+ <dc:Bounds x="531" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="439" y="360" width="79" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0v0en47_di" bpmnElement="ExclusiveGateway_0v0en47" isMarkerVisible="true">
+ <dc:Bounds x="697" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="685" y="312" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_000ap15_di" bpmnElement="TextAnnotation_000ap15">
+ <dc:Bounds x="112" y="355" width="277" height="115" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0ybkmal_di" bpmnElement="Association_0ybkmal">
+ <di:waypoint xsi:type="dc:Point" x="349" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="300" y="355" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1xilevb_di" bpmnElement="CallActivity_1xilevb">
+ <dc:Bounds x="972" y="608" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_17g4q5c_di" bpmnElement="ExclusiveGateway_17g4q5c" isMarkerVisible="true">
+ <dc:Bounds x="879" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="914" y="460" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1ggaxfu_di" bpmnElement="ScriptTask_1ggaxfu">
+ <dc:Bounds x="1123" y="332" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1n5jck8_di" bpmnElement="ExclusiveGateway_1n5jck8" isMarkerVisible="true">
+ <dc:Bounds x="879" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="308" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_0vwyo82_di" bpmnElement="TextAnnotation_0vwyo82">
+ <dc:Bounds x="1287" y="410" width="165" height="60" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_1gx121b_di" bpmnElement="Association_1gx121b">
+ <di:waypoint xsi:type="dc:Point" x="1223" y="389" />
+ <di:waypoint xsi:type="dc:Point" x="1287" y="412" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bb7zpp_di" bpmnElement="SequenceFlow_1bb7zpp">
+ <di:waypoint xsi:type="dc:Point" x="581" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="697" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="582" y="349.27450980392155" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mxbdps_di" bpmnElement="SequenceFlow_1mxbdps">
+ <di:waypoint xsi:type="dc:Point" x="556" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="560" y="397.10731155015196" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e1uixp_di" bpmnElement="SequenceFlow_0e1uixp">
+ <di:waypoint xsi:type="dc:Point" x="722" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="439" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="439" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="730" y="395" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07s5r14_di" bpmnElement="SequenceFlow_07s5r14">
+ <di:waypoint xsi:type="dc:Point" x="606" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="697" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="662" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lteduj_di" bpmnElement="SequenceFlow_1lteduj">
+ <di:waypoint xsi:type="dc:Point" x="747" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="750" y="350.14631933618307" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0virkpu_di" bpmnElement="SequenceFlow_0virkpu">
+ <di:waypoint xsi:type="dc:Point" x="904" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="904" y="496" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="914" y="392.7469456247061" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17o4w67_di" bpmnElement="SequenceFlow_17o4w67">
+ <di:waypoint xsi:type="dc:Point" x="772" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="832" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_101y57s_di" bpmnElement="SequenceFlow_101y57s">
+ <di:waypoint xsi:type="dc:Point" x="904" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="904" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="972" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="913" y="544" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mw0dgd_di" bpmnElement="SequenceFlow_0mw0dgd">
+ <di:waypoint xsi:type="dc:Point" x="929" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="972" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="930" y="498" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1fvr7ad_di" bpmnElement="EndEvent_1fvr7ad">
+ <dc:Bounds x="1278" y="255" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1296" y="291" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qc4v9t_di" bpmnElement="SequenceFlow_0qc4v9t">
+ <di:waypoint xsi:type="dc:Point" x="929" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="1123" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="351.1191898360114" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0790olb_di" bpmnElement="SequenceFlow_0790olb">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1123" y="633" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rrutp3_di" bpmnElement="SequenceFlow_1rrutp3">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1148" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1110" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1p4663w_di" bpmnElement="SubProcess_1p4663w" isExpanded="true">
+ <dc:Bounds x="-6" y="665" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0by1uwk_di" bpmnElement="ScriptTask_0by1uwk">
+ <dc:Bounds x="142" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1j0eixl_di" bpmnElement="StartEvent_1j0eixl">
+ <dc:Bounds x="27" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="783" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0jxh015_di" bpmnElement="EndEvent_0jxh015">
+ <dc:Bounds x="303" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="321" y="783" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xktw7v_di" bpmnElement="SequenceFlow_0xktw7v">
+ <di:waypoint xsi:type="dc:Point" x="63" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="142" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="105" y="760" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0soe5t3_di" bpmnElement="SequenceFlow_0soe5t3">
+ <di:waypoint xsi:type="dc:Point" x="242" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="277" y="760" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0dot6c9_di" bpmnElement="ExclusiveGateway_0b9kbop">
+ <dc:Bounds x="1148" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1173" y="546" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0el8yzs_di" bpmnElement="SequenceFlow_0el8yzs">
+ <di:waypoint xsi:type="dc:Point" x="1173" y="496" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="412" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1188" y="444" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yto4gz_di" bpmnElement="SequenceFlow_0yto4gz">
+ <di:waypoint xsi:type="dc:Point" x="1173" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1278" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1188" y="302.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1laq87i_di" bpmnElement="SubProcess_0y6ppiy" isExpanded="true">
+ <dc:Bounds x="2" y="886" width="382" height="213" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1aqh7ih_di" bpmnElement="EndEvent_1aqh7ih">
+ <dc:Bounds x="305" y="964" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="1000" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0gg2fk5_di" bpmnElement="Task_07i164j">
+ <dc:Bounds x="132" y="942" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q0te67_di" bpmnElement="SequenceFlow_0q0te67">
+ <di:waypoint xsi:type="dc:Point" x="68" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="132" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="100" y="967" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lomcvn_di" bpmnElement="SequenceFlow_0lomcvn">
+ <di:waypoint xsi:type="dc:Point" x="232" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="305" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="269" y="957" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="BoundaryEvent_0i4ili6_di" bpmnElement="BoundaryEvent_0dnnott">
+ <dc:Bounds x="588" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ctlrql_di" bpmnElement="SequenceFlow_0ctlrql">
+ <di:waypoint xsi:type="dc:Point" x="612" y="577" />
+ <di:waypoint xsi:type="dc:Point" x="631" y="622" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="622" y="584.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1ra7y1s_di" bpmnElement="EndEvent_0n9y395">
+ <dc:Bounds x="621" y="620" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639" y="656" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0a7qaw9_di" bpmnElement="StartEvent_1p75ok8">
+ <dc:Bounds x="32" y="964" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="50" y="1000" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_13arr8o_di" bpmnElement="BoundaryEvent_1yj6513">
+ <dc:Bounds x="1054" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1072" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_0qs2m90_di" bpmnElement="BoundaryEvent_1y8kgef">
+ <dc:Bounds x="1054" y="590" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1072" y="626" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0tnenxe_di" bpmnElement="EndEvent_05tcxw3">
+ <dc:Bounds x="1116" y="573" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1134" y="609" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j55a94_di" bpmnElement="SequenceFlow_1j55a94">
+ <di:waypoint xsi:type="dc:Point" x="1088" y="569" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="584" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1103" y="561.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yn24xq_di" bpmnElement="SequenceFlow_1yn24xq">
+ <di:waypoint xsi:type="dc:Point" x="1088" y="599" />
+ <di:waypoint xsi:type="dc:Point" x="1116" y="591" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1102" y="580" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0c5jqhn_di" bpmnElement="ServiceTask_0bqh5yl">
+ <dc:Bounds x="672" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
new file mode 100644
index 0000000..302620f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
@@ -0,0 +1,390 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateServiceInstance" name="DoCreateServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="getAAICustomerById_scriptTask" name="Get AAI Customer By globalCustomerId " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.getAAICustomerById(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getAAICustomerById_scriptTask" targetRef="ExclusiveGateway_09wkav2" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="callGenericGetService" targetRef="ScriptTask_0i8cqdy" />
+ <bpmn2:scriptTask id="PreProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_156ih25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.preProcessSDNCAssignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PostProcessSDNCAssignRequest" name="Post Process SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.postProcessSDNCAssign(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterServiceTopologyAssign" name="Call SDNC Adapter Service Topology Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncAssignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="getAAICustomerById_scriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterServiceTopologyAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="CallSDNCAdapterServiceTopologyAssign" targetRef="PostProcessSDNCAssignRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="EndEvent_3" />
+ <bpmn2:callActivity id="callGenericGetService" name="Call GenericGetService" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" />
+ <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
+ <camunda:in sourceExpression="service-instance" target="GENGS_type" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
+ <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="callGenericPutService" name="Call Generic Put Service" calledElement="GenericPutService">
+ <bpmn2:extensionElements>
+ <camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
+ <camunda:in source="serviceInstanceId" target="GENPS_serviceInstanceId" />
+ <camunda:in source="subscriptionServiceType" target="GENPS_serviceType" />
+ <camunda:in sourceExpression="service-instance" target="GENPS_type" />
+ <camunda:in source="serviceInstanceData" target="GENPS_payload" />
+ <camunda:out source="GENPS_SuccessIndicator" target="GENPS_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="GENPS_requesId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1w01tqs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_129ih1g</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_129ih1g" sourceRef="callGenericPutService" targetRef="ScriptTask_0q37vn9" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09wkav2" name="sdncVersion is 1610 or serviceInstance name is populated?" default="SequenceFlow_1uw2p9a">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11fnnkb</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1uw2p9a</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_11fnnkb" name="yes" sourceRef="ExclusiveGateway_09wkav2" targetRef="callGenericGetService">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("serviceInstanceName" ) != null && execution.getVariable("serviceInstanceName" ) != "" ) || execution.getVariable("sdncVersion" ) == "1610" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1uw2p9a" name="no" sourceRef="ExclusiveGateway_09wkav2" targetRef="callGenericPutService" />
+ <bpmn2:subProcess id="SubProcess_06d8lk8" name="Sub-process for Application Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_0yljq9y">
+ <bpmn2:outgoing>SequenceFlow_0tgrn11</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_117lkk3">
+ <bpmn2:incoming>SequenceFlow_1xzgv5k</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallActivity_1srx6p6" name="Call DoCreateServiceInstanceRollback" calledElement="DoCreateServiceInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rollbackError" target="rollbackErrror" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lqktwf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eumzpf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0eumzpf" sourceRef="CallActivity_1srx6p6" targetRef="ScriptTask_1p0vyip" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0tgrn11" sourceRef="StartEvent_0yljq9y" targetRef="ScriptTask_0ocetux" />
+ <bpmn2:scriptTask id="ScriptTask_0ocetux" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0tgrn11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lqktwf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.preProcessRollback(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lqktwf" sourceRef="ScriptTask_0ocetux" targetRef="CallActivity_1srx6p6" />
+ <bpmn2:scriptTask id="ScriptTask_1p0vyip" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eumzpf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xzgv5k</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.postProcessRollback(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1xzgv5k" sourceRef="ScriptTask_1p0vyip" targetRef="EndEvent_117lkk3" />
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1nk6aol" name="sdncVersion is 1610?" default="SequenceFlow_156ih25">
+ <bpmn2:incoming>SequenceFlow_1dd86x8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_156ih25</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_00v4npo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_156ih25" name="no" sourceRef="ExclusiveGateway_1nk6aol" targetRef="PreProcessSDNCAssignRequest" />
+ <bpmn2:endEvent id="EndEvent_10659gr">
+ <bpmn2:incoming>SequenceFlow_00v4npo</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_00v4npo" name="yes" sourceRef="ExclusiveGateway_1nk6aol" targetRef="EndEvent_10659gr">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion" ) == "1610"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_0i8cqdy" name="Post Process AAI GET" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1w01tqs</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1w01tqs" sourceRef="ScriptTask_0i8cqdy" targetRef="callGenericPutService" />
+ <bpmn2:scriptTask id="ScriptTask_0q37vn9" name="Post Process AAI PUT" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_129ih1g</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1dd86x8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateServiceInstance()
+ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dd86x8" sourceRef="ScriptTask_0q37vn9" targetRef="ExclusiveGateway_1nk6aol" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
+ <dc:Bounds x="152" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="147" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="245" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="188" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="245" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="217" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="getAAICustomerById_scriptTask">
+ <dc:Bounds x="393" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_62">
+ <di:waypoint xsi:type="dc:Point" x="493" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="565" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="529" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1142" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1160" y="927" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4">
+ <di:waypoint xsi:type="dc:Point" x="839" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="971" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="905" y="79" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_334" bpmnElement="PreProcessSDNCAssignRequest">
+ <dc:Bounds x="972" y="578" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="PostProcessSDNCAssignRequest">
+ <dc:Bounds x="972" y="864" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_74" bpmnElement="CallSDNCAdapterServiceTopologyAssign">
+ <dc:Bounds x="972" y="721" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_62">
+ <di:waypoint xsi:type="dc:Point" x="345" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="393" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="369" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_334" targetElement="_BPMNShape_CallActivity_74">
+ <di:waypoint xsi:type="dc:Point" x="1020" y="658" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="692" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="692" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="715" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1035" y="692" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_CallActivity_74" targetElement="_BPMNShape_ScriptTask_335">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="801" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="864" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1037" y="840" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_335">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="1111" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="1111" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="1142" y="904" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1126" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="callGenericGetService">
+ <dc:Bounds x="739" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="callGenericPutService">
+ <dc:Bounds x="972" y="206" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_129ih1g_di" bpmnElement="SequenceFlow_129ih1g">
+ <di:waypoint xsi:type="dc:Point" x="1023" y="286" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="336" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1023" y="296" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
+ <dc:Bounds x="565" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="547" y="7" width="81" height="62" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb">
+ <di:waypoint xsi:type="dc:Point" x="615" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="739" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="635" y="76" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a">
+ <di:waypoint xsi:type="dc:Point" x="590" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="972" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="594" y="132.89706349694825" width="12" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
+ <dc:Bounds x="99" y="531" width="783" height="195" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y">
+ <dc:Bounds x="195" y="608" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="213" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3">
+ <dc:Bounds x="828" y="608" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="846" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1srx6p6_di" bpmnElement="CallActivity_1srx6p6">
+ <dc:Bounds x="493" y="586" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eumzpf_di" bpmnElement="SequenceFlow_0eumzpf">
+ <di:waypoint xsi:type="dc:Point" x="593" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="661" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="627" y="611" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11">
+ <di:waypoint xsi:type="dc:Point" x="231" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="330" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="281" y="611" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1nk6aol_di" bpmnElement="ExclusiveGateway_1nk6aol" isMarkerVisible="true">
+ <dc:Bounds x="997" y="460" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="903" y="472" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_156ih25_di" bpmnElement="SequenceFlow_156ih25">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="575" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1039" y="510.8721806797853" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_10659gr_di" bpmnElement="EndEvent_10659gr">
+ <dc:Bounds x="1103" y="467" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1121" y="508" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_00v4npo_di" bpmnElement="SequenceFlow_00v4npo">
+ <di:waypoint xsi:type="dc:Point" x="1047" y="485" />
+ <di:waypoint xsi:type="dc:Point" x="1103" y="485" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1063" y="461" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy">
+ <dc:Bounds x="971" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w01tqs_di" bpmnElement="SequenceFlow_1w01tqs">
+ <di:waypoint xsi:type="dc:Point" x="1021" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="206" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="172" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9">
+ <dc:Bounds x="972" y="336" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dd86x8_di" bpmnElement="SequenceFlow_1dd86x8">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="416" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1037" y="438" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0ocetux_di" bpmnElement="ScriptTask_0ocetux">
+ <dc:Bounds x="330" y="586" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lqktwf_di" bpmnElement="SequenceFlow_1lqktwf">
+ <di:waypoint xsi:type="dc:Point" x="430" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="462" y="611" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1p0vyip_di" bpmnElement="ScriptTask_1p0vyip">
+ <dc:Bounds x="661" y="586" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xzgv5k_di" bpmnElement="SequenceFlow_1xzgv5k">
+ <di:waypoint xsi:type="dc:Point" x="761" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="793" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="793" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="828" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="808" y="626" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn
new file mode 100644
index 0000000..e73c79d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateServiceInstanceRollback" name="DoCreateServiceInstanceRollback" isExecutable="true">
+ <bpmn2:startEvent id="createSIRollback_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSIRollback_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateServiceInstanceRollback()
+rbk.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_01l4ssl</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Handle Errors" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateServiceInstanceRollback()
+rbk.processRollbackException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="ExclusiveGateway_19tbjgn" />
+ <bpmn2:callActivity id="callGenericDeleteService" name="Call AAI GenericDelete Service " calledElement="GenericDeleteService">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceInstanceId" target="GENDS_serviceInstanceId" />
+ <camunda:in source="subscriptionServiceType" target="GENDS_serviceType" />
+ <camunda:in source="globalSubscriberId" target="GENDS_globalCustomerId" />
+ <camunda:in sourceExpression="service-instance" target="GENDS_type" />
+ <camunda:out source="GENDS_FoundIndicator" target="GENDS_FoundIndicator" />
+ <camunda:in sourceExpression="&#34;&#34;" target="GENGS_serviceType" />
+ <camunda:out source="GENDS_SuccessIndicator" target="GENDS_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowExecption" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1x9eh33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05wu9i7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09wkav2" name="RollbackSDNC?" default="SequenceFlow_1uw2p9a">
+ <bpmn2:incoming>SequenceFlow_06aasqh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11fnnkb</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1uw2p9a</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_11fnnkb" name="yes" sourceRef="ExclusiveGateway_09wkav2" targetRef="CallActivity_0ak0ezb">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rollbackSDNC" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1uw2p9a" name="no" sourceRef="ExclusiveGateway_09wkav2" targetRef="ExclusiveGateway_0ii31dq" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ii31dq" name="RollBackAAI?" default="SequenceFlow_1n7wade">
+ <bpmn2:documentation>rollback AAI</bpmn2:documentation>
+ <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0khjo7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1n7wade</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1x9eh33</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1n7wade" name="no" sourceRef="ExclusiveGateway_0ii31dq" targetRef="PostProcess_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_05wu9i7" sourceRef="callGenericDeleteService" targetRef="PostProcess_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1x9eh33" name="yes" sourceRef="ExclusiveGateway_0ii31dq" targetRef="callGenericDeleteService">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rollbackAAI" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k28xib" sourceRef="CallActivity_0ak0ezb" targetRef="ScriptTask_1uxr0cx" />
+ <bpmn2:callActivity id="CallActivity_0ak0ezb" name="Call SDNC Service Topology Rollback" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncRollbackRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Rollback " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0khjo7l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateServiceInstanceRollback()
+rbk.validateSDNCResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0khjo7l" sourceRef="ScriptTask_1uxr0cx" targetRef="ExclusiveGateway_0ii31dq" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_19tbjgn" name="skip Rollback" default="SequenceFlow_06aasqh">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06aasqh</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1rzlaoy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="PostProcess_ScriptTask" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_05wu9i7</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1n7wade</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1rzlaoy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01l4ssl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateServiceInstanceRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_01l4ssl" sourceRef="PostProcess_ScriptTask" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06aasqh" name="no" sourceRef="ExclusiveGateway_19tbjgn" targetRef="ExclusiveGateway_09wkav2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1rzlaoy" name="yes" sourceRef="ExclusiveGateway_19tbjgn" targetRef="PostProcess_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:subProcess id="SubProcess_11bi8mc" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1gxe17c">
+ <bpmn2:outgoing>SequenceFlow_1ch4xrf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="ScriptTask_15yddb0" name="Process Java Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ch4xrf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pjk2ff</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateServiceInstanceRollback()
+rbk.processRollbackJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_12e3h6k">
+ <bpmn2:incoming>SequenceFlow_1pjk2ff</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ch4xrf" name="" sourceRef="StartEvent_1gxe17c" targetRef="ScriptTask_15yddb0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1pjk2ff" name="" sourceRef="ScriptTask_15yddb0" targetRef="EndEvent_12e3h6k" />
+ </bpmn2:subProcess>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSIRollback_startEvent">
+ <dc:Bounds x="151" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="234" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="187" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="234" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1166" y="358" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1184" y="399" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="286" y="318" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="354" y="384" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="372" y="425" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="647" y="384" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="665" y="425" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="390" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="458" y="402" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="425" y="387" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="334" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="367" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="367" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="393" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="382" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="callGenericDeleteService">
+ <dc:Bounds x="1134" y="53" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
+ <dc:Bounds x="527" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="512" y="129" width="80" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb">
+ <di:waypoint xsi:type="dc:Point" x="577" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="601" y="101.351489674803" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a">
+ <di:waypoint xsi:type="dc:Point" x="552" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="-23" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="-23" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="72" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="635" y="-43" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ii31dq_di" bpmnElement="ExclusiveGateway_0ii31dq" isMarkerVisible="true">
+ <dc:Bounds x="996" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="939" y="113" width="66" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n7wade_di" bpmnElement="SequenceFlow_1n7wade">
+ <di:waypoint xsi:type="dc:Point" x="1021" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="1134" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1030" y="124.63737966405313" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05wu9i7_di" bpmnElement="SequenceFlow_05wu9i7">
+ <di:waypoint xsi:type="dc:Point" x="1184" y="133" />
+ <di:waypoint xsi:type="dc:Point" x="1184" y="206" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1199" y="169.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x9eh33_di" bpmnElement="SequenceFlow_1x9eh33">
+ <di:waypoint xsi:type="dc:Point" x="1046" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1134" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1082" y="82" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k28xib_di" bpmnElement="SequenceFlow_0k28xib">
+ <di:waypoint xsi:type="dc:Point" x="743" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="820" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="782" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb">
+ <dc:Bounds x="640" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx">
+ <dc:Bounds x="823" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0khjo7l_di" bpmnElement="SequenceFlow_0khjo7l">
+ <di:waypoint xsi:type="dc:Point" x="923" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="996" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="960" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_19tbjgn_di" bpmnElement="ExclusiveGateway_19tbjgn" isMarkerVisible="true">
+ <dc:Bounds x="393" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="385" y="38" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="458" y="362" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="558" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="402" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="603" y="387" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1wk55es_di" bpmnElement="PostProcess_ScriptTask">
+ <dc:Bounds x="1134" y="206" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01l4ssl_di" bpmnElement="SequenceFlow_01l4ssl">
+ <di:waypoint xsi:type="dc:Point" x="1184" y="286" />
+ <di:waypoint xsi:type="dc:Point" x="1184" y="358" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1199" y="322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06aasqh_di" bpmnElement="SequenceFlow_06aasqh">
+ <di:waypoint xsi:type="dc:Point" x="443" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="527" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="479" y="82" width="12" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rzlaoy_di" bpmnElement="SequenceFlow_1rzlaoy">
+ <di:waypoint xsi:type="dc:Point" x="418" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="418" y="268" />
+ <di:waypoint xsi:type="dc:Point" x="1131" y="272" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="424" y="195" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_11bi8mc_di" bpmnElement="SubProcess_11bi8mc" isExpanded="true">
+ <dc:Bounds x="325" y="576" width="419" height="150" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1gxe17c_di" bpmnElement="StartEvent_1gxe17c">
+ <dc:Bounds x="360" y="628" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="378" y="669" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_15yddb0_di" bpmnElement="ScriptTask_15yddb0">
+ <dc:Bounds x="468" y="606" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_12e3h6k_di" bpmnElement="EndEvent_12e3h6k">
+ <dc:Bounds x="618" y="628" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="636" y="669" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ch4xrf_di" bpmnElement="SequenceFlow_1ch4xrf">
+ <di:waypoint xsi:type="dc:Point" x="396" y="646" />
+ <di:waypoint xsi:type="dc:Point" x="468" y="646" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="421" y="646" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pjk2ff_di" bpmnElement="SequenceFlow_1pjk2ff">
+ <di:waypoint xsi:type="dc:Point" x="568" y="646" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="646" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="593" y="646" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn
new file mode 100644
index 0000000..62eb918
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn
@@ -0,0 +1,1006 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_pNTO8MRhEeWv36YLr7PC3Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateVfModule" name="DoCreateVfModule" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="DoCreateVfModule">
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_26" name="DoCreateVfModule" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateCatchEvent_1" targetRef="IsVolumeGroupIdSpecified" />
+ <bpmn2:exclusiveGateway id="IsVolumeGroupIdSpecified" name="Is volume_group_id specified?" default="SequenceFlow_11">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="no" sourceRef="IsVolumeGroupIdSpecified" targetRef="ExclusiveGateway_4" />
+ <bpmn2:callActivity id="ConfirmVolumeGroupTenant" name="Confirm Volume Group Tenant" calledElement="ConfirmVolumeGroupTenant">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="DCVFM_tenantId" target="tenantId" />
+ <camunda:in source="DCVFM_cloudRegionForVolume" target="aicCloudRegion" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="ConfirmVolumeGroupTenantResponse" target="DCVFM_volumeGroupStackId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_43</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ConfirmVolumeGroupTenant" targetRef="IsVolumeGroupNameSpecified" />
+ <bpmn2:exclusiveGateway id="IsVolumeGroupNameSpecified" name="Is volume_group_name specified?" default="SequenceFlow_21">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="IsVolumeGroupNameSpecified" targetRef="ConfirmVolumeName">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupNamePresent(execution)]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="IsVolumeGroupNameSpecified" targetRef="ExclusiveGateway_4" />
+ <bpmn2:callActivity id="ConfirmVolumeName" name="Confirm Volume Group Name" calledElement="ConfirmVolumeGroupName">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_volumeGroupId" target="ConfirmVolumeGroupName_volumeGroupId" />
+ <camunda:in source="DCVFM_volumeGroupName" target="ConfirmVolumeGroupName_volumeGroupName" />
+ <camunda:in source="DCVFM_cloudRegionForVolume" target="ConfirmVolumeGroupName_aicCloudRegion" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_confirmResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ConfirmVolumeName" targetRef="ExclusiveGateway_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_4">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_4" targetRef="CreateAAIVfModule" />
+ <bpmn2:callActivity id="CallSDNCAdapterVDModuleTopologyAssign" name="Call SDNC Adapter: VF Module Topology Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_assignSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCAssignRequest" name="PostProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "assign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCAssignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterVDModuleTopologyAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="CallSDNCAdapterVDModuleTopologyAssign" targetRef="PostProcessSDNCAssignRequest" />
+ <bpmn2:scriptTask id="PreProcessSDNCGetRequest" name="PreProcess SDNC GET Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCGetRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVFModuleTopologyGET" name="Call SDNC Adapter: VF Module Topology GET" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_getSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_getSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="PreProcessSDNCGetRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="PreProcessSDNCGetRequest" targetRef="CallSDNCAdapterVFModuleTopologyGET" />
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="CallSDNCAdapterVFModuleTopologyGET" targetRef="PostProcessSDNCGetRequest" />
+ <bpmn2:scriptTask id="PostProcessSDNCGetRequest" name="PostProcess SDNC GET Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DCVFM_getSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "get")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="UpdateAAIVfModule_1" name="UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_updateAAIVfModuleResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PreProcessUpdateAAIVfModule_1" name="PreProcess Update AAIVfModule" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1avfxsz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessUpdateAAIVfModuleRequestOrch(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCActivateRequest" name="PreProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCActivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVFModuleTopologyActivate" name="Call SDNC Adapter: VF Module Topology Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_activateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCActivateRequest" name="PostProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+ String response = execution.getVariable("DCVFM_activateSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "activate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Is volume_group_id specified?" default="SequenceFlow_30">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="ExclusiveGateway_5" targetRef="PrepareCreateAAIVfModuleVolumeGroupRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="no" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="PreProcessUpdateAAIVfModule_1" targetRef="UpdateAAIVfModule_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="UpdateAAIVfModule_1" targetRef="PreProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PreProcessSDNCActivateRequest" targetRef="CallSDNCAdapterVFModuleTopologyActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="CallSDNCAdapterVFModuleTopologyActivate" targetRef="PostProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PostProcessSDNCActivateRequest" targetRef="ExclusiveGateway_5" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="UpdateAndActivate">
+ <bpmn2:outgoing>SequenceFlow_0363dz7</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_30" name="UpdateAndActivate" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_2" name="Provision">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_29" name="Provision" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="IntermediateCatchEvent_2" targetRef="PreProcessSDNCAssignRequest" />
+ <bpmn2:scriptTask id="PrepareCreateAAIVfModuleVolumeGroupRequest" name="Prepare CreateAAIVfModuleVolumeGroup Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.prepareCreateAAIVfModuleVolumeGroupRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CreateAAIVfModuleVolumeGroup" name="CreateAAIVfModuleVolumeGroup" calledElement="CreateAAIVfModuleVolumeGroup">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_createAAIVfModuleVolumeGroupRequest" target="CreateAAIVfModuleVolumeGroupRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_updateAAIVfModuleResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="CreateAAIVfModuleVolumeGroup" targetRef="ExclusiveGateway_6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PrepareCreateAAIVfModuleVolumeGroupRequest" targetRef="CreateAAIVfModuleVolumeGroup" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_6">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ExclusiveGateway_6" targetRef="ScriptTask_setSuccess" />
+ <bpmn2:scriptTask id="PreProcessVNFAdapterRequest" name="PreProcess VNF Adapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallVNFAdapterVFModuleCreate" name="Call VNF Adapter to create VF Module" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_createVnfARequest" target="vnfAdapterRestV1Request" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DCVFM_createVnfAResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in variables="all" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessVNFAdapterRequest" name="PostProcess VNF Adapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ushk1d</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="To UpdateAndActivate">
+ <bpmn2:incoming>SequenceFlow_0xfanpi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0abffyj</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_31" name="UpdateAndActivate" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="PostProcessSDNCGetRequest" targetRef="PreProcessVNFAdapterRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="PreProcessVNFAdapterRequest" targetRef="CallVNFAdapterVFModuleCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="CallVNFAdapterVFModuleCreate" targetRef="PostProcessVNFAdapterRequest" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_3" name="To Provision">
+ <bpmn2:incoming>SequenceFlow_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 org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessCreateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="PostProcessCreateAAIVfModule" targetRef="IsBaseVfModule" />
+ <bpmn2:exclusiveGateway id="IsBaseVfModule" name="Is Base VF Module?" default="SequenceFlow_36">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_36" name="no" sourceRef="IsBaseVfModule" targetRef="QueryAAIVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="yes" sourceRef="IsBaseVfModule" targetRef="ExclusiveGateway_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_isBaseVfModule") == "true"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="QueryAAIVfModule" name="Query AAI Vf Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="QueryAAIVfModule" targetRef="ExclusiveGateway_2" />
+ <bpmn2: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 org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.setSuccessIndicator(execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_setSuccess" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_8" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="QueryCloudRegion" name="Query Cloud Region" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.queryCloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_40" name="yes" sourceRef="IsVolumeGroupIdSpecified" targetRef="QueryCloudRegion">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_43" name="" sourceRef="QueryCloudRegion" targetRef="ConfirmVolumeGroupTenant" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.processBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_2" />
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="PreProcessRequest" targetRef="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:callActivity id="CreateAAIVfModule" name="CreateAAIVfModule" calledElement="CreateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="newVfModuleId" target="newVfModuleId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="CreateAAIVfModuleResponse" target="DCVFM_createVfModuleResponse" />
+ <camunda:in source="DCVFM_vnfId" target="vnfId" />
+ <camunda:in source="DCVFM_vnfName" target="vnfName" />
+ <camunda:in source="DCVFM_vnfType" target="vnfType" />
+ <camunda:in source="DCVFM_serviceId" target="serviceId" />
+ <camunda:in source="DCVFM_personaModelId" target="personaModelId" />
+ <camunda:in source="DCVFM_isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="DCVFM_vfModuleName" target="vfModuleName" />
+ <camunda:in source="DCVFM_vfModuleModelName" target="vfModuleModelName" />
+ <camunda:in source="DCVFM_personaModelVersion" target="personaModelVersion" />
+ <camunda:in source="DCVFM_modelCustomizationUuid" target="modelCustomizationId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="CreateAAIVfModule" targetRef="PostProcessCreateAAIVfModule" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_183x8vk" name="need to create network policies in AAI?" default="SequenceFlow_0xfanpi">
+ <bpmn2:incoming>SequenceFlow_1ushk1d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ery1pk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0xfanpi</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ushk1d" sourceRef="PostProcessVNFAdapterRequest" targetRef="ExclusiveGateway_183x8vk" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ery1pk" name="yes" sourceRef="ExclusiveGateway_183x8vk" targetRef="CreateNetworkPoliciesInAAI">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList") != null && !execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList").isEmpty()]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xfanpi" name="no" sourceRef="ExclusiveGateway_183x8vk" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0abffyj" sourceRef="CreateNetworkPoliciesInAAI" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:scriptTask id="CreateNetworkPoliciesInAAI" name="Create Network Policies In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ery1pk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0abffyj</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.createNetworkPoliciesInAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0f54imv" name="need to update VNF in AAI?" default="SequenceFlow_1k5uku2">
+ <bpmn2:incoming>SequenceFlow_0363dz7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bi38s7</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1k5uku2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1edqxlf">
+ <bpmn2:incoming>SequenceFlow_112los9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1k5uku2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1avfxsz</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bi38s7" name="yes" sourceRef="ExclusiveGateway_0f54imv" targetRef="PreProcessUpdateAAIGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[!execution.getVariable("DCVFM_oamManagementV4Address").isEmpty() || !execution.getVariable("DCVFM_oamManagementV6Address").isEmpty()]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qm81ym" sourceRef="PreProcessUpdateAAIGenericVnf" targetRef="UpdateAAIGenericVNFTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_112los9" sourceRef="UpdateAAIGenericVNFTask" targetRef="ExclusiveGateway_1edqxlf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1k5uku2" name="no" sourceRef="ExclusiveGateway_0f54imv" targetRef="ExclusiveGateway_1edqxlf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1avfxsz" sourceRef="ExclusiveGateway_1edqxlf" targetRef="PreProcessUpdateAAIVfModule_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0363dz7" sourceRef="IntermediateCatchEvent_3" targetRef="ExclusiveGateway_0f54imv" />
+ <bpmn2:scriptTask id="PreProcessUpdateAAIGenericVnf" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bi38s7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qm81ym</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="UpdateAAIGenericVNFTask" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVM_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1qm81ym</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_112los9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ </bpmn2:process>
+ <bpmn2:message id="Message_1" name="DoCreateVfModuleRequest" />
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="41" y="231" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="77" y="249" />
+ <di:waypoint xsi:type="dc:Point" x="150" y="249" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="99" y="249" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="150" y="209" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_24" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds x="36" y="376" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="0" y="417" width="114" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_22" bpmnElement="IntermediateThrowEvent_1">
+ <dc:Bounds x="338" y="231" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="290" y="272" width="132" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="CallSDNCAdapterVDModuleTopologyAssign">
+ <dc:Bounds x="266" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="CallSDNCAdapterVFModuleTopologyGET">
+ <dc:Bounds x="744" y="670" width="133" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="IsVolumeGroupIdSpecified" isMarkerVisible="true">
+ <dc:Bounds x="144" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="89" y="347" width="178" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ConfirmVolumeGroupTenant">
+ <dc:Bounds x="209" y="528" width="118" height="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_91" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
+ <dc:Bounds x="559" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="423" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="194" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="559" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="393" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="CallVNFAdapterVFModuleCreate">
+ <dc:Bounds x="1236" y="672" width="121" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="UpdateAAIVfModule_1">
+ <dc:Bounds x="768" y="830" width="117" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="CallSDNCAdapterVFModuleTopologyActivate">
+ <dc:Bounds x="1090" y="828" width="119" height="99" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_92" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="1435" y="853" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1432" y="825" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="CreateAAIVfModuleVolumeGroup">
+ <dc:Bounds x="1693" y="986" width="121" height="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_92" targetElement="_BPMNShape_Task_7">
+ <di:waypoint xsi:type="dc:Point" x="1460" y="903" />
+ <di:waypoint xsi:type="dc:Point" x="1460" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1520" y="1042" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1452" y="928" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_93" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
+ <dc:Bounds x="1818" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1843" y="909" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_176" targetElement="_BPMNShape_ExclusiveGateway_93">
+ <di:waypoint xsi:type="dc:Point" x="1813" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="944" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="904" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1839" y="1042" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_92" targetElement="_BPMNShape_ExclusiveGateway_93">
+ <di:waypoint xsi:type="dc:Point" x="1485" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1651" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1651" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="1818" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="878" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_IntermediateCatchEvent_24" targetElement="_BPMNShape_ExclusiveGateway_90">
+ <di:waypoint xsi:type="dc:Point" x="72" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="120" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="120" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="117" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_101" bpmnElement="IsVolumeGroupNameSpecified" isMarkerVisible="true">
+ <dc:Bounds x="360" y="547" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309" y="496" width="200" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_ExclusiveGateway_101">
+ <di:waypoint xsi:type="dc:Point" x="327" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="572" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="338" y="572" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_3" bpmnElement="ConfirmVolumeName">
+ <dc:Bounds x="453" y="528" width="109" height="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_101" targetElement="_BPMNShape_Task_3">
+ <di:waypoint xsi:type="dc:Point" x="410" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="453" y="572" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="410" y="576" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_101" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="385" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="385" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="559" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="392" y="450" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_Task_3" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="561" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="584" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="584" y="418" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="492" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_IntermediateThrowEvent_22">
+ <di:waypoint xsi:type="dc:Point" x="250" y="249" />
+ <di:waypoint xsi:type="dc:Point" x="338" y="249" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="287" y="249" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_91" targetElement="_BPMNShape_ScriptTask_156">
+ <di:waypoint xsi:type="dc:Point" x="609" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="628" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="628" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="696" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="636" y="394" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="PreProcessSDNCAssignRequest">
+ <dc:Bounds x="109" y="674" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="PostProcessSDNCAssignRequest">
+ <dc:Bounds x="435" y="674" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_44" bpmnElement="IntermediateThrowEvent_3">
+ <dc:Bounds x="1537" y="374" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1517" y="415" width="76" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_29" bpmnElement="IntermediateCatchEvent_2">
+ <dc:Bounds x="24" y="706" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="13" y="747" width="58" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_IntermediateCatchEvent_29" targetElement="_BPMNShape_ScriptTask_178">
+ <di:waypoint xsi:type="dc:Point" x="60" y="724" />
+ <di:waypoint xsi:type="dc:Point" x="81" y="724" />
+ <di:waypoint xsi:type="dc:Point" x="81" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="109" y="721" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="78" y="722" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_ScriptTask_157">
+ <di:waypoint xsi:type="dc:Point" x="229" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="266" y="719" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ScriptTask_179">
+ <di:waypoint xsi:type="dc:Point" x="386" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="411" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="411" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="435" y="721" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_213" bpmnElement="PreProcessSDNCGetRequest">
+ <dc:Bounds x="588" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_214" bpmnElement="PostProcessSDNCGetRequest">
+ <dc:Bounds x="924" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_ScriptTask_213">
+ <di:waypoint xsi:type="dc:Point" x="555" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="588" y="719" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_213" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="708" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="718" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_ScriptTask_214">
+ <di:waypoint xsi:type="dc:Point" x="876" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="899" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="899" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="719" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="PreProcessUpdateAAIVfModule_1">
+ <dc:Bounds x="609" y="830" width="118" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_33" bpmnElement="PreProcessSDNCActivateRequest">
+ <dc:Bounds x="935" y="829" width="118" height="98" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_4" bpmnElement="PostProcessSDNCActivateRequest">
+ <dc:Bounds x="1252" y="830" width="121" height="95" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ScriptTask_174">
+ <di:waypoint xsi:type="dc:Point" x="727" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="748" y="853" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_174" targetElement="_BPMNShape_Task_33">
+ <di:waypoint xsi:type="dc:Point" x="884" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="935" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="910" y="853" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_Task_33" targetElement="_BPMNShape_ScriptTask_175">
+ <di:waypoint xsi:type="dc:Point" x="1053" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1090" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1086" y="868" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_175" targetElement="_BPMNShape_Task_4">
+ <di:waypoint xsi:type="dc:Point" x="1208" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1252" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1230" y="852" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_4" targetElement="_BPMNShape_ExclusiveGateway_92">
+ <di:waypoint xsi:type="dc:Point" x="1372" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1404" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1404" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1435" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="868" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_175" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1808" y="860" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1826" y="901" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_93" targetElement="_BPMNShape_ScriptTask_218">
+ <di:waypoint xsi:type="dc:Point" x="1868" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="1894" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="1894" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1933" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1881" y="879" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_45" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="1771" y="701" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1747" y="742" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_30" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="24" y="860" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="16" y="901" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_7" bpmnElement="PrepareCreateAAIVfModuleVolumeGroupRequest">
+ <dc:Bounds x="1520" y="986" width="121" height="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_Task_7" targetElement="_BPMNShape_ScriptTask_176">
+ <di:waypoint xsi:type="dc:Point" x="1640" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1693" y="1042" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1667" y="1017" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_25" bpmnElement="PreProcessVNFAdapterRequest">
+ <dc:Bounds x="1073" y="672" width="121" height="96" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_35" bpmnElement="PostProcessVNFAdapterRequest">
+ <dc:Bounds x="1397" y="674" width="116" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_214" targetElement="_BPMNShape_Task_25">
+ <di:waypoint xsi:type="dc:Point" x="1044" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1073" y="720" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_Task_25" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="1193" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1236" y="720" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_Task_35">
+ <di:waypoint xsi:type="dc:Point" x="1356" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1397" y="720" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="QueryAAIVfModule">
+ <dc:Bounds x="1224" y="516" width="125" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_211" bpmnElement="IsBaseVfModule" isMarkerVisible="true">
+ <dc:Bounds x="1128" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1092" y="336" width="124" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_212" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="1408" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1433" y="423" width="0" height="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" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="1153" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1224" y="562" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1122" y="450" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ExclusiveGateway_211" targetElement="_BPMNShape_ExclusiveGateway_212">
+ <di:waypoint xsi:type="dc:Point" x="1178" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1285" y="393" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_216" bpmnElement="PostProcessCreateAAIVfModule">
+ <dc:Bounds x="897" y="348" width="125" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_216" targetElement="_BPMNShape_ExclusiveGateway_211">
+ <di:waypoint xsi:type="dc:Point" x="1021" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1075" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1075" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1128" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1072" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ExclusiveGateway_212">
+ <di:waypoint xsi:type="dc:Point" x="1348" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1378" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1378" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="393" />
+ </bpmndi: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" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1497" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1497" y="392" />
+ <di:waypoint xsi:type="dc:Point" x="1537" y="392" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="ScriptTask_setSuccess">
+ <dc:Bounds x="1933" y="831" width="128" height="95" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_EndEvent_175">
+ <di:waypoint xsi:type="dc:Point" x="1933" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1844" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1889" y="862.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_254" bpmnElement="QueryCloudRegion">
+ <dc:Bounds x="101" y="440" width="134" height="81" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ScriptTask_254">
+ <di:waypoint xsi:type="dc:Point" x="169" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="429" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="429" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="440" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="180" y="417" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_43" sourceElement="_BPMNShape_ScriptTask_254" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="168" y="520" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="524" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="208" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="574" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="29" y="1197" width="405" height="203" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_55" bpmnElement="StartEvent_2">
+ <dc:Bounds x="58" y="1281" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="76" y="1322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_2">
+ <dc:Bounds x="370" y="1281" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="1322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_284" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="165" y="1258" width="134" height="81" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_55" targetElement="_BPMNShape_ScriptTask_284">
+ <di:waypoint xsi:type="dc:Point" x="94" y="1299" />
+ <di:waypoint xsi:type="dc:Point" x="165" y="1298" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="118" y="1299" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_284" targetElement="_BPMNShape_EndEvent_181">
+ <di:waypoint xsi:type="dc:Point" x="299" y="1298" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="1299" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="329" y="1298" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="CreateAAIVfModule">
+ <dc:Bounds x="696" y="348" width="121" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_216">
+ <di:waypoint xsi:type="dc:Point" x="816" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="897" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="857" y="369" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_183x8vk_di" bpmnElement="ExclusiveGateway_183x8vk" isMarkerVisible="true">
+ <dc:Bounds x="1565.9780439121755" y="696" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1546" y="746" width="89" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ushk1d_di" bpmnElement="SequenceFlow_1ushk1d">
+ <di:waypoint xsi:type="dc:Point" x="1513" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1566" y="721" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1540" y="705.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ery1pk_di" bpmnElement="SequenceFlow_0ery1pk">
+ <di:waypoint xsi:type="dc:Point" x="1591" y="696" />
+ <di:waypoint xsi:type="dc:Point" x="1591" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1621" y="616" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1558" y="658" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xfanpi_di" bpmnElement="SequenceFlow_0xfanpi">
+ <di:waypoint xsi:type="dc:Point" x="1616" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="1771" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1688" y="695" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0abffyj_di" bpmnElement="SequenceFlow_0abffyj">
+ <di:waypoint xsi:type="dc:Point" x="1721" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1746" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1746" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1771" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1761" y="667.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1dv7amn_di" bpmnElement="CreateNetworkPoliciesInAAI">
+ <dc:Bounds x="1621" y="576" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0f54imv_di" bpmnElement="ExclusiveGateway_0f54imv" isMarkerVisible="true">
+ <dc:Bounds x="114.59500000000003" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="101" y="819" width="77" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1edqxlf_di" bpmnElement="ExclusiveGateway_1edqxlf" isMarkerVisible="true">
+ <dc:Bounds x="482.595" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bi38s7_di" bpmnElement="SequenceFlow_0bi38s7">
+ <di:waypoint xsi:type="dc:Point" x="140" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="193" y="1057" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="980.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qm81ym_di" bpmnElement="SequenceFlow_1qm81ym">
+ <di:waypoint xsi:type="dc:Point" x="293" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="365" y="1057" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="1057" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_112los9_di" bpmnElement="SequenceFlow_112los9">
+ <di:waypoint xsi:type="dc:Point" x="465" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="904" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="487" y="1042" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1k5uku2_di" bpmnElement="SequenceFlow_1k5uku2">
+ <di:waypoint xsi:type="dc:Point" x="165" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="483" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="318" y="864" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1avfxsz_di" bpmnElement="SequenceFlow_1avfxsz">
+ <di:waypoint xsi:type="dc:Point" x="533" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="609" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="586" y="879" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0363dz7_di" bpmnElement="SequenceFlow_0363dz7">
+ <di:waypoint xsi:type="dc:Point" x="60" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="115" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="853.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o3bcyq_di" bpmnElement="PreProcessUpdateAAIGenericVnf">
+ <dc:Bounds x="193" y="1018" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0j45ic9_di" bpmnElement="UpdateAAIGenericVNFTask">
+ <dc:Bounds x="365" y="1017" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
new file mode 100644
index 0000000..0444b69
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
@@ -0,0 +1,674 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_Wblj8GyfEeWUWLTvug7ZOg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateVfModuleRollback" name="DoCreateVfModuleRollback" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Rollback PrepareUpdateAAIVfModule?" default="SequenceFlow_9">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="PrepareUpdateAAIVfModulePrep" name="PrepareUpdateAAIVfModule Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke
+&#10;PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="PrepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="PUAAIVfMod_heatStackId" target="DCVFMR_heatStackId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="yes" sourceRef="ExclusiveGateway_1" targetRef="PrepareUpdateAAIVfModulePrep">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackPrepareUpdateVfModule") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="InvokePrepareUpdateAAIVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="ExclusiveGateway_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="no" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_2" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Rollback Network Policies Creation?" default="SequenceFlow_15">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter
+&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1p0v6yk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1" />
+ <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke
+&#10;VNFAdapterRestV1" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="vnfAdapterRestV1Request" target="vnfAdapterRestV1Request" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DoDVfMod_DoCreateVfModuleRollbackResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="yes" sourceRef="ExclusiveGateway_2" targetRef="Task_08csf14">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackCreateNetworkPoliciesAAI") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="InvokeVNFAdapterRestV1" targetRef="ExclusiveGateway_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="no" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_0a0hroy" />
+ <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule
+&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepUpdateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateAAIVfModulePrep" targetRef="InvokeUpdateAAIVfModule" />
+ <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke
+&#10;UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="InvokeUpdateAAIVfModule" targetRef="ExclusiveGateway_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Rollback Update AAI Vf Module?" default="SequenceFlow_17">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_03i4czf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="yes" sourceRef="ExclusiveGateway_3" targetRef="UpdateAAIVfModulePrep">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackUpdateAAIVfModule") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="no" sourceRef="ExclusiveGateway_3" targetRef="ExclusiveGateway_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_4" name="Rollback SDNC Request?" default="SequenceFlow_20">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="ExclusiveGateway_4" targetRef="SDNCAdapterPrep2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true" || execution.getVariable("DCVFMR_rollbackSDNCRequestActivate") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="no" sourceRef="ExclusiveGateway_4" targetRef="ExclusiveGateway_5" />
+ <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter
+&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepSDNCAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="InvokeSDNCAdapterV1_2" />
+ <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke
+&#10;SDNCAdapterV1" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFMR_DoCreateVfModuleRollbackResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Delete AAI VF Modlue?" default="SequenceFlow_21">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="ExclusiveGateway_5" targetRef="EndEvent_9" />
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="yes" sourceRef="ExclusiveGateway_5" targetRef="DeleteAAIVfModulePrep">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackCreateAAIVfModule") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke
+&#10;DeleteAAIVfModule" calledElement="DeleteAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="InvokeDeleteAAIVfModule" targetRef="EndEvent_9" />
+ <bpmn2:endEvent id="EndEvent_9">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule
+&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepDeleteAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="DeleteAAIVfModulePrep" targetRef="InvokeDeleteAAIVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="InvokeSDNCAdapterV1_2" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Validate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.sdncValidateResponse(execution, DCVFMR_DoCreateVfModuleRollbackResponse)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_5" />
+ <bpmn2:subProcess id="SubProcess_1" name="Rollback Error Handling" triggeredByEvent="true">
+ <bpmn2:startEvent id="CatchExceptions" name="Catch Exceptions">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CatchExceptions" targetRef="LogSaveWorkflowException" />
+ <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.logWorkflowException(execution, 'DoCreateVfModuleRollback caught an event')
+dcvfmr.saveWorkflowException(execution, 'DCVFMR_CaughtWorkflowException1')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="LogSaveWorkflowException" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_86" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_2" />
+ <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="InitializeVariables" targetRef="ExclusiveGateway_1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0a0hroy" name="Rollback Update AAI Generic VNF?" default="SequenceFlow_185bo77">
+ <bpmn2:incoming>SequenceFlow_0djpj3r</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_185bo77</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_111l1he</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="Task_08csf14" name="Delete Network Policies from AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0djpj3r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.deleteNetworkPoliciesFromAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_18r7u02" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_111l1he</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ca4brn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_01ajtiy" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFMR_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ca4brn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19r2uus</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0djpj3r" sourceRef="Task_08csf14" targetRef="ExclusiveGateway_0a0hroy" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0uvarlv" name="Rollback VNF Adapter Create?" default="SequenceFlow_03i4czf">
+ <bpmn2:incoming>SequenceFlow_185bo77</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_19r2uus</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1p0v6yk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_03i4czf</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_185bo77" name="no" sourceRef="ExclusiveGateway_0a0hroy" targetRef="ExclusiveGateway_0uvarlv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_111l1he" name="yes" sourceRef="ExclusiveGateway_0a0hroy" targetRef="Task_18r7u02">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackUpdateVnfAAI") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ca4brn" sourceRef="Task_18r7u02" targetRef="Task_01ajtiy" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19r2uus" sourceRef="Task_01ajtiy" targetRef="ExclusiveGateway_0uvarlv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1p0v6yk" name="yes&#10;&#10;" sourceRef="ExclusiveGateway_0uvarlv" targetRef="VNFAdapterPrep">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackVnfAdapterCreate") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_03i4czf" name="no" sourceRef="ExclusiveGateway_0uvarlv" targetRef="ExclusiveGateway_3" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="DoCreateVfModuleRollbackRequest" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds x="13" y="100" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="31" y="141" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
+ <dc:Bounds x="203" y="78" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
+ <di:waypoint xsi:type="dc:Point" x="49" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="203" y="118" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="74" y="118" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">
+ <dc:Bounds x="725" y="23" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="PrepareUpdateAAIVfModulePrep">
+ <dc:Bounds x="552" y="23" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
+ <dc:Bounds x="95" y="507" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
+ <dc:Bounds x="253" y="507" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_170" targetElement="_BPMNShape_CallActivity_13">
+ <di:waypoint xsi:type="dc:Point" x="195" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="253" y="547" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="216" y="547" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
+ <dc:Bounds x="543" y="502" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
+ <dc:Bounds x="723" y="502" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
+ <dc:Bounds x="65" y="742" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
+ <dc:Bounds x="205" y="742" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
+ <dc:Bounds x="582" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
+ <dc:Bounds x="738" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_CallActivity_15">
+ <di:waypoint xsi:type="dc:Point" x="165" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="782" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="185" y="782" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_CallActivity_16">
+ <di:waypoint xsi:type="dc:Point" x="682" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="698" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
+ <dc:Bounds x="920" y="853" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="938" y="894" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_16" targetElement="_BPMNShape_EndEvent_169">
+ <di:waypoint xsi:type="dc:Point" x="838" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="938" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="938" y="853" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="866" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="404" y="92" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="326" y="167" width="228" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ExclusiveGateway_223">
+ <di:waypoint xsi:type="dc:Point" x="303" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="383" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="383" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="404" y="117" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="118" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="912" y="92" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="892" y="152" width="90" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_168">
+ <di:waypoint xsi:type="dc:Point" x="429" y="92" />
+ <di:waypoint xsi:type="dc:Point" x="429" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="503" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="63" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="473" y="63" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_160">
+ <di:waypoint xsi:type="dc:Point" x="652" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="725" y="63" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_224">
+ <di:waypoint xsi:type="dc:Point" x="825" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="862" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="92" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888" y="63" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ExclusiveGateway_224">
+ <di:waypoint xsi:type="dc:Point" x="454" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="117" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="676" y="117" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ScriptTask_170">
+ <di:waypoint xsi:type="dc:Point" x="937" y="142" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="229" />
+ <di:waypoint xsi:type="dc:Point" x="29" y="229" />
+ <di:waypoint xsi:type="dc:Point" x="29" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="203" y="291" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="496" y="233" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds x="405" y="581" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="389" y="636" width="83" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_CallActivity_13" targetElement="_BPMNShape_ExclusiveGateway_225">
+ <di:waypoint xsi:type="dc:Point" x="353" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="374" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="430" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="430" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="415" y="547" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_171">
+ <di:waypoint xsi:type="dc:Point" x="455" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="543" y="542" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="498" y="547" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_CallActivity_14">
+ <di:waypoint xsi:type="dc:Point" x="643" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="723" y="542" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="654" y="542" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
+ <dc:Bounds x="903" y="581" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="636" width="78" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_225">
+ <di:waypoint xsi:type="dc:Point" x="962" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="1025" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="1025" y="212" />
+ <di:waypoint xsi:type="dc:Point" x="19" y="212" />
+ <di:waypoint xsi:type="dc:Point" x="19" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="357" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="187" width="12" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ExclusiveGateway_226">
+ <di:waypoint xsi:type="dc:Point" x="455" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="903" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="665" y="606" width="13" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_14" targetElement="_BPMNShape_ExclusiveGateway_226">
+ <di:waypoint xsi:type="dc:Point" x="823" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="901" y="542" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="928" y="631" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="474" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="25" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="25" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="65" y="782" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="564" y="702" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="467" y="845" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="456" y="900" width="71" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ExclusiveGateway_227">
+ <di:waypoint xsi:type="dc:Point" x="953" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="686" />
+ <di:waypoint xsi:type="dc:Point" x="16" y="686" />
+ <di:waypoint xsi:type="dc:Point" x="16" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="467" y="870" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786" y="656" width="13" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_EndEvent_169">
+ <di:waypoint xsi:type="dc:Point" x="517" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="772" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="772" y="871" />
+ <di:waypoint xsi:type="dc:Point" x="920" y="871" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="750" y="870" width="13" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="517" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="814" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="582" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="557" y="791" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="339" y="742" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_15" targetElement="_BPMNShape_ScriptTask_255">
+ <di:waypoint xsi:type="dc:Point" x="305" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="339" y="782" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="324" y="782" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_ExclusiveGateway_227">
+ <di:waypoint xsi:type="dc:Point" x="439" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="845" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="492" y="787" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="18" y="1012" width="469" height="150" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_59" bpmnElement="CatchExceptions">
+ <dc:Bounds x="36" y="1063" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="42" y="1108" width="85" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_281" bpmnElement="LogSaveWorkflowException">
+ <dc:Bounds x="174" y="1041" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1">
+ <dc:Bounds x="349" y="1062" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="367" y="1098" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="469" y="1058" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="487" y="1094" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2">
+ <dc:Bounds x="593" y="1058" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="611" y="1099" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_59" targetElement="_BPMNShape_ScriptTask_281">
+ <di:waypoint xsi:type="dc:Point" x="72" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="174" y="1081" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="120" y="1081" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_281" targetElement="_BPMNShape_EndEvent_188">
+ <di:waypoint xsi:type="dc:Point" x="274" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="1080" />
+ <di:waypoint xsi:type="dc:Point" x="349" y="1080" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="326" y="1071" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_BoundaryEvent_55" targetElement="_BPMNShape_EndEvent_189">
+ <di:waypoint xsi:type="dc:Point" x="505" y="1076" />
+ <di:waypoint xsi:type="dc:Point" x="593" y="1076" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="550" y="1051" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0a0hroy_di" bpmnElement="ExclusiveGateway_0a0hroy" isMarkerVisible="true">
+ <dc:Bounds x="404.308277027027" y="332.23902027027026" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="382.23902027027026" width="84" height="37" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0mnb4d7_di" bpmnElement="Task_08csf14">
+ <dc:Bounds x="203" y="251" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1shi2a6_di" bpmnElement="Task_18r7u02">
+ <dc:Bounds x="543" y="251" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0zvct4i_di" bpmnElement="Task_01ajtiy">
+ <dc:Bounds x="738" y="251" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0djpj3r_di" bpmnElement="SequenceFlow_0djpj3r">
+ <di:waypoint xsi:type="dc:Point" x="303" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="429" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="429" y="333" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="276" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0uvarlv_di" bpmnElement="ExclusiveGateway_0uvarlv" isMarkerVisible="true">
+ <dc:Bounds x="912" y="332.4552364864865" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="382.4552364864865" width="80" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_185bo77_di" bpmnElement="SequenceFlow_185bo77">
+ <di:waypoint xsi:type="dc:Point" x="454" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="357" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="692" y="357" width="12" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_111l1he_di" bpmnElement="SequenceFlow_111l1he">
+ <di:waypoint xsi:type="dc:Point" x="454" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="484" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="484" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="543" y="291" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="297" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ca4brn_di" bpmnElement="SequenceFlow_0ca4brn">
+ <di:waypoint xsi:type="dc:Point" x="643" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="684" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="684" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="291" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="699" y="291" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19r2uus_di" bpmnElement="SequenceFlow_19r2uus">
+ <di:waypoint xsi:type="dc:Point" x="838" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="332" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888" y="276" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1p0v6yk_di" bpmnElement="SequenceFlow_1p0v6yk">
+ <di:waypoint xsi:type="dc:Point" x="937" y="382" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="468" />
+ <di:waypoint xsi:type="dc:Point" x="38" y="468" />
+ <di:waypoint xsi:type="dc:Point" x="38" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="95" y="547" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="498" y="476" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03i4czf_di" bpmnElement="SequenceFlow_03i4czf">
+ <di:waypoint xsi:type="dc:Point" x="962" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="453" />
+ <di:waypoint xsi:type="dc:Point" x="21" y="453" />
+ <di:waypoint xsi:type="dc:Point" x="21" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="427" width="12" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn
new file mode 100644
index 0000000..de88284
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_FhrCQG2BEeaNdqnn65BT4A" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="DoCreateVfModuleVolumeV1" name="DoCreateVfModuleVolumeV1" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_callRestAaiCloudRegion"/>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiCloudRegion" name="Call REST AAI Cloud Region" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAICloudRegion', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ScriptTask_callRestAaiCloudRegion" targetRef="ScriptTask_callRestAaiQueryGenericVnf"/>
+ <bpmn2:scriptTask id="ScriptTask_createVolGrpExistsException" name="Build Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_volGrpName404No</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('buildWorkflowException', execution, 2500, "Volume group $DCVFMODVOLV1_volumeGroupName already exists in the system.", isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_createVolGrpExistsException" targetRef="EndEvent_6"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_aaiReturnCode404" name="AAI Return Code is 404?" default="SequenceFlow_volGrpName404No">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_volGrpName404Yes</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_volGrpName404No</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_volGrpName404Yes" name="Yes" sourceRef="ExclusiveGateway_aaiReturnCode404" targetRef="ScriptTask_callRestAaiCreateVolumeGrp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_AaiReturnCode == '404'}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_volGrpName404No" name="No" sourceRef="ExclusiveGateway_aaiReturnCode404" targetRef="ScriptTask_createVolGrpExistsException"/>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiQueryGenericVnf" name="Call REST AAI Query Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAIGenericVnf', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_callRestAaiQueryGenericVnf" targetRef="ScriptTask_callRestAaiQueryVolGrpName"/>
+ <bpmn2:boundaryEvent id="BoundaryEvent_catchAaiError" name="" attachedToRef="ScriptTask_callRestAaiQueryVolGrpName">
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="BoundaryEvent_catchAaiError" targetRef="ExclusiveGateway_aaiReturnCode404"/>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiQueryVolGrpName" name="Call REST AAI Query Volume Grp Name" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_callRestAaiQueryVolGrpName" targetRef="ExclusiveGateway_aaiReturnCode404"/>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiCreateVolumeGrp" name="Call REST AAI Create Volume Group" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_volGrpName404Yes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTCreateAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_callRestAaiCreateVolumeGrp" targetRef="ScriptTask_prepareVnfAdapterCreate"/>
+ <bpmn2:callActivity id="CallActivity_callVnfAdapterCreate" name="Call VNF Adapter Create" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFMODVOLV1_createVnfARequest" target="vnfAdapterRestV1Request"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:out source="vnfAdapterRestV1Response" target="DCVFMODVOLV1_createVnfAResponse"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:out source="VNFREST_vnfAdapterStatusCode" target="DCVFMODVOLV1_createVnfAReturnCode"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="VNFREST_SuccessIndicator" target="VNFREST_SuccessIndicator"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="CallActivity_callVnfAdapterCreate" targetRef="ExclusiveGateway_isVnfAdaptyerCallSuccess"/>
+ <bpmn2:boundaryEvent id="BoundaryEvent_5" name="" attachedToRef="ScriptTask_callRestAaiVolumeGrp">
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_5"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="BoundaryEvent_5" targetRef="ExclusiveGateway_isRollbakcEnabled1"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isVnfAdaptyerCallSuccess" name="Is VNF Adapter call success?" default="SequenceFlow_vnfAdapterFail">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_vnfAdapterFail</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_vnfAdapterSuccess</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterFail" name="No" sourceRef="ExclusiveGateway_isVnfAdaptyerCallSuccess" targetRef="ExclusiveGateway_isRollbackEnabled2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterSuccess" name="Yes" sourceRef="ExclusiveGateway_isVnfAdaptyerCallSuccess" targetRef="ScriptTask_callRestAaiRequeryVolGrpNm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{VNFREST_SuccessIndicator == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiRequeryVolGrpNm" name="Call REST AAI Requery Volume Group Name" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_vnfAdapterSuccess</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="ScriptTask_callRestAaiRequeryVolGrpNm" targetRef="ScriptTask_callRestAaiVolumeGrp"/>
+ <bpmn2:boundaryEvent id="BoundaryEvent_compensateCreateVolGrp" name="" attachedToRef="ScriptTask_callRestAaiCreateVolumeGrp">
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_2" waitForCompletion="true"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:scriptTask id="ScriptTask_prepareDbInfraRequest" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('setSuccessIndicator', execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="EndEvent_1"/>
+ <bpmn2:scriptTask id="ScriptTask_deleteVolumeGroup" name="Delete Volume Group" isForCompensation="true" scriptFormat="groovy">
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTDeleteAAIVolumeGroup', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiVolumeGrp" name="Call REST AAI Update Volume Group" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTUpdateCreatedVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_callRestAaiVolumeGrp" targetRef="ScriptTask_prepareDbInfraRequest"/>
+ <bpmn2:endEvent id="EndEvent_1" name="End">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_prepareVnfAdapterCreate" name="Prepare VNF Adapter Create Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('prepareVnfAdapterCreateRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_prepareVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCreate"/>
+ <bpmn2:boundaryEvent id="BoundaryEvent_compensateVnfAdapterCreate" name="" attachedToRef="CallActivity_callVnfAdapterCreate">
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup" name="Rollback AAI Create Volume Group">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackAaiCreateVolumeGroup" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup" targetRef="EndEvent_4"/>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackVnfAdapterCreate" name="Rollback VNF Adapter Create">
+ <bpmn2:incoming>SequenceFlow_rollbackIsEnabled1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_3" activityRef="CallActivity_callVnfAdapterCreate" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="IntermediateThrowEvent_rollbackVnfAdapterCreate" targetRef="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isRollbakcEnabled1" name="Is rollback enabled?" default="SequenceFlow_rollbackIsNotEnabled1">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_rollbackIsEnabled1</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_rollbackIsNotEnabled1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsEnabled1" name="Yes" sourceRef="ExclusiveGateway_isRollbakcEnabled1" targetRef="IntermediateThrowEvent_rollbackVnfAdapterCreate">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsNotEnabled1" name="No" sourceRef="ExclusiveGateway_isRollbakcEnabled1" targetRef="EndEvent_4"/>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf" name="Rollback AAI Create Volume Group">
+ <bpmn2:incoming>SequenceFlow_rollbackIsEnabled2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackCreateVolGrpName1" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf" targetRef="EndEvent_5"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isRollbackEnabled2" name="Is rollback enabled?" default="SequenceFlow_rollbackIsNotEnabled2">
+ <bpmn2:incoming>SequenceFlow_vnfAdapterFail</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_rollbackIsEnabled2</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_rollbackIsNotEnabled2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsEnabled2" name="Yes" sourceRef="ExclusiveGateway_isRollbackEnabled2" targetRef="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsNotEnabled2" name="No" sourceRef="ExclusiveGateway_isRollbackEnabled2" targetRef="EndEvent_5"/>
+ <bpmn2:startEvent id="StartEvent_doCreateVfModuleVolume" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_doCreateVfModuleVolume" targetRef="ScriptTask_preProcessRequest"/>
+ <bpmn2:callActivity id="CallActivity_callVnfAdapterCallback" name="Call VNF Adapter Rollback" isForCompensation="true" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFMODVOLV1_rollbackVnfARequest" target="vnfAdapterRestV1Request"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:out source="vnfAdapterRestV1Response" target="CCINVOL_rollbackVnfAResponse"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ </bpmn2:extensionElements>
+ </bpmn2:callActivity>
+ <bpmn2:subProcess id="SubProcess_catchTriggeredException" name="Catch Triggered MsoException" triggeredByEvent="true">
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackAaiCreateVolume21" name="Rollback Create AAi Volume Group">
+ <bpmn2:incoming>SequenceFlow_rollbackEnabledYes91</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackdreateVolume21" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="IntermediateThrowEvent_rollbackAaiCreateVolume21" targetRef="EndEvent_3"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isRolbackEnabled90" name="Is Rollback Enabled?" default="SequenceFlow_rollbackNotEnabled92">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_rollbackEnabledYes91</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_rollbackNotEnabled92</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackEnabledYes91" name="Yes" sourceRef="ExclusiveGateway_isRolbackEnabled90" targetRef="IntermediateThrowEvent_rollbackAaiCreateVolume21">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackNotEnabled92" name="No" sourceRef="ExclusiveGateway_isRolbackEnabled90" targetRef="EndEvent_3"/>
+ <bpmn2:startEvent id="StartEvent_catchAllErrors" name="Catch MsoException">
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_4" errorRef="Error_2"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_catchAllErrors" targetRef="ExclusiveGateway_isRolbackEnabled90"/>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_rollbackNotEnabled92</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:boundaryEvent id="BoundaryEvent_catchError2" name="" attachedToRef="ScriptTask_callRestAaiRequeryVolGrpNm">
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_9"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="BoundaryEvent_catchError2" targetRef="ExclusiveGateway_isRollbakcEnabled1"/>
+ <bpmn2:endEvent id="EndEvent_4" name="End">
+ <bpmn2:incoming>SequenceFlow_rollbackIsNotEnabled1</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_5" name="End">
+ <bpmn2:incoming>SequenceFlow_rollbackIsNotEnabled2</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_6" name="End">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:textAnnotation id="TextAnnotation_2">
+ <bpmn2:text>WorkflowException should already have been created in VNF create subflow</bpmn2:text>
+ </bpmn2:textAnnotation>
+ <bpmn2:association id="Association_2" sourceRef="TextAnnotation_2" targetRef="EndEvent_5"/>
+ <bpmn2:association id="Association_3" sourceRef="BoundaryEvent_compensateCreateVolGrp" targetRef="ScriptTask_deleteVolumeGroup"/>
+ <bpmn2:association id="Association_1" sourceRef="BoundaryEvent_compensateVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCallback"/>
+ <bpmn2:textAnnotation id="TextAnnotation_1">
+ <bpmn2:text>Catch MsoException triggered by Plugin. The vnfAdapterRest subflow is currently not directly throwing the BPMNError(MSOException.</bpmn2:text>
+ </bpmn2:textAnnotation>
+ <bpmn2:association id="Association_4" sourceRef="TextAnnotation_1" targetRef="SubProcess_catchTriggeredException"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleVolumeV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_65" bpmnElement="StartEvent_doCreateVfModuleVolume">
+ <dc:Bounds height="36.0" width="36.0" x="252.0" y="129.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="253.0" y="170.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds height="80.0" width="100.0" x="420.0" y="107.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_287" bpmnElement="ScriptTask_callRestAaiCloudRegion">
+ <dc:Bounds height="80.0" width="100.0" x="588.0" y="106.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="ScriptTask_callRestAaiQueryVolGrpName">
+ <dc:Bounds height="80.0" width="100.0" x="937.0" y="107.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_247" bpmnElement="ExclusiveGateway_aaiReturnCode404" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1118.0" y="121.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="128.0" x="1079.0" y="176.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="ScriptTask_callRestAaiCreateVolumeGrp">
+ <dc:Bounds height="80.0" width="100.0" x="252.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="ScriptTask_prepareVnfAdapterCreate">
+ <dc:Bounds height="80.0" width="100.0" x="420.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_32" bpmnElement="CallActivity_callVnfAdapterCreate">
+ <dc:Bounds height="80.0" width="100.0" x="576.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="ScriptTask_callRestAaiRequeryVolGrpNm">
+ <dc:Bounds height="80.0" width="100.0" x="923.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="ScriptTask_callRestAaiVolumeGrp">
+ <dc:Bounds height="80.0" width="100.0" x="1068.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_294" bpmnElement="ScriptTask_prepareDbInfraRequest">
+ <dc:Bounds height="80.0" width="100.0" x="1068.0" y="648.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="1100.0" y="782.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1104.0" y="823.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_65" targetElement="_BPMNShape_ScriptTask_285">
+ <di:waypoint xsi:type="dc:Point" x="288.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="420.0" y="147.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="315.0" y="147.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_volGrpName404Yes" sourceElement="_BPMNShape_ExclusiveGateway_247" targetElement="_BPMNShape_ScriptTask_289">
+ <di:waypoint xsi:type="dc:Point" x="1143.0" y="171.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1144.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="811.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="301.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="302.0" y="396.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="573.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ScriptTask_290">
+ <di:waypoint xsi:type="dc:Point" x="352.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="420.0" y="436.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="383.0" y="544.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_CallActivity_32">
+ <di:waypoint xsi:type="dc:Point" x="520.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="576.0" y="436.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="545.0" y="544.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ScriptTask_287">
+ <di:waypoint xsi:type="dc:Point" x="520.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="560.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="560.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="588.0" y="146.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="557.0" y="147.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_287" targetElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="688.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="720.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="720.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="750.0" y="147.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="713.0" y="146.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_248" bpmnElement="ExclusiveGateway_isVnfAdaptyerCallSuccess" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="768.0" y="410.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="179.0" x="704.0" y="465.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_32" targetElement="_BPMNShape_ExclusiveGateway_248">
+ <di:waypoint xsi:type="dc:Point" x="676.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="715.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="715.0" y="435.0"/>
+ <di:waypoint xsi:type="dc:Point" x="768.0" y="435.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="712.0" y="435.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_296" bpmnElement="ScriptTask_createVolGrpExistsException">
+ <dc:Bounds height="80.0" width="100.0" x="1248.0" y="106.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_296" targetElement="_BPMNShape_EndEvent_241">
+ <di:waypoint xsi:type="dc:Point" x="1348.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1414.0" y="146.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1373.0" y="146.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_BoundaryEvent_62" targetElement="_BPMNShape_ExclusiveGateway_247">
+ <di:waypoint xsi:type="dc:Point" x="1037.0" y="89.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1037.0" y="59.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1143.0" y="59.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1143.0" y="121.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1050.0" y="59.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_volGrpName404No" sourceElement="_BPMNShape_ExclusiveGateway_247" targetElement="_BPMNShape_ScriptTask_296">
+ <di:waypoint xsi:type="dc:Point" x="1168.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1248.0" y="146.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1196.0" y="146.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_vnfAdapterFail" sourceElement="_BPMNShape_ExclusiveGateway_248" targetElement="_BPMNShape_ExclusiveGateway_253">
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="538.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="786.0" y="495.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_vnfAdapterSuccess" sourceElement="_BPMNShape_ExclusiveGateway_248" targetElement="_BPMNShape_ScriptTask_292">
+ <di:waypoint xsi:type="dc:Point" x="818.0" y="435.0"/>
+ <di:waypoint xsi:type="dc:Point" x="870.0" y="435.0"/>
+ <di:waypoint xsi:type="dc:Point" x="870.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="923.0" y="436.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="856.0" y="436.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_ScriptTask_293">
+ <di:waypoint xsi:type="dc:Point" x="1023.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1068.0" y="436.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1043.0" y="436.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_3" bpmnElement="TextAnnotation_2">
+ <dc:Bounds height="73.0" width="152.0" x="573.0" y="759.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_2" bpmnElement="Association_2" sourceElement="_BPMNShape_TextAnnotation_3" targetElement="_BPMNShape_EndEvent_240">
+ <di:waypoint xsi:type="dc:Point" x="725.0" y="806.0"/>
+ <di:waypoint xsi:type="dc:Point" x="775.0" y="813.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="ScriptTask_deleteVolumeGroup">
+ <dc:Bounds height="80.0" width="100.0" x="372.0" y="518.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_57" bpmnElement="BoundaryEvent_compensateCreateVolGrp">
+ <dc:Bounds height="36.0" width="36.0" x="334.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="349.0" y="499.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_3" bpmnElement="Association_3" sourceElement="_BPMNShape_BoundaryEvent_57" targetElement="_BPMNShape_ScriptTask_299">
+ <di:waypoint xsi:type="dc:Point" x="367.0" y="494.0"/>
+ <di:waypoint xsi:type="dc:Point" x="388.0" y="518.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_3" bpmnElement="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup">
+ <dc:Bounds height="36.0" width="36.0" x="1370.0" y="555.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="210.0" x="1283.0" y="596.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_60" bpmnElement="BoundaryEvent_5">
+ <dc:Bounds height="36.0" width="36.0" x="1150.0" y="378.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1165.0" y="419.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_BoundaryEvent_60" targetElement="_BPMNShape_ExclusiveGateway_252">
+ <di:waypoint xsi:type="dc:Point" x="1168.0" y="378.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1168.0" y="347.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1364.0" y="347.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1193.0" y="387.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_IntermediateThrowEvent_3" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="591.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="717.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1383.0" y="715.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_35" bpmnElement="CallActivity_callVnfAdapterCallback">
+ <dc:Bounds height="80.0" width="100.0" x="537.0" y="518.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_61" bpmnElement="BoundaryEvent_compensateVnfAdapterCreate">
+ <dc:Bounds height="36.0" width="36.0" x="583.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="598.0" y="499.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_61" targetElement="_BPMNShape_CallActivity_35">
+ <di:waypoint xsi:type="dc:Point" x="598.0" y="494.0"/>
+ <di:waypoint xsi:type="dc:Point" x="594.0" y="518.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_4" bpmnElement="IntermediateThrowEvent_rollbackVnfAdapterCreate">
+ <dc:Bounds height="36.0" width="36.0" x="1370.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="177.0" x="1300.0" y="499.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_IntermediateThrowEvent_4" targetElement="_BPMNShape_IntermediateThrowEvent_3">
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="494.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="555.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1385.0" y="534.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_ScriptTask_294">
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="476.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1115.0" y="670.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_294" targetElement="_BPMNShape_EndEvent_226">
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="728.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="782.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1115.0" y="863.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="ScriptTask_callRestAaiQueryGenericVnf">
+ <dc:Bounds height="80.0" width="100.0" x="750.0" y="106.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_311" targetElement="_BPMNShape_ScriptTask_288">
+ <di:waypoint xsi:type="dc:Point" x="850.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="937.0" y="147.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="883.0" y="147.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_62" bpmnElement="BoundaryEvent_catchAaiError">
+ <dc:Bounds height="36.0" width="36.0" x="1019.0" y="89.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1034.0" y="130.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_247">
+ <di:waypoint xsi:type="dc:Point" x="1037.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1077.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1077.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="146.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_5" bpmnElement="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf">
+ <dc:Bounds height="36.0" width="36.0" x="775.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="210.0" x="818.0" y="656.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_IntermediateThrowEvent_5" targetElement="_BPMNShape_EndEvent_240">
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="684.0"/>
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="798.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="790.0" y="732.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_isRollbakcEnabled1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1364.0" y="322.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="121.0" x="1329.0" y="377.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_rollbackIsEnabled1" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_IntermediateThrowEvent_4">
+ <di:waypoint xsi:type="dc:Point" x="1389.0" y="372.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1389.0" y="412.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="412.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1385.0" y="433.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_rollbackIsNotEnabled1" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="1414.0" y="347.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1524.0" y="347.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1524.0" y="550.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1524.0" y="735.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1406.0" y="735.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="1513.0" y="392.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_253" bpmnElement="ExclusiveGateway_isRollbackEnabled2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="768.0" y="538.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="793.0" y="593.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_rollbackIsEnabled2" sourceElement="_BPMNShape_ExclusiveGateway_253" targetElement="_BPMNShape_IntermediateThrowEvent_5">
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="588.0"/>
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="648.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_rollbackIsNotEnabled2" sourceElement="_BPMNShape_ExclusiveGateway_253" targetElement="_BPMNShape_EndEvent_240">
+ <di:waypoint xsi:type="dc:Point" x="818.0" y="563.0"/>
+ <di:waypoint xsi:type="dc:Point" x="906.0" y="563.0"/>
+ <di:waypoint xsi:type="dc:Point" x="906.0" y="815.0"/>
+ <di:waypoint xsi:type="dc:Point" x="811.0" y="816.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="768.0" y="695.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_2" bpmnElement="SubProcess_catchTriggeredException" isExpanded="true">
+ <dc:Bounds height="337.0" width="608.0" x="287.0" y="936.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_catchAllErrors">
+ <dc:Bounds height="36.0" width="36.0" x="348.0" y="1112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="127.0" x="303.0" y="1153.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_6" bpmnElement="IntermediateThrowEvent_rollbackAaiCreateVolume21">
+ <dc:Bounds height="36.0" width="36.0" x="540.0" y="1008.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="210.0" x="453.0" y="1049.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ExclusiveGateway_256">
+ <di:waypoint xsi:type="dc:Point" x="384.0" y="1130.0"/>
+ <di:waypoint xsi:type="dc:Point" x="454.0" y="1130.0"/>
+ <di:waypoint xsi:type="dc:Point" x="454.0" y="1129.0"/>
+ <di:waypoint xsi:type="dc:Point" x="532.0" y="1129.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="409.0" y="1130.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_IntermediateThrowEvent_6" targetElement="_BPMNShape_EndEvent_238">
+ <di:waypoint xsi:type="dc:Point" x="576.0" y="1026.0"/>
+ <di:waypoint xsi:type="dc:Point" x="804.0" y="1026.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="729.0" y="1026.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_4" bpmnElement="TextAnnotation_1">
+ <dc:Bounds height="97.0" width="229.0" x="123.0" y="792.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_4" bpmnElement="Association_4" sourceElement="_BPMNShape_TextAnnotation_4" targetElement="_BPMNShape_SubProcess_2">
+ <di:waypoint xsi:type="dc:Point" x="301.0" y="888.0"/>
+ <di:waypoint xsi:type="dc:Point" x="366.0" y="936.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_64" bpmnElement="BoundaryEvent_catchError2">
+ <dc:Bounds height="36.0" width="36.0" x="1005.0" y="378.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_BoundaryEvent_64" targetElement="_BPMNShape_ExclusiveGateway_252">
+ <di:waypoint xsi:type="dc:Point" x="1023.0" y="378.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1023.0" y="290.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1389.0" y="294.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1389.0" y="322.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1118.0" y="291.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_isRolbackEnabled90" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="532.0" y="1104.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="128.0" x="493.0" y="1159.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_rollbackEnabledYes91" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_IntermediateThrowEvent_6">
+ <di:waypoint xsi:type="dc:Point" x="557.0" y="1104.0"/>
+ <di:waypoint xsi:type="dc:Point" x="557.0" y="1074.0"/>
+ <di:waypoint xsi:type="dc:Point" x="558.0" y="1074.0"/>
+ <di:waypoint xsi:type="dc:Point" x="558.0" y="1044.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="564.0" y="1084.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_rollbackNotEnabled92" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_EndEvent_238">
+ <di:waypoint xsi:type="dc:Point" x="582.0" y="1129.0"/>
+ <di:waypoint xsi:type="dc:Point" x="657.0" y="1129.0"/>
+ <di:waypoint xsi:type="dc:Point" x="822.0" y="1129.0"/>
+ <di:waypoint xsi:type="dc:Point" x="822.0" y="1044.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="636.0" y="1134.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_238" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="804.0" y="1008.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="822.0" y="1049.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="1370.0" y="717.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1374.0" y="758.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_240" bpmnElement="EndEvent_5">
+ <dc:Bounds height="36.0" width="36.0" x="775.0" y="798.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="793.0" y="839.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_241" bpmnElement="EndEvent_6">
+ <dc:Bounds height="36.0" width="36.0" x="1414.0" y="128.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1418.0" y="169.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn
new file mode 100644
index 0000000..91fca3d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn
@@ -0,0 +1,475 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateVnf" name="DoCreateVnf" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="callGetService" />
+ <bpmn2:scriptTask id="buildWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>notFound</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="buildWorkflowException" targetRef="EndEvent_1" />
+ <bpmn2:callActivity id="callGetService" name="Get&#10;&#10;Service&#10;&#10;Instance" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_serviceInstanceId" target="GENGS_serviceInstanceId" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
+ <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
+ <camunda:out source="GENGS_serviceInstance" target="CRTVI_serviceInstance" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="GENGS_type" target="GENGS_type" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="callGetService" targetRef="serviceInstanceFound" />
+ <bpmn2:exclusiveGateway id="serviceInstanceFound" name="Service Instance Found?" default="notFound">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>notFound</bpmn2:outgoing>
+ <bpmn2:outgoing>found</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceInstanceFound" targetRef="buildWorkflowException" />
+ <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="serviceInstanceFound" targetRef="callGetVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true && execution.getVariable("GENGS_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="vnfExist" name="Vnf Already Exist?" default="vnfExistYes">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>vnfExistYes</bpmn2:outgoing>
+ <bpmn2:outgoing>vnfExistNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="vnfExistYes" name="Yes" sourceRef="vnfExist" targetRef="vnfExistWorkflowException" />
+ <bpmn2:sequenceFlow id="vnfExistNo" name="No" sourceRef="vnfExist" targetRef="prepareCreateGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_FoundIndicator" ) == false && execution.getVariable("GENGV_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="callGetVnf" name="Get&#10;&#10;Generic Vnf" calledElement="GenericGetVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_vnfName" target="GENGV_vnfName" />
+ <camunda:in source="DoCVNF_type" target="GENGV_type" />
+ <camunda:out source="GENGV_vnf" target="CRTVI_genericVnf" />
+ <camunda:out source="GENGV_FoundIndicator" target="GENGV_FoundIndicator" />
+ <camunda:out source="GENGV_SuccessIndicator" target="GENGV_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>found</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="callGetVnf" targetRef="vnfExist" />
+ <bpmn2:scriptTask id="vnfExistWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>vnfExistYes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 5000, "Generic Vnf Already Exist.")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="vnfExistWorkflowException" targetRef="EndEvent_2" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="prepareCreateGenericVnf" name="Prepare&#10;&#10;Create Vnf Payload" scriptFormat="groovy">
+ <bpmn2:incoming>vnfExistNo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.prepareCreateGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareCreateGenericVnf" targetRef="callPutVnf" />
+ <bpmn2:callActivity id="callPutVnf" name="Create (Put)&#10;&#10;Generic Vnf" calledElement="GenericPutVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_genericVnfPayload" target="GENPV_vnfPayload" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DoCVNF_vnfId" target="GENPV_vnfId" />
+ <camunda:out source="GENPV_SuccessIndicator" target="GENPV_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="DoCVNF_type" target="GENPV_type" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1acnwwu</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="processJavaError" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="processJavaError" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_2" targetRef="processJavaError" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_15z3gpq</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0ay5l4b</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q6udwm" sourceRef="preProcessSDNCAssignRequest" targetRef="callSDNCAdapterVNFTopologyAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="callSDNCAdapterVNFTopologyAssign" targetRef="postProcessSDNCAssignRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0c5h00o" sourceRef="postProcessSDNCAssignRequest" targetRef="preProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1lalmvp" sourceRef="preProcessSDNCActivateRequest" targetRef="callSDNCAdapterVNFTopologyActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="callSDNCAdapterVNFTopologyActivate" targetRef="postProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15z3gpq" sourceRef="postProcessSDNCActivateRequest" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1acnwwu" sourceRef="callPutVnf" targetRef="ExclusiveGateway_045rm8i" />
+ <bpmn2:scriptTask id="preProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ttqcwx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q6udwm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.preProcessSDNCAssignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="callSDNCAdapterVNFTopologyAssign" name="Call SDNC Adapter VNF Topology Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DoCVNF_assignSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1q6udwm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15knw0q</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCAssignRequest" name="PostProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0c5h00o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DoCVNF_assignSDNCAdapterResponse")
+
+def createVnfInfra = new DoCreateVnf()
+createVnfInfra.validateSDNCResponse(execution, response, "assign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="preProcessSDNCActivateRequest" name="PreProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0c5h00o</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lalmvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.preProcessSDNCActivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="callSDNCAdapterVNFTopologyActivate" name="Call SDNC Adapter VNF Topology Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-reqeuest-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DoCVNF_activateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lalmvp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eb41vb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCActivateRequest" name="PostProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eb41vb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15z3gpq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DoCVNF_assignSDNCAdapterResponse")
+
+def createVnfInfra = new DoCreateVnf()
+createVnfInfra.validateSDNCResponse(execution, response, "activate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_045rm8i" name="Is SDNC Interaction Enabled?" default="SequenceFlow_0ay5l4b">
+ <bpmn2:incoming>SequenceFlow_1acnwwu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ttqcwx</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ay5l4b</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ttqcwx" name="yes" sourceRef="ExclusiveGateway_045rm8i" targetRef="preProcessSDNCAssignRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("SDNCInteractionEnabled" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ay5l4b" name="no" sourceRef="ExclusiveGateway_045rm8i" targetRef="EndEvent_3" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="96" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="114" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="216" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ScriptTask_285">
+ <di:waypoint xsi:type="dc:Point" x="132" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="216" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="240" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285">
+ <di:waypoint xsi:type="dc:Point" x="316" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="406" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="361" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="callGetService">
+ <dc:Bounds x="406" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="serviceInstanceFound" isMarkerVisible="true">
+ <dc:Bounds x="642" y="214" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="678" y="244" width="148" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229">
+ <di:waypoint xsi:type="dc:Point" x="506" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="642" y="239" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="574" y="224.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">
+ <dc:Bounds x="720" y="115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293">
+ <di:waypoint xsi:type="dc:Point" x="667" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="667" y="155" />
+ <di:waypoint xsi:type="dc:Point" x="720" y="155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="174" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
+ <dc:Bounds x="876" y="137" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="894" y="178" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_EndEvent_225">
+ <di:waypoint xsi:type="dc:Point" x="820" y="155" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="846" y="155" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_CallActivity_60">
+ <di:waypoint xsi:type="dc:Point" x="667" y="264" />
+ <di:waypoint xsi:type="dc:Point" x="667" y="328" />
+ <di:waypoint xsi:type="dc:Point" x="720" y="328" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="282" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="callGetVnf">
+ <dc:Bounds x="720" y="288" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_232" bpmnElement="vnfExist" isMarkerVisible="true">
+ <dc:Bounds x="854" y="302" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="332" width="114" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_CallActivity_60" targetElement="_BPMNShape_ExclusiveGateway_232">
+ <di:waypoint xsi:type="dc:Point" x="820" y="328" />
+ <di:waypoint xsi:type="dc:Point" x="854" y="327" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="804" y="330" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="vnfExistWorkflowException">
+ <dc:Bounds x="926" y="367" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="prepareCreateGenericVnf">
+ <dc:Bounds x="935" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="vnfExistYes" sourceElement="_BPMNShape_ExclusiveGateway_232" targetElement="_BPMNShape_ScriptTask_299">
+ <di:waypoint xsi:type="dc:Point" x="879" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="367" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="vnfExistNo" sourceElement="_BPMNShape_ExclusiveGateway_232" targetElement="_BPMNShape_ScriptTask_300">
+ <di:waypoint xsi:type="dc:Point" x="879" y="302" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="935" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="254" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_227" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1092" y="389" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1110" y="430" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_299" targetElement="_BPMNShape_EndEvent_227">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="1092" y="407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1034" y="407" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1126" y="537" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1144" y="578" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300" targetElement="_BPMNShape_CallActivity_61">
+ <di:waypoint xsi:type="dc:Point" x="1035" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1080" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1058" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_61" bpmnElement="callPutVnf">
+ <dc:Bounds x="1080" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_32" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="109" y="668" width="313" height="169" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_76" bpmnElement="StartEvent_2">
+ <dc:Bounds x="133" y="735" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="776" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="processJavaError">
+ <dc:Bounds x="216" y="713" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_4">
+ <dc:Bounds x="361" y="735" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="379" y="776" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_76" targetElement="_BPMNShape_ScriptTask_308">
+ <di:waypoint xsi:type="dc:Point" x="169" y="753" />
+ <di:waypoint xsi:type="dc:Point" x="216" y="753" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="190" y="753" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_EndEvent_234">
+ <di:waypoint xsi:type="dc:Point" x="316" y="753" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="753" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="336" y="753" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
+ <di:waypoint xsi:type="dc:Point" x="306" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="346" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="326" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15knw0q_di" bpmnElement="SequenceFlow_15knw0q">
+ <di:waypoint xsi:type="dc:Point" x="446" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="470" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o">
+ <di:waypoint xsi:type="dc:Point" x="593" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="617" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lalmvp_di" bpmnElement="SequenceFlow_1lalmvp">
+ <di:waypoint xsi:type="dc:Point" x="740" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="794" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="767" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb">
+ <di:waypoint xsi:type="dc:Point" x="894" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="949" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="922" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15z3gpq_di" bpmnElement="SequenceFlow_15z3gpq">
+ <di:waypoint xsi:type="dc:Point" x="1049" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1126" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1088" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1acnwwu_di" bpmnElement="SequenceFlow_1acnwwu">
+ <di:waypoint xsi:type="dc:Point" x="1180" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1288" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1234" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01h1rx2_di" bpmnElement="preProcessSDNCAssignRequest">
+ <dc:Bounds x="206" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0p5ncd0_di" bpmnElement="callSDNCAdapterVNFTopologyAssign">
+ <dc:Bounds x="346" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qa39wn_di" bpmnElement="postProcessSDNCAssignRequest">
+ <dc:Bounds x="493" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rr2xrc_di" bpmnElement="preProcessSDNCActivateRequest">
+ <dc:Bounds x="640" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="callSDNCAdapterVNFTopologyActivate">
+ <dc:Bounds x="794" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCActivateRequest">
+ <dc:Bounds x="949" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_045rm8i_di" bpmnElement="ExclusiveGateway_045rm8i" isMarkerVisible="true">
+ <dc:Bounds x="1288" y="215" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1286" y="163" width="54" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ttqcwx_di" bpmnElement="SequenceFlow_0ttqcwx">
+ <di:waypoint xsi:type="dc:Point" x="1313" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="1313" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="106" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="106" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="460" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ay5l4b_di" bpmnElement="SequenceFlow_0ay5l4b">
+ <di:waypoint xsi:type="dc:Point" x="1338" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1162" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1400" y="397.5" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
new file mode 100644
index 0000000..58a88c2
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
+ <bpmn:process id="DoCreateVnfAndModules" name="DoCreateVnfAndModules" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_0o4vuzt</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="PreProcessRequest" name="PreProcess Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0o4vuzt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1xd3ri5</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CreateBaseVfModule" name="Create Base VF Module" calledElement="DoCreateVfModule">
+ <bpmn:extensionElements>
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="baseVfModuleName" target="vfModuleName" />
+ <camunda:in source="vfModuleType" target="vfModuleType" />
+ <camunda:in source="volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="baseVfModuleId" target="vfModuleId" />
+ <camunda:in source="baseVfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="&#34;true&#34;" target="isBaseVfModule" />
+ <camunda:in source="asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:out source="vfModuleId" target="createdVfModuleId" />
+ <camunda:out source="vfModuleOutputParams" target="createdVfModuleOutputParams" />
+ <camunda:out source="RollbackData" target="RollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1hf7k7q</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_02oe9wx</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0o4vuzt" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn:sequenceFlow id="SequenceFlow_1xd3ri5" sourceRef="PreProcessRequest" targetRef="CreateVNF" />
+ <bpmn:callActivity id="CreateAddOnVfModule" name="Create Add-On VF Module" calledElement="DoCreateVfModule">
+ <bpmn:extensionElements>
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="addOnVfModuleName" target="vfModuleName" />
+ <camunda:in source="vfModuleType" target="vfModuleType" />
+ <camunda:in source="addOnVfModuleId" target="vfModuleId" />
+ <camunda:in source="volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="addOnVfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="&#34;false&#34;" target="isBaseVfModule" />
+ <camunda:in source="asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:out source="vfModuleId" target="createdVfModuleId" />
+ <camunda:out source="vfModuleOutputParameters" target="createdVfModuleOutputParameters" />
+ <camunda:out source="RollbackData" target="RollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1lh21yl</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1llbx0k</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_1lfmdks" name="Validate Create Add-On VF Module Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1llbx0k</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1mguf2m</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_0v6povc">
+ <bpmn:incoming>SequenceFlow_132bohl</bpmn:incoming>
+ <bpmn:terminateEventDefinition />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1llbx0k" sourceRef="CreateAddOnVfModule" targetRef="Task_1lfmdks" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1vyqr5o" name="Are there more add-on modules?" default="SequenceFlow_132bohl">
+ <bpmn:extensionElements>
+ <camunda:properties>
+ <camunda:property />
+ </camunda:properties>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_02oe9wx</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_07gl6gw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_132bohl</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0jz6bqn</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_132bohl" name="No" sourceRef="ExclusiveGateway_1vyqr5o" targetRef="EndEvent_0v6povc" />
+ <bpmn:callActivity id="CreateVNF" name="Create VNF" calledElement="DoCreateVnf">
+ <bpmn:extensionElements>
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="cloudConfiguration" target="cloudConfiguration" />
+ <camunda:in source="vnfInputParameters" target="vnfInputParameters" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:out source="vnfId" target="vnfId" />
+ <camunda:out source="vnfOutputParams" target="vnfOutputParams" />
+ <camunda:out source="RollbackData" target="RollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1xd3ri5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_08i3uo6</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="PreProcessAddOnModule" name="PreProcess Add-On Module" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0jz6bqn</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12x4dvf</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.preProcessAddOnModule(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="QueryCatalogDB" name="Query Catalog DB for VF Modules" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_08i3uo6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ifw9tw</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_08i3uo6" sourceRef="CreateVNF" targetRef="QueryCatalogDB" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1hx9s0y" name="Less than initialCount?" default="SequenceFlow_1vrogpr">
+ <bpmn:incoming>SequenceFlow_1mguf2m</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_12x4dvf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0kld3qt</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1vrogpr</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0jz6bqn" name="yes" sourceRef="ExclusiveGateway_1vyqr5o" targetRef="PreProcessAddOnModule">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[![CDATA[#{execution.getVariable("addOnModulesDeployed") < execution.getVariable("addOnModulesToDeploy")}]]]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0kld3qt" name="yes" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="GenerateAddOnModuleName">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[![CDATA[#{execution.getVariable("instancesOfThisModuleDeployed") < execution.getVariable("initialCount")}]]]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1mguf2m" sourceRef="Task_1lfmdks" targetRef="ExclusiveGateway_1hx9s0y" />
+ <bpmn:sequenceFlow id="SequenceFlow_1vrogpr" name="no" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="FinishProcessingInitialCountDeployment" />
+ <bpmn:sequenceFlow id="SequenceFlow_07gl6gw" sourceRef="FinishProcessingInitialCountDeployment" targetRef="ExclusiveGateway_1vyqr5o" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ifw9tw" sourceRef="QueryCatalogDB" targetRef="GenerateBaseModuleName" />
+ <bpmn:sequenceFlow id="SequenceFlow_1hf7k7q" sourceRef="GenerateBaseModuleName" targetRef="CreateBaseVfModule" />
+ <bpmn:callActivity id="GenerateBaseModuleName" name="Generate Base Module Name" calledElement="GenerateVfModuleName">
+ <bpmn:extensionElements>
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="baseVfModuleLabel" target="vfModuleLabel" />
+ <camunda:in source="basePersonaModelId" target="personaModelId" />
+ <camunda:out source="vfModuleName" target="baseVfModuleName" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1ifw9tw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1hf7k7q</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:callActivity id="GenerateAddOnModuleName" name="Generate Add-On Module Name" calledElement="GenerateVfModuleName">
+ <bpmn:extensionElements>
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="addOnVfModuleLabel" target="vfModuleLabel" />
+ <camunda:in source="addOnPersonaModelId" target="personaModelId" />
+ <camunda:out source="vfModuleName" target="addOnVfModuleName" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0kld3qt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1lh21yl</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1lh21yl" sourceRef="GenerateAddOnModuleName" targetRef="CreateAddOnVfModule" />
+ <bpmn:sequenceFlow id="SequenceFlow_02oe9wx" sourceRef="CreateBaseVfModule" targetRef="ExclusiveGateway_1vyqr5o" />
+ <bpmn:sequenceFlow id="SequenceFlow_12x4dvf" sourceRef="PreProcessAddOnModule" targetRef="ExclusiveGateway_1hx9s0y" />
+ <bpmn:scriptTask id="FinishProcessingInitialCountDeployment" name="Finish Processing Initial Count Deployment" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1vrogpr</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07gl6gw</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.finisthProcessingInitialCountDeployment(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModules">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="170" y="183" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1tco8kw_di" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="256" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1sztzw8_di" bpmnElement="CreateBaseVfModule">
+ <dc:Bounds x="888" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o4vuzt_di" bpmnElement="SequenceFlow_0o4vuzt">
+ <di:waypoint xsi:type="dc:Point" x="188" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="222" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xd3ri5_di" bpmnElement="SequenceFlow_1xd3ri5">
+ <di:waypoint xsi:type="dc:Point" x="356" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="430" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="393" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0auiwq0_di" bpmnElement="CreateAddOnVfModule">
+ <dc:Bounds x="1626" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1eeaxqn_di" bpmnElement="Task_1lfmdks">
+ <dc:Bounds x="1765" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1h41bs7_di" bpmnElement="EndEvent_0v6povc">
+ <dc:Bounds x="1888" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1906" y="183" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1llbx0k_di" bpmnElement="SequenceFlow_1llbx0k">
+ <di:waypoint xsi:type="dc:Point" x="1726" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1765" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1746" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1vyqr5o_di" bpmnElement="ExclusiveGateway_1vyqr5o" isMarkerVisible="true">
+ <dc:Bounds x="1043" y="140" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1027" y="190" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_132bohl_di" bpmnElement="SequenceFlow_132bohl">
+ <di:waypoint xsi:type="dc:Point" x="1068" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1068" y="36" />
+ <di:waypoint xsi:type="dc:Point" x="1906" y="36" />
+ <di:waypoint xsi:type="dc:Point" x="1906" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1488" y="21" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0zr4ioh_di" bpmnElement="CreateVNF">
+ <dc:Bounds x="430" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0tknqn1_di" bpmnElement="PreProcessAddOnModule">
+ <dc:Bounds x="1177" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1u6qcio_di" bpmnElement="QueryCatalogDB">
+ <dc:Bounds x="590" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08i3uo6_di" bpmnElement="SequenceFlow_08i3uo6">
+ <di:waypoint xsi:type="dc:Point" x="530" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="560" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hx9s0y_di" bpmnElement="ExclusiveGateway_1hx9s0y" isMarkerVisible="true">
+ <dc:Bounds x="1370" y="140" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1366" y="190" width="58" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jz6bqn_di" bpmnElement="SequenceFlow_0jz6bqn">
+ <di:waypoint xsi:type="dc:Point" x="1093" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1135" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1135" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1175" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1095" y="147.2226828816689" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kld3qt_di" bpmnElement="SequenceFlow_0kld3qt">
+ <di:waypoint xsi:type="dc:Point" x="1395" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1395" y="89" />
+ <di:waypoint xsi:type="dc:Point" x="1478" y="89" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1411" y="96" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mguf2m_di" bpmnElement="SequenceFlow_1mguf2m">
+ <di:waypoint xsi:type="dc:Point" x="1815" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1815" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1420" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1830" y="151" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vrogpr_di" bpmnElement="SequenceFlow_1vrogpr">
+ <di:waypoint xsi:type="dc:Point" x="1395" y="190" />
+ <di:waypoint xsi:type="dc:Point" x="1395" y="221" />
+ <di:waypoint xsi:type="dc:Point" x="1395" y="221" />
+ <di:waypoint xsi:type="dc:Point" x="1395" y="258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1404" y="221" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07gl6gw_di" bpmnElement="SequenceFlow_07gl6gw">
+ <di:waypoint xsi:type="dc:Point" x="1345" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1069" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1068" y="190" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1207" y="283" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ifw9tw_di" bpmnElement="SequenceFlow_1ifw9tw">
+ <di:waypoint xsi:type="dc:Point" x="690" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="740" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="715" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hf7k7q_di" bpmnElement="SequenceFlow_1hf7k7q">
+ <di:waypoint xsi:type="dc:Point" x="840" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="888" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="864" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0rz8zl9_di" bpmnElement="GenerateBaseModuleName">
+ <dc:Bounds x="740" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0otq8mo_di" bpmnElement="GenerateAddOnModuleName">
+ <dc:Bounds x="1478" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lh21yl_di" bpmnElement="SequenceFlow_1lh21yl">
+ <di:waypoint xsi:type="dc:Point" x="1578" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1626" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1602" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_02oe9wx_di" bpmnElement="SequenceFlow_02oe9wx">
+ <di:waypoint xsi:type="dc:Point" x="988" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1015" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1015" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1030" y="165" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12x4dvf_di" bpmnElement="SequenceFlow_12x4dvf">
+ <di:waypoint xsi:type="dc:Point" x="1277" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1370" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1324" y="140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_144n0mg_di" bpmnElement="FinishProcessingInitialCountDeployment">
+ <dc:Bounds x="1345" y="258" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn
new file mode 100644
index 0000000..84b6d68
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn
@@ -0,0 +1,933 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteNetworkInstance" name="DoDeleteNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="deleteNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="deleteNetwork_startEvent" targetRef="ScriptTask_01w2cd9" />
+ <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0msqfwu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def callRESTDeleteAAI = new DoDeleteNetworkInstance()
+callRESTDeleteAAI.callRESTQueryAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="isRelationshipExists_ExclusiveGateway" />
+ <bpmn2:callActivity id="callDeleteSDNCAdapter_CallActivity" name="Call SDNC Unassign Adapter V1 Sub-process" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNWKI_deleteSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKI_deleteSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_sdncReturnCode" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1pdp4d2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callDeleteSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1jnva78</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def validateSDNCResponse = new DoDeleteNetworkInstance()
+validateSDNCResponse.validateSDNCResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoDeleteOk_ExclusiveGateway" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="validateSDNCResponse_ScriptTask">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_87" errorRef="Error_3" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="BoundaryEvent_1" targetRef="sndcError_EndEvent" />
+ <bpmn2:exclusiveGateway id="isSdncTopoDeleteOk_ExclusiveGateway" name="Is SDNC Unassign Ok?" default="sdncTopoDeleteNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>sdncTopoDeleteNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncTopoDeleteYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:incoming>sdncTopoDeleteNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="sdncTopoDeleteNo_SequenceFlow" name="No" sourceRef="isSdncTopoDeleteOk_ExclusiveGateway" targetRef="sndcError_EndEvent" />
+ <bpmn2:sequenceFlow id="sdncTopoDeleteYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoDeleteOk_ExclusiveGateway" targetRef="ScriptTask_01xjfhu">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception" triggeredByEvent="true">
+ <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_1a51h25</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_3" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_1yvnovn</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_00lgy9f" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1loz6nk</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1nl99y6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1yvnovn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1a51h25" sourceRef="subProcessStart_StartEvent" targetRef="Task_0026x4v" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yvnovn" sourceRef="ScriptTask_00lgy9f" targetRef="EndEvent_2" />
+ <bpmn2:scriptTask id="ScriptTask_0n4do0p" name="Prepare SDNC RPC Rollback Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0jb7rws</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wif0e5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.prepareRpcSDNCDeactivateRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1gix2o6" name="Is Rollback On?">
+ <bpmn2:incoming>SequenceFlow_021b0sz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0tiz0kk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1suj1nc</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tiz0kk" name="Yes" sourceRef="ExclusiveGateway_1gix2o6" targetRef="ExclusiveGateway_1x7o5bo">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1suj1nc" name="No" sourceRef="ExclusiveGateway_1gix2o6" targetRef="ExclusiveGateway_01xin16" />
+ <bpmn2:callActivity id="CallActivity_0lku52d" name="DoDelete NetworkInstanceRollback&#10;" calledElement="DoDeleteNetworkInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="workflowException" target="workflowException" />
+ <camunda:in source="SavedWorkflowException1" target="SavedWorkflowException1" />
+ <camunda:out source="wasDeleted" target="wasDeleted" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_147vc14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1loz6nk</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1loz6nk" sourceRef="CallActivity_0lku52d" targetRef="ScriptTask_00lgy9f" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1x7o5bo" name="is SDNC Rollback Needed? " default="SequenceFlow_1raa09h">
+ <bpmn2:incoming>SequenceFlow_0tiz0kk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0jb7rws</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1raa09h</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0jb7rws" name="Yes" sourceRef="ExclusiveGateway_1x7o5bo" targetRef="ScriptTask_0n4do0p">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isSdncDeactivateRollbackNeeded") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_01xin16">
+ <bpmn2:incoming>SequenceFlow_1suj1nc</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1raa09h</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1nl99y6</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1raa09h" sourceRef="ExclusiveGateway_1x7o5bo" targetRef="ExclusiveGateway_01xin16" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1nl99y6" sourceRef="ExclusiveGateway_01xin16" targetRef="ScriptTask_00lgy9f" />
+ <bpmn2:scriptTask id="ScriptTask_0n4ya47" name="Prepare RollbackData" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1wif0e5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_147vc14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.prepareRollbackData(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1wif0e5" sourceRef="ScriptTask_0n4do0p" targetRef="ScriptTask_0n4ya47" />
+ <bpmn2:sequenceFlow id="SequenceFlow_147vc14" sourceRef="ScriptTask_0n4ya47" targetRef="CallActivity_0lku52d" />
+ <bpmn2:sequenceFlow id="SequenceFlow_021b0sz" sourceRef="Task_0026x4v" targetRef="ExclusiveGateway_1gix2o6" />
+ <bpmn2:scriptTask id="Task_0026x4v" name="Set Exception Flag" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1a51h25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_021b0sz</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.setExceptionFlag(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="isAAIQueryOk_ExclusiveGateway_2" name="Is AAI Query Ok?" default="querySuccessNo_SequenceFlow">
+ <bpmn2:incoming>isRelationshipExistNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>querySuccessYes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>querySuccessNo_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="querySuccessYes_SequenceFlow" name="Yes" sourceRef="isAAIQueryOk_ExclusiveGateway_2" targetRef="isResponseEmpty_ExclusiveGateway_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isAAIGood") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="querySuccessNo_SequenceFlow" name="No" sourceRef="isAAIQueryOk_ExclusiveGateway_2" targetRef="isReturnCode404_ExclusiveGateway" />
+ <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Return Code 404?" default="isReturnCode404_No_SequenceFlow">
+ <bpmn2:incoming>querySuccessNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="No" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="aai_Error_EndEvent" />
+ <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="silentSucces_InclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_aaiReturnCode" ) == "404"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="aai_Error_EndEvent" name="AAI Error">
+ <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="isResponseEmpty_ExclusiveGateway_2" name="Is Resp Empty?" default="isResponseEmptyNo_SequenceFlow">
+ <bpmn2:incoming>querySuccessYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isResponseEmptyNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isResponseEmptyYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isResponseEmptyNo_SequenceFlow" name="No" sourceRef="isResponseEmpty_ExclusiveGateway_2" targetRef="callRESTQueryCloudRegion_ScriptTask" />
+ <bpmn2:sequenceFlow id="isResponseEmptyYes_SequenceFlow" name="Yes" sourceRef="isResponseEmpty_ExclusiveGateway_2" targetRef="silentSucces_InclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isSilentSuccess") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:inclusiveGateway id="silentSucces_InclusiveGateway" name="Joint">
+ <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isResponseEmptyYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>silentSuccess_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="silentSuccess_SequenceFlow" name="Silent Success" sourceRef="silentSucces_InclusiveGateway" targetRef="ScriptTask_0dtzzht" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_0f25bme</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">
+ <bpmn2:incoming>isResponseEmptyNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteNetMod = new DoDeleteNetworkInstance()
+deleteNetMod.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask" />
+ <bpmn2:exclusiveGateway id="isRelationshipExists_ExclusiveGateway" name="Is Relationship Exists?" default="isRelationshipExistNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>isRelationshipExistNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isRelationshipExistYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isRelationshipExistNo_SequenceFlow" name="No" sourceRef="isRelationshipExists_ExclusiveGateway" targetRef="isAAIQueryOk_ExclusiveGateway_2" />
+ <bpmn2:sequenceFlow id="isRelationshipExistYes_SequenceFlow" name="Yes" sourceRef="isRelationshipExists_ExclusiveGateway" targetRef="relationshipError_EndEvent">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isVfRelationshipExist") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="relationshipError_EndEvent" name="Relationship Error">
+ <bpmn2:incoming>isRelationshipExistYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_1pbgnr2</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0r3pvf8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pdp4d2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def prepareSDNCRequest = new DoDeleteNetworkInstance()
+prepareSDNCRequest.prepareSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="validateDeletePONetwork_ScriptTask" name="Validate Delete PO Network" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def validateNetworkResponse = new DoDeleteNetworkInstance()
+validateNetworkResponse.validateNetworkResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="validateDeletePONetwork_ScriptTask" targetRef="ExclusiveGateway_02t94x3" />
+ <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Network Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def prepareNetworkRequest = new DoDeleteNetworkInstance()
+prepareNetworkRequest.prepareNetworkRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="sendRequestToNewworkAdapater_ScriptTask" />
+ <bpmn2:scriptTask id="sendRequestToNewworkAdapater_ScriptTask" name="Send Request to Network Adapter" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def prepareNetworkRequest = new DoDeleteNetworkInstance()
+prepareNetworkRequest.sendRequestToVnfAdapter(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="sendRequestToNewworkAdapater_ScriptTask" targetRef="validateDeletePONetwork_ScriptTask" />
+ <bpmn2:subProcess id="SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_91" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="unexpectedError_DeleteNetworkInfra_ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def deleteNetMod = new DoDeleteNetworkInstance()
+deleteNetMod.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_1" targetRef="unexpectedError_DeleteNetworkInfra_ScriptTask_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="unexpectedError_DeleteNetworkInfra_ScriptTask_1" targetRef="EndEvent_4" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="ScriptTask_01xjfhu" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>sdncTopoDeleteYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pbgnr2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1pbgnr2" sourceRef="ScriptTask_01xjfhu" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1pdp4d2" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callDeleteSDNCAdapter_CallActivity" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_02t94x3" name="is &#39;1702&#39; SNDC Call?" default="SequenceFlow_0r3pvf8">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0r3pvf8</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0kqnddy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0r3pvf8" name="No" sourceRef="ExclusiveGateway_02t94x3" targetRef="prepareSDNCTopoRequest_ScriptTask" />
+ <bpmn2:scriptTask id="ScriptTask_0iqzbz6" name="Prepare RSRC SDNC Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0f13b17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zlbzad</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def prepareSDNCRequest = new DoDeleteNetworkInstance()
+prepareSDNCRequest.prepareRpcSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_03wzdas" name="Call RSRC SDNC Unassign Adapter V1 " calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNWKI_deleteSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKI_deleteSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_sdncReturnCode" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0zlbzad</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jnva78</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jnva78" sourceRef="CallActivity_03wzdas" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0zlbzad" sourceRef="ScriptTask_0iqzbz6" targetRef="CallActivity_03wzdas" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0kqnddy" name="Yes" sourceRef="ExclusiveGateway_02t94x3" targetRef="ScriptTask_1wf192s">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_01w2cd9" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0msqfwu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0msqfwu" sourceRef="ScriptTask_01w2cd9" targetRef="callAAIQuery_scriptTask" />
+ <bpmn2:scriptTask id="ScriptTask_0dtzzht" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>silentSuccess_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0f25bme</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0f25bme" sourceRef="ScriptTask_0dtzzht" targetRef="EndEvent_1" />
+ <bpmn2:callActivity id="CallActivity_0wyu1mx" name="Call RSRC SDNC Deactivate Adapter" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNWKI_deactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_deactivateSdncReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKI_deactivateSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1o088sy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1i3193l</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1wf192s" name="Prepare SDNC RSRC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0kqnddy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1o088sy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.prepareRpcSDNCDeactivate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1o088sy" sourceRef="ScriptTask_1wf192s" targetRef="CallActivity_0wyu1mx" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_024qvqd" default="SequenceFlow_1qyo7ot">
+ <bpmn2:incoming>SequenceFlow_0n8sf23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qyo7ot</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0f13b17</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_00vwf2h" name="Validate Deactivate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1i3193l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0n8sf23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.validateRpcSDNCDeactivateResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:boundaryEvent id="BoundaryEvent_0un9yyu" name="" attachedToRef="ScriptTask_00vwf2h">
+ <bpmn2:outgoing>SequenceFlow_08hus4u</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_3" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1i3193l" sourceRef="CallActivity_0wyu1mx" targetRef="ScriptTask_00vwf2h" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n8sf23" sourceRef="ScriptTask_00vwf2h" targetRef="ExclusiveGateway_024qvqd" />
+ <bpmn2:sequenceFlow id="SequenceFlow_08hus4u" sourceRef="BoundaryEvent_0un9yyu" targetRef="EndEvent_1l210ae" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qyo7ot" name="No" sourceRef="ExclusiveGateway_024qvqd" targetRef="EndEvent_1l210ae" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0f13b17" name="Yes" sourceRef="ExclusiveGateway_024qvqd" targetRef="ScriptTask_0iqzbz6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_1l210ae">
+ <bpmn2:incoming>SequenceFlow_08hus4u</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1qyo7ot</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_3" />
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmn2:error id="Error_3" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">
+ <dc:Bounds x="444" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="226" width="49" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47">
+ <di:waypoint xsi:type="dc:Point" x="480" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="597" y="204" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="539" y="188.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
+ <dc:Bounds x="816" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_62" bpmnElement="isAAIQueryOk_ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="984" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="966" y="44" width="87" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_224">
+ <di:waypoint xsi:type="dc:Point" x="866" y="163" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="122" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="862" y="135" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateDeletePONetwork_ScriptTask">
+ <dc:Bounds x="1131" y="509" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="querySuccessYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_65">
+ <di:waypoint xsi:type="dc:Point" x="1009" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="1009" y="177" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1008" y="120" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="querySuccessNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_64">
+ <di:waypoint xsi:type="dc:Point" x="1034" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1126" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="97" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1126" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1115" y="41" width="77" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_EndEvent_118">
+ <di:waypoint xsi:type="dc:Point" x="1176" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="98" />
+ <di:waypoint xsi:type="dc:Point" x="1281" y="98" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1176" y="97" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_InclusiveGateway_2">
+ <di:waypoint xsi:type="dc:Point" x="1151" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="1151" y="177" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1152" y="120" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_65" bpmnElement="isResponseEmpty_ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="984" y="177" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1016" y="163" width="95" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="isResponseEmptyNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_65" targetElement="_BPMNShape_ScriptTask_250">
+ <di:waypoint xsi:type="dc:Point" x="1009" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1010" y="269" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1016" y="227" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="isResponseEmptyYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_65" targetElement="_BPMNShape_InclusiveGateway_2">
+ <di:waypoint xsi:type="dc:Point" x="1034" y="202" />
+ <di:waypoint xsi:type="dc:Point" x="1126" y="202" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1034" y="202" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">
+ <dc:Bounds x="1281" y="80" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1270" y="121" width="59" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_66" bpmnElement="prepareNetworkRequest_ScriptTask">
+ <dc:Bounds x="1131" y="269" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_66" targetElement="_BPMNShape_ScriptTask_242">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="349" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="387" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1196" y="368" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
+ <dc:Bounds x="981" y="718" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_67">
+ <di:waypoint xsi:type="dc:Point" x="1180" y="589" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1181" y="603.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds x="-1" y="576" width="902" height="448" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds x="49" y="896" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="43" y="938" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoDeleteOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1156" y="997" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1070" y="1010" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoDeleteNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1206" y="1022" />
+ <di:waypoint xsi:type="dc:Point" x="1244" y="1022" />
+ <di:waypoint xsi:type="dc:Point" x="1244" y="1022" />
+ <di:waypoint xsi:type="dc:Point" x="1278" y="1022" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1206" y="1029.0213702128942" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoDeleteYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="1047" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="1097" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1187" y="1053.3920491579422" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
+ <dc:Bounds x="1278" y="1004" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1289" y="1047" width="59" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callDeleteSDNCAdapter_CallActivity">
+ <dc:Bounds x="981" y="851" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">
+ <di:waypoint xsi:type="dc:Point" x="1081" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="1131" y="891" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1106" y="876" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_242" targetElement="_BPMNShape_ScriptTask_63">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="467" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="509" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1196" y="488" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_2" bpmnElement="silentSucces_InclusiveGateway">
+ <dc:Bounds x="1126" y="177" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1136" y="227" width="33" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="silentSuccess_SequenceFlow" sourceElement="_BPMNShape_InclusiveGateway_2">
+ <di:waypoint xsi:type="dc:Point" x="1176" y="202" />
+ <di:waypoint xsi:type="dc:Point" x="1305" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1195" y="180.7648701031734" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
+ <dc:Bounds x="1131" y="851" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">
+ <di:waypoint xsi:type="dc:Point" x="1180" y="931" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="997" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1181" y="949" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_242" bpmnElement="sendRequestToNewworkAdapater_ScriptTask">
+ <dc:Bounds x="1131" y="387" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1458" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1476" y="226" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_2">
+ <dc:Bounds x="817" y="687" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="835" y="728" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_182" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1163" y="1228" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1181" y="1269" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_250" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
+ <dc:Bounds x="960" y="269" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_52" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_250" targetElement="_BPMNShape_ScriptTask_66">
+ <di:waypoint xsi:type="dc:Point" x="1060" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="1131" y="309" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1111" y="309" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_41" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="1213" y="913" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1231" y="949" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_BoundaryEvent_41" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1241" y="945" />
+ <di:waypoint xsi:type="dc:Point" x="1286" y="1007" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1264" y="961" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="isRelationshipExists_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="840" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="829" y="41" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="isRelationshipExistNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_62">
+ <di:waypoint xsi:type="dc:Point" x="890" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="984" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="97" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_216" bpmnElement="relationshipError_EndEvent">
+ <dc:Bounds x="730" y="80" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="117" width="109" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_61" bpmnElement="isRelationshipExistYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_EndEvent_216">
+ <di:waypoint xsi:type="dc:Point" x="840" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="800" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="800" y="98" />
+ <di:waypoint xsi:type="dc:Point" x="766" y="98" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="816" y="97" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_29" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="0" y="369" width="326" height="175" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_73" bpmnElement="StartEvent_1">
+ <dc:Bounds x="36" y="432" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="54" y="473" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_222" bpmnElement="EndEvent_4">
+ <dc:Bounds x="240" y="432" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="258" y="473" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_272" bpmnElement="unexpectedError_DeleteNetworkInfra_ScriptTask_1">
+ <dc:Bounds x="108" y="410" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_73" targetElement="_BPMNShape_ScriptTask_272">
+ <di:waypoint xsi:type="dc:Point" x="72" y="450" />
+ <di:waypoint xsi:type="dc:Point" x="108" y="450" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_272" targetElement="_BPMNShape_EndEvent_222">
+ <di:waypoint xsi:type="dc:Point" x="208" y="450" />
+ <di:waypoint xsi:type="dc:Point" x="240" y="450" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_00lgy9f_di" bpmnElement="ScriptTask_00lgy9f">
+ <dc:Bounds x="688" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a51h25_di" bpmnElement="SequenceFlow_1a51h25">
+ <di:waypoint xsi:type="dc:Point" x="85" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="124" y="914" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="105" y="899" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yvnovn_di" bpmnElement="SequenceFlow_1yvnovn">
+ <di:waypoint xsi:type="dc:Point" x="788" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="803" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01xjfhu_di" bpmnElement="ScriptTask_01xjfhu">
+ <dc:Bounds x="1131" y="1097" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pbgnr2_di" bpmnElement="SequenceFlow_1pbgnr2">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="1177" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="1228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1196" y="1202.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pdp4d2_di" bpmnElement="SequenceFlow_1pdp4d2">
+ <di:waypoint xsi:type="dc:Point" x="1031" y="798" />
+ <di:waypoint xsi:type="dc:Point" x="1031" y="851" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1046" y="824.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_02t94x3_di" bpmnElement="ExclusiveGateway_02t94x3" isMarkerVisible="true">
+ <dc:Bounds x="1156" y="648" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1143" y="707" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0r3pvf8_di" bpmnElement="SequenceFlow_0r3pvf8">
+ <di:waypoint xsi:type="dc:Point" x="1156" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1031" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1031" y="718" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1134" y="681" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0iqzbz6_di" bpmnElement="ScriptTask_0iqzbz6">
+ <dc:Bounds x="1426" y="851" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_03wzdas_di" bpmnElement="CallActivity_03wzdas">
+ <dc:Bounds x="1279" y="851" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jnva78_di" bpmnElement="SequenceFlow_1jnva78">
+ <di:waypoint xsi:type="dc:Point" x="1279" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="1231" y="891" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1255" y="876" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zlbzad_di" bpmnElement="SequenceFlow_0zlbzad">
+ <di:waypoint xsi:type="dc:Point" x="1426" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="1379" y="891" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1403" y="876" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kqnddy_di" bpmnElement="SequenceFlow_0kqnddy">
+ <di:waypoint xsi:type="dc:Point" x="1206" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1279" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1217" y="677.9562629793824" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01w2cd9_di" bpmnElement="ScriptTask_01w2cd9">
+ <dc:Bounds x="597" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0msqfwu_di" bpmnElement="SequenceFlow_0msqfwu">
+ <di:waypoint xsi:type="dc:Point" x="697" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="757" y="188" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0dtzzht_di" bpmnElement="ScriptTask_0dtzzht">
+ <dc:Bounds x="1305" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0f25bme_di" bpmnElement="SequenceFlow_0f25bme">
+ <di:waypoint xsi:type="dc:Point" x="1405" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="1458" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1432" y="178" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0wyu1mx_di" bpmnElement="CallActivity_0wyu1mx">
+ <dc:Bounds x="1426" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1wf192s_di" bpmnElement="ScriptTask_1wf192s">
+ <dc:Bounds x="1279" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1o088sy_di" bpmnElement="SequenceFlow_1o088sy">
+ <di:waypoint xsi:type="dc:Point" x="1379" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1403" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1403" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1426" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1418" y="673" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_024qvqd_di" bpmnElement="ExclusiveGateway_024qvqd" isMarkerVisible="true">
+ <dc:Bounds x="1597" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1622" y="825" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_00vwf2h_di" bpmnElement="ScriptTask_00vwf2h">
+ <dc:Bounds x="1572" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_0un9yyu_di" bpmnElement="BoundaryEvent_0un9yyu">
+ <dc:Bounds x="1654" y="695" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1672" y="731" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1i3193l_di" bpmnElement="SequenceFlow_1i3193l">
+ <di:waypoint xsi:type="dc:Point" x="1526" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1572" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1549" y="648" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n8sf23_di" bpmnElement="SequenceFlow_0n8sf23">
+ <di:waypoint xsi:type="dc:Point" x="1622" y="713" />
+ <di:waypoint xsi:type="dc:Point" x="1622" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1637" y="734" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_08hus4u_di" bpmnElement="SequenceFlow_08hus4u">
+ <di:waypoint xsi:type="dc:Point" x="1680" y="729" />
+ <di:waypoint xsi:type="dc:Point" x="1710" y="784" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1695" y="741.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qyo7ot_di" bpmnElement="SequenceFlow_1qyo7ot">
+ <di:waypoint xsi:type="dc:Point" x="1647" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1700" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1651" y="808" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0f13b17_di" bpmnElement="SequenceFlow_0f13b17">
+ <di:waypoint xsi:type="dc:Point" x="1622" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="1622" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="1526" y="891" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1629" y="824" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0p7ad9r_di" bpmnElement="EndEvent_1l210ae">
+ <dc:Bounds x="1700" y="782" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1718" y="818" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0n4do0p_di" bpmnElement="ScriptTask_0n4do0p">
+ <dc:Bounds x="245" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gix2o6_di" bpmnElement="ExclusiveGateway_1gix2o6" isMarkerVisible="true">
+ <dc:Bounds x="270" y="889" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="939" width="77" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tiz0kk_di" bpmnElement="SequenceFlow_0tiz0kk">
+ <di:waypoint xsi:type="dc:Point" x="295" y="889" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="869" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="869" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="849" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="299" y="858.4545454545455" width="19" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1suj1nc_di" bpmnElement="SequenceFlow_1suj1nc">
+ <di:waypoint xsi:type="dc:Point" x="320" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="849" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="897" width="14" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0lku52d_di" bpmnElement="CallActivity_0lku52d">
+ <dc:Bounds x="523" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1loz6nk_di" bpmnElement="SequenceFlow_1loz6nk">
+ <di:waypoint xsi:type="dc:Point" x="623" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="688" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="656" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1x7o5bo_di" bpmnElement="ExclusiveGateway_1x7o5bo" isMarkerVisible="true">
+ <dc:Bounds x="270" y="799" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="173" y="812" width="87" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jb7rws_di" bpmnElement="SequenceFlow_0jb7rws">
+ <di:waypoint xsi:type="dc:Point" x="295" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="772" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="772" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="300" y="755.74" width="19" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_17qke2s_di" bpmnElement="ExclusiveGateway_01xin16">
+ <dc:Bounds x="412" y="799" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="849" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1raa09h_di" bpmnElement="SequenceFlow_1raa09h">
+ <di:waypoint xsi:type="dc:Point" x="320" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="412" y="824" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="809" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nl99y6_di" bpmnElement="SequenceFlow_1nl99y6">
+ <di:waypoint xsi:type="dc:Point" x="462" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="600" y="809" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0n4ya47_di" bpmnElement="ScriptTask_0n4ya47">
+ <dc:Bounds x="387" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wif0e5_di" bpmnElement="SequenceFlow_1wif0e5">
+ <di:waypoint xsi:type="dc:Point" x="345" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_147vc14_di" bpmnElement="SequenceFlow_147vc14">
+ <di:waypoint xsi:type="dc:Point" x="487" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="523" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="505" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_021b0sz_di" bpmnElement="SequenceFlow_021b0sz">
+ <di:waypoint xsi:type="dc:Point" x="224" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="270" y="914" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="247" y="899" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gtl61j_di" bpmnElement="Task_0026x4v">
+ <dc:Bounds x="124" y="874" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn
new file mode 100644
index 0000000..17f5ce4
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn
@@ -0,0 +1,546 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
+ <bpmn:process id="DoDeleteNetworkInstanceRollback" name="DoDeleteNetworkInstanceRollback" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_1krl2dg</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="Task_0whino1" name="PreProcess Incoming Data" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1krl2dg</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0u41iz2</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+DoDeleteNetworkInstanceRollback.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1krl2dg" sourceRef="StartEvent_1" targetRef="Task_0whino1" />
+ <bpmn:sequenceFlow id="SequenceFlow_0u41iz2" sourceRef="Task_0whino1" targetRef="ExclusiveGateway_0p5zgdb" />
+ <bpmn:callActivity id="CallActivity_1x88fsq" name="Call RSRC SDNC Activate Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="DELNWKIR_rollbackDeactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKIR_rollbackDeactivateSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKIR_rollbackDeactivateSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1mxbdps</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07s5r14</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0p5zgdb" name="is RSRC Deactivate Rollback?" default="SequenceFlow_1bb7zpp">
+ <bpmn:incoming>SequenceFlow_0u41iz2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1bb7zpp</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1mxbdps</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_1ggaxfu" name="Validate Rollback Responses" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1xokvq6</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1xs882r</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ucaagl</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+DoDeleteNetworkInstanceRollback.validateRollbackResponses(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1bb7zpp" name="No" sourceRef="ExclusiveGateway_0p5zgdb" targetRef="ExclusiveGateway_03d5sol" />
+ <bpmn:sequenceFlow id="SequenceFlow_1mxbdps" name="Yes" sourceRef="ExclusiveGateway_0p5zgdb" targetRef="CallActivity_1x88fsq">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKIR_rollbackDeactivateSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_07s5r14" sourceRef="CallActivity_1x88fsq" targetRef="ExclusiveGateway_03d5sol" />
+ <bpmn:endEvent id="EndEvent_1fvr7ad">
+ <bpmn:incoming>SequenceFlow_1ucaagl</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1eyt8z2" sourceRef="ServiceTask_1vx8ti9" targetRef="ExclusiveGateway_03fn5ks" />
+ <bpmn:subProcess id="SubProcess_1p4663w" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0by1uwk" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xktw7v</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0soe5t3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+DoDeleteNetworkInstanceRollback.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_1j0eixl">
+ <bpmn:outgoing>SequenceFlow_0xktw7v</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_1" />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0jxh015">
+ <bpmn:incoming>SequenceFlow_0soe5t3</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0xktw7v" name="" sourceRef="StartEvent_1j0eixl" targetRef="ScriptTask_0by1uwk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0soe5t3" name="" sourceRef="ScriptTask_0by1uwk" targetRef="EndEvent_0jxh015" />
+ </bpmn:subProcess>
+ <bpmn:inclusiveGateway id="ExclusiveGateway_0798yby">
+ <bpmn:incoming>SequenceFlow_1hcmrh9</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1pi168e</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1xs882r</bpmn:outgoing>
+ </bpmn:inclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1xs882r" sourceRef="ExclusiveGateway_0798yby" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_03d5sol" name="is PO Network Rollback?" default="SequenceFlow_1yj3542">
+ <bpmn:incoming>SequenceFlow_1bb7zpp</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_07s5r14</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yj3542</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_18e00sw</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1yj3542" name="No" sourceRef="ExclusiveGateway_03d5sol" targetRef="ExclusiveGateway_03fn5ks" />
+ <bpmn:serviceTask id="ServiceTask_1vx8ti9" name="Call Rollback Network">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="payload">${DELNWKIR_rollbackNetworkRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="url">CRENWKIR_urlRollbackPoNetwork</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>
+ <camunda:entry key="content-type">application/xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="DELNWKIR_rollbackNetworkResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELNWKIR_rollbackNetworkReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_18e00sw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1eyt8z2</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_18e00sw" name="Yes" sourceRef="ExclusiveGateway_03d5sol" targetRef="ServiceTask_1vx8ti9">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKIR_rollbackNetworkRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_03fn5ks" name="is SDNC Rollback?" default="SequenceFlow_1xokvq6">
+ <bpmn:incoming>SequenceFlow_1yj3542</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1eyt8z2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1xokvq6</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_172safw</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1ga27si" name="is RSRC SDNC?" default="SequenceFlow_1wy1aba">
+ <bpmn:incoming>SequenceFlow_172safw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wy1aba</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1yltkyg</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1xokvq6" name="No" sourceRef="ExclusiveGateway_03fn5ks" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:sequenceFlow id="SequenceFlow_172safw" name="Yes" sourceRef="ExclusiveGateway_03fn5ks" targetRef="ExclusiveGateway_1ga27si">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKIR_rollbackSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1wy1aba" name="No" sourceRef="ExclusiveGateway_1ga27si" targetRef="Task_00chyig" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yltkyg" name="Yes" sourceRef="ExclusiveGateway_1ga27si" targetRef="Task_1iuumxi">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1hcmrh9" sourceRef="Task_1iuumxi" targetRef="ExclusiveGateway_0798yby" />
+ <bpmn:sequenceFlow id="SequenceFlow_1pi168e" sourceRef="Task_00chyig" targetRef="ExclusiveGateway_0798yby" />
+ <bpmn:callActivity id="Task_1iuumxi" name="Call Assign RSRC SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="DELNWKIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1yltkyg</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1hcmrh9</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:callActivity id="Task_00chyig" name="Call Rollback SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="DELNWKIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1wy1aba</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1pi168e</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1ucaagl" sourceRef="ScriptTask_1ggaxfu" targetRef="EndEvent_1fvr7ad" />
+ <bpmn:subProcess id="SubProcess_02vfqr7" triggeredByEvent="true">
+ <bpmn:endEvent id="EndEvent_0m7hpuj">
+ <bpmn:incoming>SequenceFlow_1s5yjuu</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0yr3vca" name="Catch Exception" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_01hh1wq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1s5yjuu</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+execution.setVariable("workflowException", execution.getVariable("WorkflowException")]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_001ol7f">
+ <bpmn:outgoing>SequenceFlow_01hh1wq</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1s5yjuu" sourceRef="ScriptTask_0yr3vca" targetRef="EndEvent_0m7hpuj" />
+ <bpmn:sequenceFlow id="SequenceFlow_01hh1wq" sourceRef="StartEvent_001ol7f" targetRef="ScriptTask_0yr3vca" />
+ </bpmn:subProcess>
+ <bpmn:boundaryEvent id="BoundaryEvent_1mrkh9x" attachedToRef="CallActivity_1x88fsq">
+ <bpmn:outgoing>SequenceFlow_0b0m3o7</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_16cracu" attachedToRef="ServiceTask_1vx8ti9">
+ <bpmn:outgoing>SequenceFlow_141226w</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_141226w" sourceRef="BoundaryEvent_16cracu" targetRef="EndEvent_00y9o8y" />
+ <bpmn:sequenceFlow id="SequenceFlow_0b0m3o7" sourceRef="BoundaryEvent_1mrkh9x" targetRef="EndEvent_00y9o8y" />
+ <bpmn:endEvent id="EndEvent_00y9o8y">
+ <bpmn:incoming>SequenceFlow_141226w</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0b0m3o7</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:endEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_1gk4tem" attachedToRef="Task_1iuumxi">
+ <bpmn:outgoing>SequenceFlow_1lr1613</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_1qaz277" attachedToRef="Task_00chyig">
+ <bpmn:outgoing>SequenceFlow_0np0b8p</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:endEvent id="EndEvent_1qfbudr">
+ <bpmn:incoming>SequenceFlow_1lr1613</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0np0b8p</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1lr1613" sourceRef="BoundaryEvent_1gk4tem" targetRef="EndEvent_1qfbudr" />
+ <bpmn:sequenceFlow id="SequenceFlow_0np0b8p" sourceRef="BoundaryEvent_1qaz277" targetRef="EndEvent_1qfbudr" />
+ <bpmn:textAnnotation id="TextAnnotation_000ap15"> <bpmn:text><![CDATA[Include ONLY inputs/varrables:  
+rollbackData, as Map
+-rollbackDeactivateSDNCRequest
+-rollbackNetworkRequest 
+WorkflowException
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_0ybkmal" sourceRef="Task_0whino1" targetRef="TextAnnotation_000ap15" />
+ <bpmn:textAnnotation id="TextAnnotation_0vwyo82"> <bpmn:text><![CDATA[set value for:
+WorkflowException
+rolledBack
+wasDeleted
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_1gx121b" sourceRef="ScriptTask_1ggaxfu" targetRef="TextAnnotation_0vwyo82" />
+ </bpmn:process>
+ <bpmn:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteNetworkInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="214" y="240" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="232" y="276" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1dqe09s_di" bpmnElement="Task_0whino1">
+ <dc:Bounds x="333" y="218" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1krl2dg_di" bpmnElement="SequenceFlow_1krl2dg">
+ <di:waypoint xsi:type="dc:Point" x="250" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="333" y="258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="292" y="243" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u41iz2_di" bpmnElement="SequenceFlow_0u41iz2">
+ <di:waypoint xsi:type="dc:Point" x="433" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="243" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1x88fsq_di" bpmnElement="CallActivity_1x88fsq">
+ <dc:Bounds x="506" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0p5zgdb_di" bpmnElement="ExclusiveGateway_0p5zgdb" isMarkerVisible="true">
+ <dc:Bounds x="531" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="451" y="360" width="55" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_000ap15_di" bpmnElement="TextAnnotation_000ap15">
+ <dc:Bounds x="112" y="355" width="277" height="115" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0ybkmal_di" bpmnElement="Association_0ybkmal">
+ <di:waypoint xsi:type="dc:Point" x="349" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="300" y="355" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ggaxfu_di" bpmnElement="ScriptTask_1ggaxfu">
+ <dc:Bounds x="1097" y="332" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_0vwyo82_di" bpmnElement="TextAnnotation_0vwyo82">
+ <dc:Bounds x="1230" y="448" width="165" height="60" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_1gx121b_di" bpmnElement="Association_1gx121b">
+ <di:waypoint xsi:type="dc:Point" x="1195" y="404" />
+ <di:waypoint xsi:type="dc:Point" x="1264" y="448" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bb7zpp_di" bpmnElement="SequenceFlow_1bb7zpp">
+ <di:waypoint xsi:type="dc:Point" x="581" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="711" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="589" y="350.17259171746633" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mxbdps_di" bpmnElement="SequenceFlow_1mxbdps">
+ <di:waypoint xsi:type="dc:Point" x="556" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="560" y="397.10731155015196" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07s5r14_di" bpmnElement="SequenceFlow_07s5r14">
+ <di:waypoint xsi:type="dc:Point" x="606" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="711" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="654" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1fvr7ad_di" bpmnElement="EndEvent_1fvr7ad">
+ <dc:Bounds x="1253" y="252" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1271" y="288" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eyt8z2_di" bpmnElement="SequenceFlow_1eyt8z2">
+ <di:waypoint xsi:type="dc:Point" x="786" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="815" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="815" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="866" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="830" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1p4663w_di" bpmnElement="SubProcess_1p4663w" isExpanded="true">
+ <dc:Bounds x="-6" y="665" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0by1uwk_di" bpmnElement="ScriptTask_0by1uwk">
+ <dc:Bounds x="142" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1j0eixl_di" bpmnElement="StartEvent_1j0eixl">
+ <dc:Bounds x="27" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="783" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0jxh015_di" bpmnElement="EndEvent_0jxh015">
+ <dc:Bounds x="303" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="321" y="783" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xktw7v_di" bpmnElement="SequenceFlow_0xktw7v">
+ <di:waypoint xsi:type="dc:Point" x="63" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="142" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="105" y="760" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0soe5t3_di" bpmnElement="SequenceFlow_0soe5t3">
+ <di:waypoint xsi:type="dc:Point" x="242" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="277" y="760" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_04myanb_di" bpmnElement="ExclusiveGateway_0798yby">
+ <dc:Bounds x="1122" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1147" y="546" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xs882r_di" bpmnElement="SequenceFlow_1xs882r">
+ <di:waypoint xsi:type="dc:Point" x="1147" y="496" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="412" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1162" y="454" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_03d5sol_di" bpmnElement="ExclusiveGateway_03d5sol" isMarkerVisible="true">
+ <dc:Bounds x="711" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="699" y="312" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yj3542_di" bpmnElement="SequenceFlow_1yj3542">
+ <di:waypoint xsi:type="dc:Point" x="761" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="866" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="774" y="354" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1vx8ti9_di" bpmnElement="ServiceTask_1vx8ti9">
+ <dc:Bounds x="686" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18e00sw_di" bpmnElement="SequenceFlow_18e00sw">
+ <di:waypoint xsi:type="dc:Point" x="736" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="736" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="748" y="394" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_03fn5ks_di" bpmnElement="ExclusiveGateway_03fn5ks" isMarkerVisible="true">
+ <dc:Bounds x="866" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="867" y="310" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ga27si_di" bpmnElement="ExclusiveGateway_1ga27si" isMarkerVisible="true">
+ <dc:Bounds x="866" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="456" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xokvq6_di" bpmnElement="SequenceFlow_1xokvq6">
+ <di:waypoint xsi:type="dc:Point" x="916" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="1097" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="926" y="353" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_172safw_di" bpmnElement="SequenceFlow_172safw">
+ <di:waypoint xsi:type="dc:Point" x="891" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="891" y="496" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="396.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wy1aba_di" bpmnElement="SequenceFlow_1wy1aba">
+ <di:waypoint xsi:type="dc:Point" x="891" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="891" y="677" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="677" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="903" y="541.5" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yltkyg_di" bpmnElement="SequenceFlow_1yltkyg">
+ <di:waypoint xsi:type="dc:Point" x="916" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="915" y="502" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hcmrh9_di" bpmnElement="SequenceFlow_1hcmrh9">
+ <di:waypoint xsi:type="dc:Point" x="1055" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1122" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1089" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pi168e_di" bpmnElement="SequenceFlow_1pi168e">
+ <di:waypoint xsi:type="dc:Point" x="1055" y="677" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="677" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1101" y="662" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_12rk9t5_di" bpmnElement="Task_1iuumxi">
+ <dc:Bounds x="955" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0l1dvlv_di" bpmnElement="Task_00chyig">
+ <dc:Bounds x="955" y="637" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ucaagl_di" bpmnElement="SequenceFlow_1ucaagl">
+ <di:waypoint xsi:type="dc:Point" x="1147" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="270" />
+ <di:waypoint xsi:type="dc:Point" x="1253" y="270" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1162" y="301" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_02vfqr7_di" bpmnElement="SubProcess_02vfqr7" isExpanded="true">
+ <dc:Bounds x="-10" y="898" width="382" height="213" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0m7hpuj_di" bpmnElement="EndEvent_0m7hpuj">
+ <dc:Bounds x="293" y="977" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="311" y="1013" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yr3vca_di" bpmnElement="ScriptTask_0yr3vca">
+ <dc:Bounds x="120" y="955" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_001ol7f_di" bpmnElement="StartEvent_001ol7f">
+ <dc:Bounds x="20" y="977" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="38" y="1013" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s5yjuu_di" bpmnElement="SequenceFlow_1s5yjuu">
+ <di:waypoint xsi:type="dc:Point" x="220" y="995" />
+ <di:waypoint xsi:type="dc:Point" x="293" y="995" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="257" y="970" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01hh1wq_di" bpmnElement="SequenceFlow_01hh1wq">
+ <di:waypoint xsi:type="dc:Point" x="56" y="995" />
+ <di:waypoint xsi:type="dc:Point" x="120" y="995" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="980" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="BoundaryEvent_10qmjw0_di" bpmnElement="BoundaryEvent_1mrkh9x">
+ <dc:Bounds x="588" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_1n1s1n0_di" bpmnElement="BoundaryEvent_16cracu">
+ <dc:Bounds x="668" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="686" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_141226w_di" bpmnElement="SequenceFlow_141226w">
+ <di:waypoint xsi:type="dc:Point" x="677" y="577" />
+ <di:waypoint xsi:type="dc:Point" x="655" y="613" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="580" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b0m3o7_di" bpmnElement="SequenceFlow_0b0m3o7">
+ <di:waypoint xsi:type="dc:Point" x="615" y="576" />
+ <di:waypoint xsi:type="dc:Point" x="637" y="614" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="580" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0yeci14_di" bpmnElement="EndEvent_00y9o8y">
+ <dc:Bounds x="628" y="611" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="646" y="647" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_10psbey_di" bpmnElement="BoundaryEvent_1gk4tem">
+ <dc:Bounds x="1037" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1055" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_0wka4xd_di" bpmnElement="BoundaryEvent_1qaz277">
+ <dc:Bounds x="1037" y="619" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1055" y="655" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0c33uj0_di" bpmnElement="EndEvent_1qfbudr">
+ <dc:Bounds x="1089" y="587" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1107" y="623" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lr1613_di" bpmnElement="SequenceFlow_1lr1613">
+ <di:waypoint xsi:type="dc:Point" x="1068" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="1094" y="594" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1081" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0np0b8p_di" bpmnElement="SequenceFlow_0np0b8p">
+ <di:waypoint xsi:type="dc:Point" x="1070" y="628" />
+ <di:waypoint xsi:type="dc:Point" x="1092" y="614" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1081" y="606" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
new file mode 100644
index 0000000..c40f73d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteServiceInstance" name="DoDeleteServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="deleteSI_startEven" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0jfgn05</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0jfgn05</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jqc16k</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_1wyvxwi</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="callGenericDeleteService" name="Call AAI GenericDelete Service " calledElement="GenericDeleteService">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceInstanceId" target="GENDS_serviceInstanceId" />
+ <camunda:in source="subscriptionServiceType" target="GENDS_serviceType" />
+ <camunda:in source="globalSubscriberId" target="GENDS_globalCustomerId" />
+ <camunda:in sourceExpression="service-instance" target="GENDS_type" />
+ <camunda:out source="GENDS_FoundIndicator" target="GENDS_FoundIndicator" />
+ <camunda:in sourceExpression="&#34;&#34;" target="GENGS_serviceType" />
+ <camunda:out source="GENDS_SuccessIndicator" target="GENDS_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowExcpeton" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1w8ao21</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0riudmc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05wu9i7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_05wu9i7" sourceRef="callGenericDeleteService" targetRef="ScriptTask_1ybdq3e" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0k28xib" sourceRef="CallActivity_0ak0ezb" targetRef="ScriptTask_1uxr0cx" />
+ <bpmn2:callActivity id="CallActivity_0ak0ezb" name="Call SDNC Service Topology Delete" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDelete" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0rtflal</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1w8ao21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.postProcessSDNCDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0jfgn05" sourceRef="deleteSI_startEven" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="ScriptTask_0xxwbdq" name="PreProcess SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1dwch0k</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0rtflal</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.preProcessSDNCDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0rtflal" sourceRef="ScriptTask_0xxwbdq" targetRef="CallActivity_0ak0ezb" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0590oev" name="SI found in AAI" default="SequenceFlow_05jfuko">
+ <bpmn2:incoming>SequenceFlow_1up0j5r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1hcfvcj</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05jfuko</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1hcfvcj" name="yes" sourceRef="ExclusiveGateway_0590oev" targetRef="ExclusiveGateway_1mrh7us">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_0ronxsz">
+ <bpmn2:incoming>SequenceFlow_05jfuko</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_05jfuko" name="no" sourceRef="ExclusiveGateway_0590oev" targetRef="EndEvent_0ronxsz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1w8ao21" sourceRef="ScriptTask_1uxr0cx" targetRef="callGenericDeleteService" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1mrh7us" name="sdncVersion is 1610 " default="SequenceFlow_1dwch0k">
+ <bpmn2:incoming>SequenceFlow_1hcfvcj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0riudmc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1dwch0k</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0riudmc" name="yes" sourceRef="ExclusiveGateway_1mrh7us" targetRef="callGenericDeleteService">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("sdncVersion" ) == "1610" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dwch0k" name="no" sourceRef="ExclusiveGateway_1mrh7us" targetRef="ScriptTask_0xxwbdq" />
+ <bpmn2:callActivity id="CallActivity_1s8pf0x" name="Call AAI Generic GetService" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
+ <camunda:in sourceExpression="service-instance" target="GENGS_type" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
+ <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
+ <camunda:out source="GENGS_service" target="GENGS_service" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1jqc16k</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1grea1r</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jqc16k" sourceRef="preProcessRequest_ScriptTask" targetRef="CallActivity_1s8pf0x" />
+ <bpmn2:scriptTask id="ScriptTask_02da0lj" name="Post Process AAI GET" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1grea1r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1up0j5r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.postProcessAAIGET(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1grea1r" sourceRef="CallActivity_1s8pf0x" targetRef="ScriptTask_02da0lj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1up0j5r" sourceRef="ScriptTask_02da0lj" targetRef="ExclusiveGateway_0590oev" />
+ <bpmn2:scriptTask id="ScriptTask_1ybdq3e" name="Post Process AAI Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_05wu9i7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wyvxwi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.postProcessAAIDEL(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1wyvxwi" sourceRef="ScriptTask_1ybdq3e" targetRef="EndEvent_3" />
+ <bpmn2:subProcess id="SubProcess_1jggn82" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1antv0y">
+ <bpmn2:outgoing>SequenceFlow_0u33vy6</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_03iywf6">
+ <bpmn2:incoming>SequenceFlow_0hevfee</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1va95un" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0u33vy6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0hevfee</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0u33vy6" name="" sourceRef="StartEvent_1antv0y" targetRef="ScriptTask_1va95un" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0hevfee" name="" sourceRef="ScriptTask_1va95un" targetRef="EndEvent_03iywf6" />
+ </bpmn2:subProcess>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteSI_startEven">
+ <dc:Bounds x="-334" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-340" y="120" width="49" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="-229" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1384" y="201" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1402" y="242" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="callGenericDeleteService">
+ <dc:Bounds x="1159" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05wu9i7_di" bpmnElement="SequenceFlow_05wu9i7">
+ <di:waypoint xsi:type="dc:Point" x="1259" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1350" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1305" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k28xib_di" bpmnElement="SequenceFlow_0k28xib">
+ <di:waypoint xsi:type="dc:Point" x="902" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="972" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="937" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb">
+ <dc:Bounds x="802" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx">
+ <dc:Bounds x="972" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jfgn05_di" bpmnElement="SequenceFlow_0jfgn05">
+ <di:waypoint xsi:type="dc:Point" x="-298" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-262" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-262" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-229" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-247" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0xxwbdq_di" bpmnElement="ScriptTask_0xxwbdq">
+ <dc:Bounds x="617" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rtflal_di" bpmnElement="SequenceFlow_0rtflal">
+ <di:waypoint xsi:type="dc:Point" x="717" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="802" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="760" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0590oev_di" bpmnElement="ExclusiveGateway_0590oev" isMarkerVisible="true">
+ <dc:Bounds x="305" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="293" y="51" width="73" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hcfvcj_di" bpmnElement="SequenceFlow_1hcfvcj">
+ <di:waypoint xsi:type="dc:Point" x="355" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="420" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="459" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="384" y="99.03416045409814" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0ronxsz_di" bpmnElement="EndEvent_0ronxsz">
+ <dc:Bounds x="312" y="186" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="330" y="227" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05jfuko_di" bpmnElement="SequenceFlow_05jfuko">
+ <di:waypoint xsi:type="dc:Point" x="330" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="330" y="186" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="310" y="127.1200546314796" width="13" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w8ao21_di" bpmnElement="SequenceFlow_1w8ao21">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1127" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1156" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1100" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1mrh7us_di" bpmnElement="ExclusiveGateway_1mrh7us" isMarkerVisible="true">
+ <dc:Bounds x="463" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="451" y="122" width="73" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0riudmc_di" bpmnElement="SequenceFlow_0riudmc">
+ <di:waypoint xsi:type="dc:Point" x="488" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="488" y="-20" />
+ <di:waypoint xsi:type="dc:Point" x="1209" y="-20" />
+ <di:waypoint xsi:type="dc:Point" x="1209" y="57" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="841" y="-35" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dwch0k_di" bpmnElement="SequenceFlow_1dwch0k">
+ <di:waypoint xsi:type="dc:Point" x="513" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="617" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="526" y="73" width="12" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1s8pf0x_di" bpmnElement="CallActivity_1s8pf0x">
+ <dc:Bounds x="-64" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jqc16k_di" bpmnElement="SequenceFlow_1jqc16k">
+ <di:waypoint xsi:type="dc:Point" x="-129" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-100" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-100" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-64" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-85" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_02da0lj_di" bpmnElement="ScriptTask_02da0lj">
+ <dc:Bounds x="107" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1grea1r_di" bpmnElement="SequenceFlow_1grea1r">
+ <di:waypoint xsi:type="dc:Point" x="36" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="73" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="73" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="107" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1up0j5r_di" bpmnElement="SequenceFlow_1up0j5r">
+ <di:waypoint xsi:type="dc:Point" x="207" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="305" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ybdq3e_di" bpmnElement="ScriptTask_1ybdq3e">
+ <dc:Bounds x="1352" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wyvxwi_di" bpmnElement="SequenceFlow_1wyvxwi">
+ <di:waypoint xsi:type="dc:Point" x="1402" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1402" y="201" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1417" y="169" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1jggn82_di" bpmnElement="SubProcess_1jggn82" isExpanded="true">
+ <dc:Bounds x="266" y="409" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1antv0y_di" bpmnElement="StartEvent_1antv0y">
+ <dc:Bounds x="334" y="475" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="352" y="516" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_03iywf6_di" bpmnElement="EndEvent_03iywf6">
+ <dc:Bounds x="627" y="475" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="645" y="516" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1va95un_di" bpmnElement="ScriptTask_1va95un">
+ <dc:Bounds x="438" y="453" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u33vy6_di" bpmnElement="SequenceFlow_0u33vy6">
+ <di:waypoint xsi:type="dc:Point" x="370" y="493" />
+ <di:waypoint xsi:type="dc:Point" x="438" y="493" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="404" y="478" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hevfee_di" bpmnElement="SequenceFlow_0hevfee">
+ <di:waypoint xsi:type="dc:Point" x="538" y="493" />
+ <di:waypoint xsi:type="dc:Point" x="627" y="493" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="583" y="478" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn
new file mode 100644
index 0000000..ab08123
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn
@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_Wblj8GyfEeWUWLTvug7ZOg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteVfModule" name="DoDeleteVfModule" isExecutable="true">
+ <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule
+&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0fp1wqz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="UpdateAAIVfModulePrep" targetRef="InvokeUpdateAAIVfModule" />
+ <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke
+&#10;UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="InvokeUpdateAAIVfModule" targetRef="SDNCAdapterPrep2" />
+ <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke
+&#10;PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="PrepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="PUAAIVfMod_heatStackId" target="DoDVfMod_heatStackId" />
+ <camunda:out source="PUAAIVfMod_outVfModule" target="vfModuleFromAAI" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_42</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1j9dvfx</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1" />
+ <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke
+&#10;SDNCAdapterV1" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="sdncAdapterResponse" target="DoDVfMod_doDeleteVfModuleResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="InvokeSDNCAdapterV1_2" targetRef="validateSDNCResponse" />
+ <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter
+&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1j9dvfx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter
+&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepSDNCAdapterRequest(execution, "delete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="InvokeSDNCAdapterV1_2" />
+ <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke
+&#10;VNFAdapterRestV1" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="vnfAdapterRestV1Request" target="vnfAdapterRestV1Request" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DoDVfMod_doDeleteVfModuleResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01cvxjf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_9">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke
+&#10;DeleteAAIVfModule" calledElement="DeleteAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="InvokeDeleteAAIVfModule" targetRef="EndEvent_9" />
+ <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule
+&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepDeleteAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="DeleteAAIVfModulePrep" targetRef="InvokeDeleteAAIVfModule" />
+ <bpmn2:scriptTask id="validateSDNCResponse" name="Validate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.sdncValidateResponse(execution, DoDVfMod_doDeleteVfModuleResponse)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="validateSDNCResponse" targetRef="DeleteAAIVfModulePrep" />
+ <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="InitializeVariables" targetRef="PrepareUpdateAAIVfModulePrep" />
+ <bpmn2:scriptTask id="PrepareUpdateAAIVfModulePrep" name="PrepareUpdateAAIVfModule Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_42</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_42" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="InvokePrepareUpdateAAIVfModule" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:messageEventDefinition id="_MessageEventDefinition_6" messageRef="Message_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables" />
+ <bpmn2:scriptTask id="DeleteNetworkPoliciesFromAAI" name="Delete Network Policies from AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0coa90m</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08g02ch</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.deleteNetworkPoliciesFromAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1j9dvfx" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="VNFAdapterPrep" />
+ <bpmn2:sequenceFlow id="SequenceFlow_01cvxjf" sourceRef="InvokeVNFAdapterRestV1" targetRef="PostProcessVNFAdapterRequest" />
+ <bpmn2:scriptTask id="PostProcessVNFAdapterRequest" name="PostProcess VNFAdapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_01cvxjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0coa90m</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.postProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0coa90m" sourceRef="PostProcessVNFAdapterRequest" targetRef="DeleteNetworkPoliciesFromAAI" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1drlnlk" name="need to update VNF in AAI?" default="SequenceFlow_0ep3hjm">
+ <bpmn2:incoming>SequenceFlow_08g02ch</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1yehsyc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ep3hjm</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_08g02ch" sourceRef="DeleteNetworkPoliciesFromAAI" targetRef="ExclusiveGateway_1drlnlk" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yehsyc" name="yes" sourceRef="ExclusiveGateway_1drlnlk" targetRef="PreProcessUpdateAAIGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DoDVfMod_oamManagementV4Address") != null || execution.getVariable("DoDVfMod_oamManagementV6Address") != null]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1a7lzhz" sourceRef="PreProcessUpdateAAIGenericVnf" targetRef="UpdateAAIGenericVnfTask" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0lsru7z">
+ <bpmn2:incoming>SequenceFlow_0ep3hjm</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_14l7olw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0fp1wqz</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ep3hjm" name="no" sourceRef="ExclusiveGateway_1drlnlk" targetRef="ExclusiveGateway_0lsru7z" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14l7olw" sourceRef="UpdateAAIGenericVnfTask" targetRef="ExclusiveGateway_0lsru7z" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0fp1wqz" sourceRef="ExclusiveGateway_0lsru7z" targetRef="UpdateAAIVfModulePrep" />
+ <bpmn2:scriptTask id="PreProcessUpdateAAIGenericVnf" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1yehsyc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1a7lzhz</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doDeleteVfModule = new DoDeleteVfModule()
+doDeleteVfModule.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="UpdateAAIGenericVnfTask" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoDVfMod_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1a7lzhz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14l7olw</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="DoDeleteVfModuleRequest" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds x="34" y="57" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="52" y="98" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
+ <dc:Bounds x="144" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
+ <di:waypoint xsi:type="dc:Point" x="70" y="75" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="104" y="0" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">
+ <dc:Bounds x="480" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="PrepareUpdateAAIVfModulePrep">
+ <dc:Bounds x="315" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_168">
+ <di:waypoint xsi:type="dc:Point" x="244" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="315" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="269" y="0" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
+ <dc:Bounds x="631" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
+ <dc:Bounds x="776" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
+ <dc:Bounds x="871" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
+ <dc:Bounds x="1022" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_CallActivity_14">
+ <di:waypoint xsi:type="dc:Point" x="971" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="997" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
+ <dc:Bounds x="97" y="467" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
+ <dc:Bounds x="229" y="467" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
+ <dc:Bounds x="504" y="467" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
+ <dc:Bounds x="647" y="467" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_CallActivity_14" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="267" />
+ <di:waypoint xsi:type="dc:Point" x="1072" y="426" />
+ <di:waypoint xsi:type="dc:Point" x="53" y="426" />
+ <di:waypoint xsi:type="dc:Point" x="53" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="97" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="411" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_CallActivity_15">
+ <di:waypoint xsi:type="dc:Point" x="197" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="213" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="213" y="508" />
+ <di:waypoint xsi:type="dc:Point" x="229" y="508" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="225" y="360" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_CallActivity_15" targetElement="_BPMNShape_ScriptTask_251">
+ <di:waypoint xsi:type="dc:Point" x="329" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="507" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_CallActivity_16">
+ <di:waypoint xsi:type="dc:Point" x="604" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="492" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
+ <dc:Bounds x="793" y="489" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="811" y="530" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_16" targetElement="_BPMNShape_EndEvent_169">
+ <di:waypoint xsi:type="dc:Point" x="747" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="793" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="770" y="492" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_42" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_160">
+ <di:waypoint xsi:type="dc:Point" x="415" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="480" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="0" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ScriptTask_170">
+ <di:waypoint xsi:type="dc:Point" x="731" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="753" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="753" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="776" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="768" y="76" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="validateSDNCResponse">
+ <dc:Bounds x="361" y="467" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_251" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="461" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="504" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="483" y="492" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0la8haz_di" bpmnElement="DeleteNetworkPoliciesFromAAI">
+ <dc:Bounds x="301" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j9dvfx_di" bpmnElement="SequenceFlow_1j9dvfx">
+ <di:waypoint xsi:type="dc:Point" x="580" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="631" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="51" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01cvxjf_di" bpmnElement="SequenceFlow_01cvxjf">
+ <di:waypoint xsi:type="dc:Point" x="876" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="150" />
+ <di:waypoint xsi:type="dc:Point" x="27" y="150" />
+ <di:waypoint xsi:type="dc:Point" x="27" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="497" y="135" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lewl6b_di" bpmnElement="PostProcessVNFAdapterRequest">
+ <dc:Bounds x="144" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0coa90m_di" bpmnElement="SequenceFlow_0coa90m">
+ <di:waypoint xsi:type="dc:Point" x="244" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="301" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="273" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1drlnlk_di" bpmnElement="ExclusiveGateway_1drlnlk" isMarkerVisible="true">
+ <dc:Bounds x="442" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="429" y="164" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08g02ch_di" bpmnElement="SequenceFlow_08g02ch">
+ <di:waypoint xsi:type="dc:Point" x="401" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="442" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="422" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yehsyc_di" bpmnElement="SequenceFlow_1yehsyc">
+ <di:waypoint xsi:type="dc:Point" x="467" y="252" />
+ <di:waypoint xsi:type="dc:Point" x="467" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="504" y="319" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="433" y="274.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a7lzhz_di" bpmnElement="SequenceFlow_1a7lzhz">
+ <di:waypoint xsi:type="dc:Point" x="604" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="681" y="319" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="319" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0lsru7z_di" bpmnElement="ExclusiveGateway_0lsru7z" isMarkerVisible="true">
+ <dc:Bounds x="786" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="811" y="252" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ep3hjm_di" bpmnElement="SequenceFlow_0ep3hjm">
+ <di:waypoint xsi:type="dc:Point" x="492" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="786" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="633" y="202" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14l7olw_di" bpmnElement="SequenceFlow_14l7olw">
+ <di:waypoint xsi:type="dc:Point" x="781" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="252" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="796" y="304" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fp1wqz_di" bpmnElement="SequenceFlow_0fp1wqz">
+ <di:waypoint xsi:type="dc:Point" x="836" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="854" y="202" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_18y0guc_di" bpmnElement="PreProcessUpdateAAIGenericVnf">
+ <dc:Bounds x="504" y="279" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0kbqf50_di" bpmnElement="UpdateAAIGenericVnfTask">
+ <dc:Bounds x="681" y="279" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnf.bpmn
new file mode 100644
index 0000000..2e9d860
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnf.bpmn
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_9MhrcHqVEea26OhQB97uCQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteVnf" name="DoDeleteVnf" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
+ <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoDeleteVnf deleteVnf = new DoDeleteVnf()
+deleteVnf.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="callGetVnf" />
+ <bpmn2:callActivity id="callGetVnf" name="Get&#10;&#10;Generic Vnf" calledElement="GenericGetVnf">
+ <bpmn2:extensionElements>
+ <camunda:out source="GENGV_vnf" target="DoDVNF_genericVnf" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="GENGV_SuccessIndicator" target="GENGV_SuccessIndicator" />
+ <camunda:out source="GENGV_FoundIndicator" target="GENGV_FoundIndicator" />
+ <camunda:in source="DoDVNF_type" target="GENGV_type" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DoDVNF_vnfId" target="GENGV_vnfId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callGetVnf" targetRef="vnfFoundCheck" />
+ <bpmn2:exclusiveGateway id="vnfFoundCheck" name="Vnf Found?" default="notFound">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>vnfFound</bpmn2:outgoing>
+ <bpmn2:outgoing>notFound</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="vnfFound" name="Yes" sourceRef="vnfFoundCheck" targetRef="processResponse">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_FoundIndicator") == true && execution.getVariable("GENGV_SuccessIndicator") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="vnfFoundCheck" targetRef="IntermediateThrowEvent_1" />
+ <bpmn2:scriptTask id="processResponse" name="Process Response" scriptFormat="groovy">
+ <bpmn2:incoming>vnfFound</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoDeleteVnf deleteVnf = new DoDeleteVnf()
+deleteVnf.processGetVnfResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="processResponse" targetRef="vnfInUseCheck" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="Skip Delete">
+ <bpmn2:incoming>notFound</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="LinkEventDefinition_1" name="Skip Delete" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="vnfInUseCheck" name="Vnf In Use?" default="notInUse">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>inUse</bpmn2:outgoing>
+ <bpmn2:outgoing>notInUse</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="inUse" name="Yes" sourceRef="vnfInUseCheck" targetRef="createWorkflowExceptionInUse">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoDVNF_vnfInUse") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="notInUse" name="No" sourceRef="vnfInUseCheck" targetRef="callDeleteVnf" />
+ <bpmn2:scriptTask id="createWorkflowExceptionInUse" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>inUse</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Can't Delete Generic Vnf. Generic Vnf is still in use.")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="createWorkflowExceptionInUse" targetRef="EndEvent_1" />
+ <bpmn2:callActivity id="callDeleteVnf" name="Delete&#10;&#10;Generic Vnf" calledElement="GenericDeleteVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoDVNF_vnfId" target="GENDV_vnfId" />
+ <camunda:in source="DoDVNF_type" target="GENDV_type" />
+ <camunda:out source="GENDV_SuccessIndicator" target="GENDV_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DoDVNF_resourceVersion" target="GENDV_resourceVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>notInUse</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_93" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="callDeleteVnf" targetRef="ExclusiveGateway_2" />
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" />
+ <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" />
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_2" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="Skip Delete">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="LinkEventDefinition_2" name="Skip Delete" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="IntermediateCatchEvent_1" targetRef="ExclusiveGateway_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" />
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
+ <dc:Bounds x="215" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="233" y="250" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
+ <dc:Bounds x="322" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="251" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="322" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="287" y="212.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="422" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="504" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="463" y="213" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_314" bpmnElement="processResponse">
+ <dc:Bounds x="704" y="291" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_63" bpmnElement="callGetVnf">
+ <dc:Bounds x="504" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_236" bpmnElement="vnfInUseCheck" isMarkerVisible="true">
+ <dc:Bounds x="840" y="305" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="335" width="73" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_314" targetElement="_BPMNShape_ExclusiveGateway_236">
+ <di:waypoint xsi:type="dc:Point" x="804" y="331" />
+ <di:waypoint xsi:type="dc:Point" x="840" y="330" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="799" y="325" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_63" targetElement="_BPMNShape_ExclusiveGateway_237">
+ <di:waypoint xsi:type="dc:Point" x="604" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="634" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="630" y="227" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="createWorkflowExceptionInUse">
+ <dc:Bounds x="912" y="196" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_64" bpmnElement="callDeleteVnf">
+ <dc:Bounds x="912" y="384" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="inUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="_BPMNShape_ScriptTask_315">
+ <di:waypoint xsi:type="dc:Point" x="865" y="305" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="236" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="236" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="867" y="258" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="notInUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="_BPMNShape_CallActivity_64">
+ <di:waypoint xsi:type="dc:Point" x="865" y="355" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="424" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="424" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="870" y="384" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1100" y="218" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1118" y="259" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_315" targetElement="_BPMNShape_EndEvent_236">
+ <di:waypoint xsi:type="dc:Point" x="1012" y="236" />
+ <di:waypoint xsi:type="dc:Point" x="1100" y="236" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1062" y="236" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_237" bpmnElement="vnfFoundCheck" isMarkerVisible="true">
+ <dc:Bounds x="634" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="672" y="240" width="72" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="vnfFound" sourceElement="_BPMNShape_ExclusiveGateway_237" targetElement="_BPMNShape_ScriptTask_314">
+ <di:waypoint xsi:type="dc:Point" x="659" y="252" />
+ <di:waypoint xsi:type="dc:Point" x="659" y="331" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="331" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="659" y="288" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_2" bpmnElement="IntermediateThrowEvent_1">
+ <dc:Bounds x="740" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="143" width="73" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_237" targetElement="_BPMNShape_IntermediateThrowEvent_2">
+ <di:waypoint xsi:type="dc:Point" x="659" y="202" />
+ <di:waypoint xsi:type="dc:Point" x="659" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="740" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="662" y="144" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1174" y="405" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1192" y="446" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_238" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="1062" y="398" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1087" y="453" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_CallActivity_64" targetElement="_BPMNShape_ExclusiveGateway_238">
+ <di:waypoint xsi:type="dc:Point" x="1012" y="424" />
+ <di:waypoint xsi:type="dc:Point" x="1062" y="423" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="423" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_238">
+ <di:waypoint xsi:type="dc:Point" x="1111" y="422" />
+ <di:waypoint xsi:type="dc:Point" x="1174" y="423" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1143" y="407.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_2" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds x="1069" y="492" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1051" y="533" width="73" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_IntermediateCatchEvent_2" targetElement="_BPMNShape_ExclusiveGateway_238">
+ <di:waypoint xsi:type="dc:Point" x="1087" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="1087" y="448" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1084" y="462" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="379" y="614" width="312" height="157" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
+ <dc:Bounds x="408" y="675" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="426" y="716" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds x="624" y="675" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="642" y="716" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
+ <dc:Bounds x="486" y="653" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">
+ <di:waypoint xsi:type="dc:Point" x="444" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="486" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="465" y="693" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="586" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="605" y="693" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateVfModule.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateVfModule.bpmn
new file mode 100644
index 0000000..5911067
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateVfModule.bpmn
@@ -0,0 +1,668 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="DoUpdateVfModule" name="DoUpdateVfModule" isExecutable="true">
+ <bpmn2:documentation>This flow expects its incoming request to be in the variable 'DoUpdateVfModuleRequest'. This flow produces no output.</bpmn2:documentation>
+ <bpmn2:scriptTask id="PrepareUpdateAAIVfModule_prep" name="Prepare Update AAI Vf Module (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepPrepareUpdateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="PrepareUpdateAAIVfModule_prep" targetRef="ScriptTask_1"/>
+ <bpmn2:callActivity id="ScriptTask_1" name="Prepare Update AAI Vf Module" calledElement="PrepareUpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_prepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="PUAAIVfMod_outVfModule" target="DOUPVfMod_vfModule"/>
+ <camunda:out source="PUAAIVfMod_vnfName" target="DOUPVfMod_vnfNameFromAAI"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="PrepareUpdateAAIVfModule_prep"/>
+ <bpmn2:subProcess id="SubProcess_1" name="Catch Exception" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_16" name="Handle Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.handleWorkflowException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ScriptTask_16" targetRef="EndEvent_3"/>
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_16"/>
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_5">
+ <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_12"/>
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_70"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_5"/>
+ <bpmn2:scriptTask id="ScriptTask_10" name="Update AAI Vf Module (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ScriptTask_10" targetRef="ScriptTask_11"/>
+ <bpmn2:callActivity id="ScriptTask_11" name="UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:in source="DOUPVfMod_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="ScriptTask_11" targetRef="ScriptTask_12"/>
+ <bpmn2:scriptTask id="ScriptTask_12" name="SDNC Topology Activate (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyAct(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="ScriptTask_12" targetRef="ScriptTask_13"/>
+ <bpmn2:callActivity id="ScriptTask_13" name="SDNCAdapter Topology Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_sdncActivateRequest" target="sdncAdapterWorkflowRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:out source="sdncAdapterResponse" target="DOUPVfMod_sdncActivateResponse"/>
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_14" name="Update AAI Generic Vnf (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_14" targetRef="ExclusiveGateway_1"/>
+ <bpmn2:callActivity id="CallActivity_1" name="UpdateAAIGenericVnf" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_10"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Skip Update&#xD;&#xA;Generic Vnf?" default="SequenceFlow_14">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="Do the update" sourceRef="ExclusiveGateway_1" targetRef="CallActivity_1"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="Skip the update" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_10">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy">${execution.getVariable('DOUPVfMod_skipUpdateGenericVnf')} == true</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest"/>
+ <bpmn2:scriptTask id="ScriptTask_4" name="SDNC Topology Change/Assign (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyChg(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ScriptTask_4" targetRef="ScriptTask_5"/>
+ <bpmn2:callActivity id="ScriptTask_5" name="SDNC Adapter Topology Change/Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_sdncChangeAssignRequest" target="sdncAdapterWorkflowRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:out source="sdncAdapterResponse" target="DOUPVfMod_sdncChangeAssignResponse"/>
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="ScriptTask_9" name="VnfAdapterRest" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_vnfAdapterRestRequest" target="vnfAdapterRestV1Request"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:out source="vnfAdapterRestV1Response" target="DOUPVfMod_vnfAdapterRestResponse"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ScriptTask_9" targetRef="ScriptTask_14"/>
+ <bpmn2:scriptTask id="ScriptTask_8" name="VNF Adapter (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepVnfAdapterRest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ScriptTask_8" targetRef="ScriptTask_9"/>
+ <bpmn2:scriptTask id="ScriptTask_15" name="Validate SDNC Query Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncTopologyResponse")
+def duvm = new DoUpdateVfModule()
+duvm.validateSDNCResponse(execution, response, "query")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="ScriptTask_7" name="SDNCAdapter Topology Query" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_sdncTopologyRequest" target="sdncAdapterWorkflowRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:out source="sdncAdapterResponse" target="DOUPVfMod_sdncTopologyResponse"/>
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_18" name="Validate SDNC Change/Assign Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncChangeAssignResponse")
+def duvm = new DoUpdateVfModule()
+duvm.validateSDNCResponse(execution, response, "changeassign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_5" targetRef="ScriptTask_18"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_18" targetRef="ScriptTask_6"/>
+ <bpmn2:scriptTask id="ScriptTask_6" name="SDNC Topology Query (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyQuery(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_7"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_15"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ScriptTask_15" targetRef="ScriptTask_8"/>
+ <bpmn2:exclusiveGateway id="IsBaseVfModule" name="Is Base VF Module?" default="SequenceFlow_30">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_1" targetRef="IsBaseVfModule"/>
+ <bpmn2:callActivity id="ScriptTask_3" name="Confirm VolumeGroup Tenant" calledElement="ConfirmVolumeGroupTenant">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_volumeGroupId" target="volumeGroupId"/>
+ <camunda:in source="DOUPVfMod_tenantId" target="tenantId"/>
+ <camunda:in source="DOUPVfMod_aicCloudRegion" target="aicCloudRegion"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_3" targetRef="ScriptTask_4"/>
+ <bpmn2:scriptTask id="ScriptTask_2" name="Confirm VolumeGroup Tenant (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepConfirmVolumeGroupTenant(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_3"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="VolumeGroupId &#xD;&#xA;present?" default="SequenceFlow_16">
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="Yes" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy">${execution.getVariable('DOUPVfMod_volumeGroupId').isEmpty()} == false</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="No" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_4"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="IsBaseVfModule" targetRef="ExclusiveGateway_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DOUPVfMod_isBaseVfModule") == "true"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="QueryAAIVfModule" name="Query AAI Vf Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doUpdateVfModule = new DoUpdateVfModule()
+doUpdateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="no" sourceRef="IsBaseVfModule" targetRef="QueryAAIVfModule"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="QueryAAIVfModule" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ExclusiveGateway_3" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_13" targetRef="ScriptTask_19"/>
+ <bpmn2:scriptTask id="ScriptTask_19" name="PostProcess SDNC Adapter Activate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncActivateResponse")
+def duvm = new DoUpdateVfModule()
+duvm.validateSDNCResponse(execution, response, "activate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_17" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// This variable is checked by the unit test
+execution.setVariable('DoUpdateVfModuleSuccessIndicator', true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_17" targetRef="EndEvent_1"/>
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_10"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_19" targetRef="ScriptTask_17"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="150.0" y="214.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="151.0" y="255.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
+ <dc:Bounds height="80.0" width="100.0" x="300.0" y="192.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
+ <di:waypoint xsi:type="dc:Point" x="186.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="300.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="208.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="PrepareUpdateAAIVfModule_prep">
+ <dc:Bounds height="80.0" width="100.0" x="456.0" y="192.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">
+ <di:waypoint xsi:type="dc:Point" x="400.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="456.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="492.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_164" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="624.0" y="192.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ScriptTask_164">
+ <di:waypoint xsi:type="dc:Point" x="556.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="575.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_88" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1039.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="109.0" x="1011.0" y="172.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_165" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="1152.0" y="192.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_88" targetElement="_BPMNShape_ScriptTask_165">
+ <di:waypoint xsi:type="dc:Point" x="1089.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1152.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1099.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_166" bpmnElement="ScriptTask_3">
+ <dc:Bounds height="80.0" width="100.0" x="1308.0" y="192.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_165" targetElement="_BPMNShape_ScriptTask_166">
+ <di:waypoint xsi:type="dc:Point" x="1252.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1308.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1271.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_167" bpmnElement="ScriptTask_4">
+ <dc:Bounds height="80.0" width="100.0" x="72.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="ScriptTask_5">
+ <dc:Bounds height="80.0" width="100.0" x="239.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_169" bpmnElement="ScriptTask_6">
+ <dc:Bounds height="80.0" width="100.0" x="535.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_167" targetElement="_BPMNShape_ScriptTask_168">
+ <di:waypoint xsi:type="dc:Point" x="172.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="239.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="197.0" y="460.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_88" targetElement="_BPMNShape_ScriptTask_167">
+ <di:waypoint xsi:type="dc:Point" x="1064.0" y="256.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1064.0" y="351.0"/>
+ <di:waypoint xsi:type="dc:Point" x="122.0" y="351.0"/>
+ <di:waypoint xsi:type="dc:Point" x="122.0" y="420.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="1073.0" y="271.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_166" targetElement="_BPMNShape_ScriptTask_167">
+ <di:waypoint xsi:type="dc:Point" x="1358.0" y="272.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1358.0" y="352.0"/>
+ <di:waypoint xsi:type="dc:Point" x="639.0" y="352.0"/>
+ <di:waypoint xsi:type="dc:Point" x="122.0" y="352.0"/>
+ <di:waypoint xsi:type="dc:Point" x="122.0" y="420.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="927.0" y="352.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="ScriptTask_7">
+ <dc:Bounds height="80.0" width="100.0" x="684.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_169" targetElement="_BPMNShape_ScriptTask_170">
+ <di:waypoint xsi:type="dc:Point" x="635.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="684.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="648.0" y="460.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="ScriptTask_8">
+ <dc:Bounds height="80.0" width="100.0" x="996.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ScriptTask_9">
+ <dc:Bounds height="80.0" width="100.0" x="1176.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="1096.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1176.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1133.0" y="460.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="ScriptTask_10">
+ <dc:Bounds height="80.0" width="100.0" x="466.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="ScriptTask_11">
+ <dc:Bounds height="80.0" width="100.0" x="624.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_ScriptTask_219">
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="500.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="576.0"/>
+ <di:waypoint xsi:type="dc:Point" x="194.0" y="576.0"/>
+ <di:waypoint xsi:type="dc:Point" x="194.0" y="636.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="821.0" y="576.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_ScriptTask_174">
+ <di:waypoint xsi:type="dc:Point" x="566.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="591.0" y="676.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="ScriptTask_12">
+ <dc:Bounds height="80.0" width="100.0" x="804.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="ScriptTask_13">
+ <dc:Bounds height="80.0" width="100.0" x="984.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ScriptTask_174" targetElement="_BPMNShape_ScriptTask_175">
+ <di:waypoint xsi:type="dc:Point" x="724.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="804.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="695.0" y="674.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_175" targetElement="_BPMNShape_ScriptTask_176">
+ <di:waypoint xsi:type="dc:Point" x="904.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="984.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="902.0" y="676.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="1208.0" y="906.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="1201.0" y="947.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds height="198.0" width="475.0" x="239.0" y="924.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="ScriptTask_16">
+ <dc:Bounds height="80.0" width="100.0" x="399.0" y="984.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="617.0" y="1006.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="635.0" y="1047.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_EndEvent_163">
+ <di:waypoint xsi:type="dc:Point" x="499.0" y="1024.0"/>
+ <di:waypoint xsi:type="dc:Point" x="617.0" y="1024.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="555.0" y="1024.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_46" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="696.0" y="1005.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="711.0" y="1046.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_164" bpmnElement="EndEvent_5">
+ <dc:Bounds height="36.0" width="36.0" x="814.0" y="1005.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="832.0" y="1046.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_BoundaryEvent_46" targetElement="_BPMNShape_EndEvent_164">
+ <di:waypoint xsi:type="dc:Point" x="732.0" y="1023.0"/>
+ <di:waypoint xsi:type="dc:Point" x="814.0" y="1023.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="770.0" y="1023.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_56" bpmnElement="StartEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="305.0" y="1006.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="323.0" y="1047.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_StartEvent_56" targetElement="_BPMNShape_ScriptTask_179">
+ <di:waypoint xsi:type="dc:Point" x="341.0" y="1024.0"/>
+ <di:waypoint xsi:type="dc:Point" x="399.0" y="1024.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="302.0" y="1084.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_180" bpmnElement="ScriptTask_17">
+ <dc:Bounds height="80.0" width="100.0" x="1176.0" y="768.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_180" targetElement="_BPMNShape_EndEvent_162">
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="848.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="906.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1223.0" y="868.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="ScriptTask_14">
+ <dc:Bounds height="80.0" width="100.0" x="144.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_2" bpmnElement="CallActivity_1">
+ <dc:Bounds height="80.0" width="100.0" x="300.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_CallActivity_2" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="400.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="466.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="431.0" y="676.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_219" targetElement="_BPMNShape_ExclusiveGateway_213">
+ <di:waypoint xsi:type="dc:Point" x="194.0" y="716.0"/>
+ <di:waypoint xsi:type="dc:Point" x="195.0" y="793.0"/>
+ <di:waypoint xsi:type="dc:Point" x="284.0" y="793.0"/>
+ <di:waypoint xsi:type="dc:Point" x="324.0" y="793.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="191.0" y="746.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_213" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="324.0" y="768.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="349.0" y="823.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_CallActivity_2">
+ <di:waypoint xsi:type="dc:Point" x="349.0" y="768.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="716.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="80.0" x="357.0" y="733.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="374.0" y="793.0"/>
+ <di:waypoint xsi:type="dc:Point" x="515.0" y="793.0"/>
+ <di:waypoint xsi:type="dc:Point" x="516.0" y="716.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="97.0" x="380.0" y="768.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="ScriptTask_15">
+ <dc:Bounds height="80.0" width="100.0" x="840.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="ScriptTask_18">
+ <dc:Bounds height="80.0" width="100.0" x="384.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_221">
+ <di:waypoint xsi:type="dc:Point" x="339.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="384.0" y="460.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_169">
+ <di:waypoint xsi:type="dc:Point" x="484.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="535.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="511.0" y="460.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_170" targetElement="_BPMNShape_ScriptTask_220">
+ <di:waypoint xsi:type="dc:Point" x="784.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="840.0" y="460.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_220" targetElement="_BPMNShape_ScriptTask_171">
+ <di:waypoint xsi:type="dc:Point" x="940.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="996.0" y="460.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_214" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="965.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="990.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="IsBaseVfModule" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="770.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="795.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="QueryAAIVfModule">
+ <dc:Bounds height="80.0" width="100.0" x="849.0" y="72.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_164" targetElement="_BPMNShape_ExclusiveGateway_215">
+ <di:waypoint xsi:type="dc:Point" x="724.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="747.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="747.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="770.0" y="231.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_214">
+ <di:waypoint xsi:type="dc:Point" x="820.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="965.0" y="231.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="888.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ExclusiveGateway_214" targetElement="_BPMNShape_ExclusiveGateway_88">
+ <di:waypoint xsi:type="dc:Point" x="1015.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1039.0" y="231.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1015.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ScriptTask_285">
+ <di:waypoint xsi:type="dc:Point" x="795.0" y="206.0"/>
+ <di:waypoint xsi:type="dc:Point" x="795.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="849.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="20.0" x="770.0" y="151.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ExclusiveGateway_214">
+ <di:waypoint xsi:type="dc:Point" x="949.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="966.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="990.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="990.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="987.0" y="136.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="ScriptTask_19">
+ <dc:Bounds height="80.0" width="100.0" x="1176.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_176" targetElement="_BPMNShape_ScriptTask_286">
+ <di:waypoint xsi:type="dc:Point" x="1084.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1176.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1121.0" y="676.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_286" targetElement="_BPMNShape_ScriptTask_180">
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="716.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="768.0"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties b/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties
new file mode 100644
index 0000000..b3fee32
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties
@@ -0,0 +1,29 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP MSO
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+# URN mappings for this project.
+
+# TODO: Remove all the non-URN stuff that's in here.
+# TODO: Implement a real URN mapping capability.
+
+#AAIEndPoint= http://localhost:8080/SoapUIMocks
+AAIEndPoint= http://localhost:28090/
+SDNCEndPoint=http://localhost:28090/SDNCAdapter/
+msoRollback = true
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100644
index 0000000..130f95e
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -0,0 +1,31 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<jboss-deployment-structure>
+ <deployment>
+ <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
+ <exclusions>
+ <module name="org.apache.log4j" />
+ <module name="org.slf4j" />
+ <module name="org.slf4j.impl" />
+ </exclusions>
+ </deployment>
+</jboss-deployment-structure>
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644
index 0000000..42717c5
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..3bdba77
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+ <display-name>MSO Infrastructure BPMN Workflow Servlet</display-name>
+ <servlet>
+ <servlet-name>resteasy-servlet</servlet-name>
+ <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+ <init-param>
+ <param-name>javax.ws.rs.Application</param-name>
+ <param-value>org.openecomp.mso.bpmn.infrastructure.workflow.service.WorkflowResourceApplication</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>resteasy-servlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+ <context-param>
+ <param-name>mso.configuration</param-name>
+ <param-value>MSO_PROP_TOPOLOGY=topology.properties</param-value>
+ </context-param>
+ <context-param>
+ <param-name>log.configuration</param-name>
+ <param-value>logback.bpmn.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>resteasy.resources</param-name>
+ <param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.bpmn.core.HealthCheckHandler</param-value>
+ </context-param>
+ <filter>
+ <filter-name>LogFilter</filter-name>
+ <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>LogFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>HTTPBasicAuth</web-resource-name>
+ <description>Authentication for Client Apps</description>
+ <url-pattern>/workflow/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>BPMN-Client</role-name>
+ </auth-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>ApplicationRealm</realm-name>
+ </login-config>
+ <security-role>
+ <role-name>BPMN-Client</role-name>
+ </security-role>
+</web-app> \ No newline at end of file