diff options
author | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2017-05-02 03:53:18 -0700 |
---|---|---|
committer | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2017-05-02 06:59:21 -0700 |
commit | 94ee92559b051f2f82ed681f841f4f13016842ed (patch) | |
tree | 9760a0ad7da03572ed4c9dc596c4b0f537e64112 /bpmn/MSOInfrastructureBPMN/src/main | |
parent | 43bbca64032716730d2e7795b6569d5fdbda9d12 (diff) |
[MSO-8] Second step of the rebase for MSO
Second rebase containing additional features for MSO + total reworking
of the BPMN structure + Notification flow can now be added at the end of
some BPMN flows
Change-Id: I7e937c7a0ba1593ca85e164a093f79c7e38b6ce0
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main')
74 files changed, 18906 insertions, 13541 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 index b48e07f158..88e2396078 100644 --- 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 @@ -1,749 +1,752 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.mso.bpmn.infrastructure.scripts; - -import groovy.xml.XmlUtil -import groovy.json.* - -import org.openecomp.mso.bpmn.core.json.JsonUtils -import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils -import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil -import org.openecomp.mso.bpmn.common.scripts.VidUtils -import org.openecomp.mso.bpmn.core.WorkflowException -import org.openecomp.mso.rest.APIResponse; -import org.openecomp.mso.rest.RESTClient -import org.openecomp.mso.rest.RESTConfig - -import java.util.UUID; - -import org.camunda.bpm.engine.delegate.BpmnError -import org.camunda.bpm.engine.runtime.Execution -import org.json.JSONObject; -import org.json.JSONArray; -import org.apache.commons.lang3.* -import org.apache.commons.codec.binary.Base64; -import org.springframework.web.util.UriUtils; - -/** - * This groovy class supports the <class>CreateGenericMacroServiceNetworkVnf.bpmn</class> process. - * - */ -public class CreateGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor { - - String Prefix="CREVAS_" - ExceptionUtil exceptionUtil = new ExceptionUtil() - JsonUtils jsonUtil = new JsonUtils() - VidUtils vidUtils = new VidUtils() - CatalogDbUtils catalogDbUtils = new CatalogDbUtils() - - /** - * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process. - * @param execution - */ - public InitializeProcessVariables(Execution execution){ - /* Initialize all the process variables in this block */ - - execution.setVariable("createGenericMacroServiceNetworkVnfRequest", "") - execution.setVariable("globalSubscriberId", "") - execution.setVariable("serviceInstanceName", "") - execution.setVariable("msoRequestId", "") - execution.setVariable("CREVAS_NetworksCreatedCount", 0) - execution.setVariable("CREVAS_VnfsCreatedCount", 0) - execution.setVariable("productFamilyId", "") - - - //TODO - execution.setVariable("sdncVersion", "1702") - } - - // ************************************************** - // Pre or Prepare Request Section - // ************************************************** - /** - * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process. - * @param execution - */ - public void preProcessRequest (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix",Prefix) - - utils.log("DEBUG", " ***** Inside preProcessRequest CreateGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled) - - try { - // initialize flow variables - InitializeProcessVariables(execution) - - // check for incoming json message/input - String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("bpmnRequest") - utils.logAudit(createGenericMacroServiceNetworkVnfRequest) - execution.setVariable("createGenericMacroServiceNetworkVnfRequest", createGenericMacroServiceNetworkVnfRequest); - println 'createGenericMacroServiceNetworkVnfRequest - ' + createGenericMacroServiceNetworkVnfRequest - - // extract requestId - String requestId = execution.getVariable("mso-request-id") - execution.setVariable("msoRequestId", requestId) - - String serviceInstanceId = execution.getVariable("serviceInstanceId") - - if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) { - serviceInstanceId = UUID.randomUUID().toString() - utils.log("DEBUG", " Generated new Service Instance: " + serviceInstanceId , isDebugEnabled) - } else { - utils.log("DEBUG", "Using provided Service Instance ID: " + serviceInstanceId , isDebugEnabled) - } - - serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8") - execution.setVariable("serviceInstanceId", serviceInstanceId) - - String requestAction = execution.getVariable("requestAction") - execution.setVariable("requestAction", requestAction) - - String source = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.source") - if ((source == null) || (source.isEmpty())) { - execution.setVariable("source", "VID") - } else { - execution.setVariable("source", source) - } - - // extract globalSubscriberId - String globalSubscriberId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.subscriberInfo.globalSubscriberId") - - // verify element global-customer-id is sent from JSON input, throw exception if missing - if ((globalSubscriberId == null) || (globalSubscriberId.isEmpty())) { - String dataErrorMessage = " Element 'globalSubscriberId' is missing. " - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } else { - execution.setVariable("globalSubscriberId", globalSubscriberId) - execution.setVariable("globalCustomerId", globalSubscriberId) - } - - // extract subscriptionServiceType - String subscriptionServiceType = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters.subscriptionServiceType") - execution.setVariable("subscriptionServiceType", subscriptionServiceType) - utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled) - - String suppressRollback = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.suppressRollback") - execution.setVariable("disableRollback", suppressRollback) - utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled) - - String productFamilyId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.productFamilyId") - execution.setVariable("productFamilyId", productFamilyId) - utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled) - - //For Completion Handler & Fallout Handler - String requestInfo = - """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> - <request-id>${requestId}</request-id> - <action>CREATE</action> - <source>${source}</source> - </request-info>""" - - execution.setVariable("CREVAS_requestInfo", requestInfo) - - utils.log("DEBUG", " ***** Completed preProcessRequest CreateGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled) - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex){ - String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected from method preProcessRequest() - " + ex.getMessage() - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - } - } - - public void sendSyncResponse (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - - utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) - - try { - String serviceInstanceId = execution.getVariable("serviceInstanceId") - String requestId = execution.getVariable("mso-request-id") - - // RESTResponse (for API Handler (APIH) Reply Task) - String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim() - - utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled) - sendWorkflowResponse(execution, 202, syncResponse) - - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected from method sendSyncResponse() - " + ex.getMessage() - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - } - } - - // ******************************* - // - // ******************************* - public void prepareCreateServiceInstance(Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - - try { - utils.log("DEBUG", " ***** Inside prepareCreateServiceInstance of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) - - String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest") - String serviceModelInfo = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo") - execution.setVariable("serviceModelInfo", serviceModelInfo) - - String serviceInputParams = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters") - execution.setVariable("serviceInputParams", serviceInputParams) - - String serviceInstanceName = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.instanceName") - execution.setVariable("serviceInstanceName", serviceInstanceName) - - utils.log("DEBUG", " ***** Completed prepareCreateServiceInstance of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) - } catch (Exception ex) { - // try error in method block - String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareCreateService() - " + ex.getMessage() - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - } - } - - - public void postProcessServiceInstanceCreate (Execution execution){ - def method = getClass().getSimpleName() + '.postProcessServiceInstanceCreate(' +'execution=' + execution.getId() +')' - def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') - logDebug('Entered ' + method, isDebugLogEnabled) - - String source = execution.getVariable("source") - String requestId = execution.getVariable("mso-request-id") - String serviceInstanceId = execution.getVariable("serviceInstanceId") - String serviceInstanceName = execution.getVariable("serviceInstanceName") - - try { - - String payload = """ - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb"> - <soapenv:Header/> - <soapenv:Body> - <req:updateInfraRequest> - <requestId>${requestId}</requestId> - <lastModifiedBy>BPEL</lastModifiedBy> - <serviceInstanceId>${serviceInstanceId}</serviceInstanceId> - <serviceInstanceName>${serviceInstanceName}</serviceInstanceName> - </req:updateInfraRequest> - </soapenv:Body> - </soapenv:Envelope> - """ - execution.setVariable("CREVAS_setUpdateDbInstancePayload", payload) - utils.logAudit("CREVAS_setUpdateDbInstancePayload: " + payload) - logDebug('Exited ' + method, isDebugLogEnabled) - //println("CMSO_updateDBStatusToSuccessPayload --> " + execution.getVariable("CMSO_updateDBStatusToSuccessPayload")) - - } catch (BpmnError e) { - throw e; - } catch (Exception e) { - logError('Caught exception in ' + method, e) - exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method) - } - } - - - public void callDBCatalog (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - - utils.log("DEBUG", " ***** Inside callDBCatalog() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) - - try { - - // get variable within incoming json - String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest"); - - String catalog_db_endpoint = execution.getVariable("URN_mso_catalog_db_endpoint") - utils.log("DEBUG", "catalog_db_endpoint: "+catalog_db_endpoint, isDebugEnabled) - - String serviceModelInvariantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo.modelInvariantId") - String serviceModelVersion = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo.modelVersion") - utils.log("DEBUG", "getting network list ", isDebugEnabled) - - JSONArray networkList = catalogDbUtils.getAllNetworksByServiceModelInvariantUuidAndServiceModelVersion(catalog_db_endpoint, serviceModelInvariantId, serviceModelVersion) - - //utils.log("DEBUG", "got network list: "+ networkList.toString(), isDebugEnabled) - execution.setVariable("networkList", networkList) - execution.setVariable("networkListString", networkList.toString()) - - 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) - } +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>CreateGenericMacroServiceNetworkVnf.bpmn</class> process.
+ *
+ */
+public class CreateGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="CREVAS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("createGenericMacroServiceNetworkVnfRequest", "")
+ execution.setVariable("globalSubscriberId", "")
+ execution.setVariable("serviceInstanceName", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable("CREVAS_NetworksCreatedCount", 0)
+ execution.setVariable("CREVAS_VnfsCreatedCount", 0)
+ execution.setVariable("productFamilyId", "")
+
+
+ //TODO
+ execution.setVariable("sdncVersion", "1702")
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest CreateGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // check for incoming json message/input
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(createGenericMacroServiceNetworkVnfRequest)
+ execution.setVariable("createGenericMacroServiceNetworkVnfRequest", createGenericMacroServiceNetworkVnfRequest);
+ println 'createGenericMacroServiceNetworkVnfRequest - ' + createGenericMacroServiceNetworkVnfRequest
+
+ // extract requestId
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ utils.log("DEBUG", " Generated new Service Instance: " + serviceInstanceId , isDebugEnabled)
+ } else {
+ utils.log("DEBUG", "Using provided Service Instance ID: " + serviceInstanceId , isDebugEnabled)
+ }
+
+ serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ String requestAction = execution.getVariable("requestAction")
+ execution.setVariable("requestAction", requestAction)
+
+ String source = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ execution.setVariable("source", "VID")
+ } else {
+ execution.setVariable("source", source)
+ }
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+
+ // verify element global-customer-id is sent from JSON input, throw exception if missing
+ if ((globalSubscriberId == null) || (globalSubscriberId.isEmpty())) {
+ String dataErrorMessage = " Element 'globalSubscriberId' is missing. "
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ execution.setVariable("globalCustomerId", globalSubscriberId)
+ }
+
+ // extract subscriptionServiceType
+ String subscriptionServiceType = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
+
+ String suppressRollback = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("disableRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String productFamilyId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("CREVAS_requestInfo", requestInfo)
+
+ utils.log("DEBUG", " ***** Completed preProcessRequest CreateGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareCreateServiceInstance(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareCreateServiceInstance of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+ String serviceModelInfo = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo")
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+
+ String serviceInputParams = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters")
+ execution.setVariable("serviceInputParams", serviceInputParams)
+
+ String serviceInstanceName = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.instanceName")
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+
+ utils.log("DEBUG", " ***** Completed prepareCreateServiceInstance of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareCreateService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ public void postProcessServiceInstanceCreate (Execution execution){
+ def method = getClass().getSimpleName() + '.postProcessServiceInstanceCreate(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+
+ try {
+
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <serviceInstanceName>${serviceInstanceName}</serviceInstanceName>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+ execution.setVariable("CREVAS_setUpdateDbInstancePayload", payload)
+ utils.logAudit("CREVAS_setUpdateDbInstancePayload: " + payload)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ //println("CMSO_updateDBStatusToSuccessPayload --> " + execution.getVariable("CMSO_updateDBStatusToSuccessPayload"))
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+ }
+
+
+ public void callDBCatalog (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside callDBCatalog() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+
+ // get variable within incoming json
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest");
+
+ String catalog_db_endpoint = execution.getVariable("URN_mso_catalog_db_endpoint")
+ utils.log("DEBUG", "catalog_db_endpoint: "+catalog_db_endpoint, isDebugEnabled)
+
+ String serviceModelInvariantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo.modelInvariantId")
+ String serviceModelVersion = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo.modelVersion")
+ utils.log("DEBUG", "getting network list ", isDebugEnabled)
+
+ JSONArray networkList = catalogDbUtils.getAllNetworksByServiceModelInvariantUuidAndServiceModelVersion(catalog_db_endpoint, serviceModelInvariantId, serviceModelVersion)
+
+ //utils.log("DEBUG", "got network list: "+ networkList.toString(), isDebugEnabled)
+ execution.setVariable("networkList", networkList)
+ execution.setVariable("networkListString", networkList.toString())
+
+ networkList = execution.getVariable("networkList");
+ utils.log("DEBUG", "networkList: "+ networkList, isDebugEnabled)
+
+ if (networkList != null && networkList.length() > 0) {
+
+ execution.setVariable("CREVAS_NetworksCount", networkList.length())
+ utils.log("DEBUG", "networks to create: "+ networkList.length(), isDebugEnabled)
+ } else {
+ execution.setVariable("CREVAS_NetworksCount", 0)
+ utils.log("DEBUG", "no networks to create based upon Catalog DB response", isDebugEnabled)
+ }
+
+ // VNFs
+ JSONArray vnfList = catalogDbUtils.getAllVnfsByServiceModelInvariantUuidAndServiceModelVersion(catalog_db_endpoint, serviceModelInvariantId, serviceModelVersion)
+ execution.setVariable("vnfList", vnfList)
+
+ String vnfModelInfoString = ""
+ if (vnfList != null && vnfList.length() > 0) {
+ execution.setVariable("CREVAS_VNFsCount", vnfList.length())
+ utils.log("DEBUG", "vnfs to create: "+ vnfList.length(), isDebugEnabled)
+ JSONObject vnfModelInfo = vnfList.getJSONObject(0).getJSONObject("modelInfo")
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ execution.setVariable("CREVAS_VNFsCount", 0)
+ utils.log("DEBUG", "no vnfs to create based upon Catalog DB response", isDebugEnabled)
+ }
+
+ execution.setVariable("vnfModelInfo", vnfModelInfoString)
+ //utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed callDBCatalog() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. callDBCatalog() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareNetworkCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside preparenNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+// String disableRollback = execution.getVariable("disableRollback")
+// def backoutOnFailure = ""
+// if(disableRollback != null){
+// if ( disableRollback == true) {
+// backoutOnFailure = "false"
+// } else if ( disableRollback == false) {
+// backoutOnFailure = "true"
+// }
+// }
+ //failIfExists - optional
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+
+ JSONArray networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "array networkList: "+ networkList, isDebugEnabled)
+
+ if (networkList == null || networkList.length() < 1){
+ networkList = new JSONArray(execution.getVariable("networkListString"))
+ utils.log("DEBUG", "array from string networkList: "+ networkList, isDebugEnabled)
+ }
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ String networkModelInfoString = ""
+
+ if (networkList != null) {
+ utils.log("DEBUG", " getting model info for network # :" + networksCreatedCount, isDebugEnabled)
+ JSONObject networkModelInfo = networkList.getJSONObject(networksCreatedCount.intValue()).getJSONObject("modelInfo")
+ networkModelInfoString = networkModelInfo.toString()
+ } else {
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected number of networks to create - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ execution.setVariable("networkModelInfo", networkModelInfoString)
+ utils.log("DEBUG", " networkModelInfoString :" + networkModelInfoString, isDebugEnabled)
+
+// String networkModelInfo = execution.getVariable("networkModelInfo")
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+ utils.log("DEBUG", "vnfList: "+ vnfList, isDebugEnabled)
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ utils.log("DEBUG", "vnfModelInfo: "+ vnfModelInfo, isDebugEnabled)
+
+ networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "networkList: "+ networkList, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed preparenNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareNetworkCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section -> increment count
+ // *******************************
+ public void validateNetworkCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ networksCreatedCount++
+
+ execution.setVariable("CREVAS_NetworksCreatedCount", networksCreatedCount)
+
+ execution.setVariable("DCRENI_rollbackData"+networksCreatedCount, execution.getVariable("DCRENI_rollbackData"))
+
+ utils.log("DEBUG", "networksCreatedCount: "+ networksCreatedCount, isDebugEnabled)
+ utils.log("DEBUG", "DCRENI_rollbackData N : "+ execution.getVariable("DCRENI_rollbackData"+networksCreatedCount), isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+ utils.log("DEBUG", "vnfList: "+ vnfList, isDebugEnabled)
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ utils.log("DEBUG", "vnfModelInfo: "+ vnfModelInfo, isDebugEnabled)
+
+ JSONArray networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "networkList: "+ networkList, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed validateNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** "+" network # "+networksCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateNetworkCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareVnfAndModulesCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareVnfAndModulesCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ // String disableRollback = execution.getVariable("disableRollback")
+ // def backoutOnFailure = ""
+ // if(disableRollback != null){
+ // if ( disableRollback == true) {
+ // backoutOnFailure = "false"
+ // } else if ( disableRollback == false) {
+ // backoutOnFailure = "true"
+ // }
+ // }
+ //failIfExists - optional
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+ String productFamilyId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG","productFamilyId: "+ productFamilyId, isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+
+ Integer vnfsCreatedCount = execution.getVariable("CREVAS_VnfsCreatedCount")
+ String vnfModelInfoString = null;
+
+ if (vnfList != null && vnfList.length() > 0 ) {
+ utils.log("DEBUG", "getting model info for vnf # " + vnfsCreatedCount, isDebugEnabled)
+ JSONObject vnfModelInfo1 = vnfList.getJSONObject(0).getJSONObject("modelInfo")
+ utils.log("DEBUG", "got 0 ", isDebugEnabled)
+ JSONObject vnfModelInfo = vnfList.getJSONObject(vnfsCreatedCount.intValue()).getJSONObject("modelInfo")
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ //TODO: vnfList does not contain data. Need to investigate why ... . Fro VIPR use model stored
+ vnfModelInfoString = execution.getVariable("vnfModelInfo")
+ }
+
+ utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
+
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareVnfAndModulesCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareVnfAndModulesCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateVnfCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer vnfsCreatedCount = execution.getVariable("CREVAS_VnfsCreatedCount")
+ vnfsCreatedCount++
+
+ execution.setVariable("CREVAS_VnfsCreatedCount", vnfsCreatedCount)
+
+ utils.log("DEBUG", " ***** Completed validateVnfCreate of CreateGenericMacroServiceNetworkVnf ***** "+" vnf # "+vnfsCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateVnfCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section -> decrement count
+ // *******************************
+ public void validateNetworkRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ networksCreatedCount--
+
+ execution.setVariable("CREVAS_NetworksCreatedCount", networksCreatedCount)
+
+ execution.setVariable("DCRENI_rollbackData", execution.getVariable("DCRENI_rollbackData"+networksCreatedCount))
+
+ utils.log("DEBUG", " ***** Completed validateNetworkRollback of CreateGenericMacroServiceNetworkVnf ***** "+" network # "+networksCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateNetworkRollback() - " + ex.getMessage()
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ execution.setVariable("CREVAS_NetworksCreatedCount", 0)
+ utils.log("ERROR", exceptionMessage, true)
+ }
+ }
+ // *******************************
+ // Build DB request Section
+ // *******************************
+// public void prepareDBRequest (Execution execution) {
+// def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+//
+// try {
+// utils.log("DEBUG", " ***** Inside prepareDBRequest of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+//
+// String requestId = execution.getVariable("CREVAS_requestId")
+// String statusMessage = "vIPR ATM Service Instance successfully created."
+// String serviceInstanceId = execution.getVariable("CREVAS_serviceInstanceId")
+//
+// //TODO - verify the format for Service Instance Create,
+// String dbRequest =
+// """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+// <soapenv:Header/>
+// <soapenv:Body>
+// <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+// <requestId>${requestId}</requestId>
+// <lastModifiedBy>BPMN</lastModifiedBy>
+// <statusMessage>${statusMessage}</statusMessage>
+// <responseBody></responseBody>
+// <requestStatus>COMPLETED</requestStatus>
+// <progress>100</progress>
+// <vnfOutputs/>
+// <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+// </ns:updateInfraRequest>
+// </soapenv:Body>
+// </soapenv:Envelope>"""
+//
+// String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+// execution.setVariable("CREVAS_createDBRequest", buildDeleteDBRequestAsString)
+// utils.logAudit(buildDeleteDBRequestAsString)
+//
+// utils.log("DEBUG", " ***** Completed prepareDBRequest of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+// } catch (Exception ex) {
+// // try error in method block
+// String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+//
+// }
+//
+// }
+
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <status-message>Service Instance has been created successfully via macro orchestration</status-message>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <mso-bpel-name>BPMN macro create</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable("CREVAS_Success", true)
+ execution.setVariable("CREVAS_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void preProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** preProcessRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ utils.log("DEBUG", "BPMN Error during preProcessRollback", isDebugEnabled)
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit preProcessRollback of CreateGenericMacroServiceNetworkVnf *** ", isDebugEnabled)
+ }
+
+ public void postProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Setting prevException to WorkflowException: ", isDebugEnabled)
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ } catch (BpmnError b) {
+ utils.log("DEBUG", "BPMN Error during postProcessRollback", isDebugEnabled)
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit postProcessRollback of CreateGenericMacroServiceNetworkVnf *** ", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " *** STARTED CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestInfo = execution.getVariable("CREVAS_requestInfo")
+ utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+ //TODO. hmmm. there is no way to UPDATE error message.
+// String errorMessage = wfex.getErrorMessage()
+// boolean successIndicator = execution.getVariable("DCRESI_rollbackSuccessful")
+// if (successIndicator){
+// errorMessage = errorMessage + ". Rollback successful."
+// } else {
+// errorMessage = errorMessage + ". Rollback not completed."
+// }
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable("CREVAS_falloutRequest", falloutRequest)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncError() of CreateServiceInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("CRESI_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ }catch(BpmnError b){
+ utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("CRESI_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
}
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy index b9b97c7d12..11de8d9819 100644 --- 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 @@ -1,32 +1,32 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; +
+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 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; @@ -105,12 +105,12 @@ public class CreateNetworkInstance extends AbstractServiceTaskProcessor { utils.log("DEBUG", " 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled) } - // get/set 'msoRequestId' and 'mso-request-id' + // get/set 'msoRequestId' and 'mso-request-id'
String requestId = execution.getVariable("msoRequestId") if (requestId != null) { - execution.setVariable("mso-request-id", requestId) + execution.setVariable("mso-request-id", requestId)
} else { - requestId = execution.getVariable("mso-request-id") + requestId = execution.getVariable("mso-request-id")
} execution.setVariable(Prefix + "requestId", requestId) @@ -161,7 +161,7 @@ public class CreateNetworkInstance extends AbstractServiceTaskProcessor { utils.log("DEBUG", " ***** Inside sendSyncResponse() of CreateNetworkInstance ***** ", isDebugEnabled) try { - String requestId = execution.getVariable("mso-request-id") + String requestId = execution.getVariable("mso-request-id")
// RESTResponse (for API Handler (APIH) Reply Task) String createNetworkRestRequest = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim() @@ -214,7 +214,7 @@ public class CreateNetworkInstance extends AbstractServiceTaskProcessor { try { - String requestId = execution.getVariable("mso-request-id") + String requestId = execution.getVariable("mso-request-id")
// REST Error (for API Handler (APIH) Reply Task) String syncError = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim() @@ -248,7 +248,7 @@ public class CreateNetworkInstance extends AbstractServiceTaskProcessor { """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> - <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb"> + <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${requestId}</requestId> <lastModifiedBy>BPMN</lastModifiedBy> <statusMessage>${statusMessage}</statusMessage> @@ -280,13 +280,13 @@ public class CreateNetworkInstance extends AbstractServiceTaskProcessor { try { - String requestId = execution.getVariable("mso-request-id") + 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"> + """<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> @@ -382,22 +382,22 @@ public class CreateNetworkInstance extends AbstractServiceTaskProcessor { utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled) String falloutHandlerRequest = "" - String requestId = execution.getVariable("mso-request-id") + 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"> + """<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:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
<aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage> <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode> </aetgt:WorkflowException> @@ -411,15 +411,15 @@ public class CreateNetworkInstance extends AbstractServiceTaskProcessor { 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"> + """<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:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
<aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage> <aetgt:ErrorCode>7000</aetgt:ErrorCode> </aetgt:WorkflowException> 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 index 202829d820..2205ffd696 100644 --- 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 @@ -1,262 +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) - } +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 index 7f5bd6138b..573deb4155 100644 --- 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 @@ -1,39 +1,41 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 { +import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils;
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+ +public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
+ + ExceptionUtil exceptionUtil = new ExceptionUtil()
/** * Validates the request message and sets up the workflow. @@ -51,68 +53,68 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { execution.setVariable('prefix', prefix) logDebug('Entered 2' + method, isDebugLogEnabled) execution.setVariable("isVidRequest", "false") - - logDebug("Set variables", isDebugLogEnabled) - + + 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") - + execution.setVariable("isVidRequest", "true") + } catch(groovy.json.JsonException je) { utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled) - workflowException(execution, "Invalid request format", 400) - + exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest") + } 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) + exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest") } 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_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_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) @@ -121,22 +123,21 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { 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) - } + exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest") + } } /** @@ -175,45 +176,57 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { 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()) + exceptionUtil.buildAndThrowWorkflowException(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", "requestInfo is: " + requestInfo, isDebugEnabled) utils.log("DEBUG", "action is: " + action, isDebugEnabled) + try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
String payload = - """ <aetgt:MsoCompletionRequest xmlns:aetgt="http://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"> + """ <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> @@ -233,10 +246,10 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { 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 @@ -255,7 +268,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { def prefix = execution.getVariable("prefix") if (prefix == null) { - createWorkflowException(execution, 1002, processKey + " prefix is null") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null") } try { @@ -263,34 +276,34 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { if (request == null) { request = execution.getVariable(processKey + 'Request') - + if (request == null) { request = execution.getVariable('bpmnRequest') } - + setVariable(execution, processKey + 'Request', null); setVariable(execution, 'bpmnRequest', null); setVariable(execution, prefix + 'Request', request); } if (request == null) { - createWorkflowException(execution, 1002, processKey + " request is null") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null") } - + /* - def requestId = execution.getVariable("mso-request-id") - + def requestId = execution.getVariable("mso-request-id")
+ if (requestId == null) { - createWorkflowException(execution, 1002, processKey + " request has no mso-request-id") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id") } - + setVariable(execution, prefix + 'requestId', requestId) - def serviceInstanceId = execution.getVariable("mso-service-instance-id") + def serviceInstanceId = execution.getVariable("mso-service-instance-id")
if (serviceInstanceId == null) { - createWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id") } utils.logContext(requestId, serviceInstanceId) @@ -303,14 +316,13 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, "Invalid Message") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message") } } - + public void prepareUpdateInfraRequest(Execution execution){ def isDebugEnabled = execution.getVariable("isDebugLogEnabled") - ExceptionUtil exceptionUtil = new ExceptionUtil() - + utils.log("DEBUG", " ======== STARTED prepareUpdateInfraRequest Process ======== ", isDebugEnabled) try{ @@ -325,34 +337,34 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { 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) - } - + + 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"> + xmlns:ns="http://org.openecomp.mso/requestsdb">
<soapenv:Header/> <soapenv:Body> - <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb"> + <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${requestId}</requestId> <lastModifiedBy>BPMN</lastModifiedBy> <statusMessage>VF Module successfully created</statusMessage> <responseBody></responseBody> <requestStatus>COMPLETE</requestStatus> <progress>100</progress> - <vnfOutputs><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"><vnf-id>${vnfId}</vnf-id><vf-module-id>${vfModuleId}</vf-module-id></vnf-outputs></vnfOutputs> + <vnfOutputs><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"><vnf-id>${vnfId}</vnf-id><vf-module-id>${vfModuleId}</vf-module-id></vnf-outputs></vnfOutputs>
<vfModuleId>${vfModuleId}</vfModuleId> - </ns:updateInfraRequest> + </ns:updateInfraRequest> </soapenv:Body> </soapenv:Envelope>""" @@ -360,17 +372,17 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { 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 */ @@ -381,8 +393,8 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { ')' def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') logDebug('Entered ' + method, isDebugLogEnabled) - - + + try { def WorkflowException workflowException = execution.getVariable("WorkflowException") def request = execution.getVariable("DoCreateVfModuleRequest") @@ -395,18 +407,18 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { } 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: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:WorkflowException> </aetgt:FalloutHandlerRequest> """ - + logDebug("CONTENT before translation: " + content, isDebugLogEnabled) content = utils.formatXml(content) logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled) @@ -418,34 +430,34 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 2000, 'Internal Error') + exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error') } } - + 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 index 385e9e9994..289e185522 100644 --- 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 @@ -1,304 +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") - } - } - } -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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/DelServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy index 6e346d2ecb..aad0693948 100644 --- 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 @@ -1,353 +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) - - } - - } -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 index f1513c6b09..e49de0bc09 100644 --- 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 @@ -1,476 +1,468 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.mso.bpmn.infrastructure.scripts; - -import groovy.xml.XmlUtil -import groovy.json.* - -import org.openecomp.mso.bpmn.core.json.JsonUtils -import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils -import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil -import org.openecomp.mso.bpmn.common.scripts.NetworkUtils -import org.openecomp.mso.bpmn.common.scripts.VidUtils -import org.openecomp.mso.bpmn.core.WorkflowException -import org.openecomp.mso.rest.APIResponse; - - -import java.util.UUID; - -import org.camunda.bpm.engine.delegate.BpmnError -import org.camunda.bpm.engine.runtime.Execution -import org.json.JSONObject; -import org.json.JSONArray; -import org.apache.commons.lang3.* -import org.apache.commons.codec.binary.Base64; -import org.springframework.web.util.UriUtils; - -/** - * This groovy class supports the <class>DeleteViprAtmService.bpmn</class> process. - * - */ -public class DeleteGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor { - - String Prefix="DELVAS_" - ExceptionUtil exceptionUtil = new ExceptionUtil() - JsonUtils jsonUtil = new JsonUtils() - VidUtils vidUtils = new VidUtils() - CatalogDbUtils catalogDbUtils = new CatalogDbUtils() - NetworkUtils networkUtils = new NetworkUtils() - - /** - * This method is executed during the preProcessRequest task of the <class>DeleteViprAtmService.bpmn</class> process. - * @param execution - */ - public InitializeProcessVariables(Execution execution){ - /* Initialize all the process variables in this block */ - - execution.setVariable("deleteViprAtmServiceRequest", "") - execution.setVariable("msoRequestId", "") - execution.setVariable("DELVAS_vnfsDeletedCount", 0) - execution.setVariable("DELVAS_vnfsCount", 0) - execution.setVariable("DELVAS_networksCount", 0) - execution.setVariable("DELVAS_networksDeletedCount", 0) - } - - // ************************************************** - // Pre or Prepare Request Section - // ************************************************** - /** - * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process. - * @param execution - */ - public void preProcessRequest (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix",Prefix) - - utils.log("DEBUG", " ***** Inside preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled) - - try { - // initialize flow variables - InitializeProcessVariables(execution) - - // check for incoming json message/input - String deleteViprAtmServiceRequest = execution.getVariable("bpmnRequest") - utils.logAudit(deleteViprAtmServiceRequest) - execution.setVariable("deleteViprAtmServiceRequest", deleteViprAtmServiceRequest); - println 'deleteViprAtmServiceRequest - ' + deleteViprAtmServiceRequest - - // extract requestId - String requestId = execution.getVariable("mso-request-id") - execution.setVariable("msoRequestId", requestId) - - String serviceInstanceId = execution.getVariable("serviceInstanceId") - if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) { - String dataErrorMessage = " Element 'serviceInstanceId' is missing. " - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - } - - String requestAction = execution.getVariable("requestAction") - execution.setVariable("requestAction", requestAction) - - String source = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.source") - if ((source == null) || (source.isEmpty())) { - execution.setVariable("source", "VID") - } else { - execution.setVariable("source", source) - } - - // extract globalSubscriberId - String globalSubscriberId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.subscriberInfo.globalSubscriberId") - - // global-customer-id is optional on Delete - - execution.setVariable("globalSubscriberId", globalSubscriberId) - execution.setVariable("globalCustomerId", globalSubscriberId) - - String suppressRollback = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.suppressRollback") - execution.setVariable("disableRollback", suppressRollback) - utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled) - - String productFamilyId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.productFamilyId") - execution.setVariable("productFamilyId", productFamilyId) - utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled) - - // extract subscriptionServiceType - String subscriptionServiceType = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestParameters.subscriptionServiceType") - execution.setVariable("subscriptionServiceType", subscriptionServiceType) - utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled) - - // extract cloud configuration - String lcpCloudRegionId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId") - execution.setVariable("lcpCloudRegionId", lcpCloudRegionId) - utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled) - String tenantId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.tenantId") - execution.setVariable("tenantId", tenantId) - utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled) - - String sdncVersion = "1702" - execution.setVariable("sdncVersion", sdncVersion) - utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled) - - //For Completion Handler & Fallout Handler - String requestInfo = - """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> - <request-id>${requestId}</request-id> - <action>DELETE</action> - <source>${source}</source> - </request-info>""" - - execution.setVariable("DELVAS_requestInfo", requestInfo) - - //Setting for Generic Sub Flows - execution.setVariable("GENGS_type", "service-instance") - - utils.log("DEBUG", " ***** Completed preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled) - - } catch (BpmnError e) { - throw e; - } catch (Exception ex){ - String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method preProcessRequest() - " + ex.getMessage() - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - } - } - - public void sendSyncResponse (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - - utils.log("DEBUG", " ***** Inside sendSyncResponse of DeleteViprAtmService ***** ", isDebugEnabled) - - try { - String serviceInstanceId = execution.getVariable("serviceInstanceId") - String requestId = execution.getVariable("mso-request-id") - - // RESTResponse (for API Handler (APIH) Reply Task) - String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim() - - utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled) - sendWorkflowResponse(execution, 202, syncResponse) - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method sendSyncResponse() - " + ex.getMessage() - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - } - } - - public void prepareServiceInstanceDelete (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - utils.log("DEBUG", " ***** Inside prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled) - - try { - - String serviceInstanceId = execution.getVariable("serviceInstanceId") - - // confirm if ServiceInstance was found - if ( !execution.getVariable("GENGS_FoundIndicator") ) - { - String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Service Instance was not found in AAI by id: " + serviceInstanceId - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - } - - // get variable within incoming json - String deleteViprAtmServiceRequest = execution.getVariable("deleteViprAtmServiceRequest"); - - // get SI extracted by GenericGetService - String serviceInstanceAaiRecord = execution.getVariable("GENGS_service"); - - utils.log("DEBUG", "serviceInstanceAaiRecord: "+serviceInstanceAaiRecord, isDebugEnabled) - - String relationship = "" - try { - relationship = networkUtils.getFirstNodeXml(serviceInstanceAaiRecord, "relationship-list") - } catch (Exception ex) { - //no relationships found - } - utils.log("DEBUG", " relationship string - " + relationship, isDebugEnabled) - - int vnfsCount = 0 - int networksCount = 0 - - if (relationship != null && relationship.length() > 0){ - relationship = relationship.trim().replace("tag0:","").replace(":tag0","") - - // Check if Network TableREf is present, then build a List of network policy - List relatedVnfIdList = networkUtils.getRelatedVnfIdList(relationship) - vnfsCount = relatedVnfIdList.size() - execution.setVariable("DELVAS_vnfsCount", vnfsCount) - utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled) - execution.setVariable("DELVAS_relatedVnfIdList", relatedVnfIdList) - - // Check if Network TableREf is present, then build a List of network policy - List relatedNetworkIdList = networkUtils.getRelatedNetworkIdList(relationship) - networksCount = relatedNetworkIdList.size() - execution.setVariable("DELVAS_networksCount", networksCount) - utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled) - execution.setVariable("DELVAS_relatedNetworkIdList", relatedNetworkIdList) - 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) - } - - +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>DeleteViprAtmService.bpmn</class> process.
+ *
+ */
+public class DeleteGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELVAS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
+ NetworkUtils networkUtils = new NetworkUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteViprAtmService.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("deleteViprAtmServiceRequest", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable("DELVAS_vnfsDeletedCount", 0)
+ execution.setVariable("DELVAS_vnfsCount", 0)
+ execution.setVariable("DELVAS_networksCount", 0)
+ execution.setVariable("DELVAS_networksDeletedCount", 0)
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // check for incoming json message/input
+ String deleteViprAtmServiceRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(deleteViprAtmServiceRequest)
+ execution.setVariable("deleteViprAtmServiceRequest", deleteViprAtmServiceRequest);
+ println 'deleteViprAtmServiceRequest - ' + deleteViprAtmServiceRequest
+
+ // extract requestId
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
+ String dataErrorMessage = " Element 'serviceInstanceId' is missing. "
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ String requestAction = execution.getVariable("requestAction")
+ execution.setVariable("requestAction", requestAction)
+
+ String source = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ execution.setVariable("source", "VID")
+ } else {
+ execution.setVariable("source", source)
+ }
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+
+ // global-customer-id is optional on Delete
+
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ execution.setVariable("globalCustomerId", globalSubscriberId)
+
+ String suppressRollback = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("disableRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String productFamilyId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
+
+ // extract subscriptionServiceType
+ String subscriptionServiceType = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
+
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = "1702"
+ execution.setVariable("sdncVersion", sdncVersion)
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("DELVAS_requestInfo", requestInfo)
+
+ //Setting for Generic Sub Flows
+ execution.setVariable("GENGS_type", "service-instance")
+
+ utils.log("DEBUG", " ***** Completed preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareServiceInstanceDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // confirm if ServiceInstance was found
+ if ( !execution.getVariable("GENGS_FoundIndicator") )
+ {
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Service Instance was not found in AAI by id: " + serviceInstanceId
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ // get variable within incoming json
+ String deleteViprAtmServiceRequest = execution.getVariable("deleteViprAtmServiceRequest");
+
+ // get SI extracted by GenericGetService
+ String serviceInstanceAaiRecord = execution.getVariable("GENGS_service");
+
+ utils.log("DEBUG", "serviceInstanceAaiRecord: "+serviceInstanceAaiRecord, isDebugEnabled)
+
+ String relationship = ""
+ try {
+ relationship = networkUtils.getFirstNodeXml(serviceInstanceAaiRecord, "relationship-list")
+ } catch (Exception ex) {
+ //no relationships found
+ }
+ utils.log("DEBUG", " relationship string - " + relationship, isDebugEnabled)
+
+ int vnfsCount = 0
+ int networksCount = 0
+
+ if (relationship != null && relationship.length() > 0){
+ relationship = relationship.trim().replace("tag0:","").replace(":tag0","")
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List relatedVnfIdList = networkUtils.getRelatedVnfIdList(relationship)
+ vnfsCount = relatedVnfIdList.size()
+ execution.setVariable("DELVAS_vnfsCount", vnfsCount)
+ utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled)
+ execution.setVariable("DELVAS_relatedVnfIdList", relatedVnfIdList)
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List relatedNetworkIdList = networkUtils.getRelatedNetworkIdList(relationship)
+ networksCount = relatedNetworkIdList.size()
+ execution.setVariable("DELVAS_networksCount", networksCount)
+ utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled)
+ execution.setVariable("DELVAS_relatedNetworkIdList", relatedNetworkIdList)
+ } else {
+ execution.setVariable("DELVAS_vnfsCount", 0)
+ utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled)
+ execution.setVariable("DELVAS_networksCount", 0)
+ utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled)
+ }
+
+ utils.log("DEBUG", " ***** Completed prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. prepareServiceInstanceDelete() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareVnfAndModulesDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareVnfAndModulesDelete of DeleteServiceInstanceMacro ***** ", isDebugEnabled)
+
+ List vnfList = execution.getVariable("DELVAS_relatedVnfIdList")
+ Integer vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount")
+ String vnfModelInfoString = ""
+ String vnfId = ""
+ if (vnfList.size() > 0 ) {
+ vnfId = vnfList.get(vnfsDeletedCount.intValue())
+ }
+
+ execution.setVariable("vnfId", vnfId)
+ utils.log("DEBUG", "need to delete vnfId:" + vnfId, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareVnfAndModulesDelete of DeleteServiceInstanceMacro ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceMacro flow. Unexpected Error from method prepareVnfAndModulesDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateVnfDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ String vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount")
+ vnfsDeletedCount++
+
+ execution.setVariable("DELVAS_vnfsDeletedCount", vnfsDeletedCount)
+
+ utils.log("DEBUG", " ***** Completed validateVnfDelete of DeleteViprAtmService ***** "+" vnf # "+vnfsDeletedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method validateVnfDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareNetworkDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ List networkList = execution.getVariable("DELVAS_relatedNetworkIdList")
+ Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount")
+
+ String networkId = ""
+ if (networkList.size() > 0) {
+ networkId = networkList.get(networksDeletedCount.intValue())
+ }
+
+ execution.setVariable("networkId", networkId)
+ utils.log("DEBUG", "need to delete networkId:" + networkId, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = q"Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method prepareNetworkDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section
+ // *******************************
+ public void validateNetworkDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount")
+ networksDeletedCount++
+
+ execution.setVariable("DELVAS_networksDeletedCount", networksDeletedCount)
+
+ utils.log("DEBUG", " ***** Completed validateNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method validateNetworkDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside postProcessResponse of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("msoRequestId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:status-message>vIPR ATM Service Instance has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Service Instance macro action: DELETE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable("DELVAS_Success", true)
+ execution.setVariable("DELVAS_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** STARTED DeleteViprAtmService prepareFalloutRequest Process *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestInfo = execution.getVariable("DELVAS_requestInfo")
+ utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable("DELVAS_falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in DeleteViprAtmService prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteViprAtmService prepareFalloutRequest Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DeleteViprAtmService prepareFalloutRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside sendSyncError() of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("DELVAS_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ }catch(BpmnError b){
+ utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("DELVAS_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+
+
}
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy index e18af172de..9e341dafbc 100644 --- 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 @@ -1,417 +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><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"/></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) - } - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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><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"/></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 index 93890be2af..f8b3b4739f 100644 --- 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 @@ -41,7 +41,7 @@ import org.openecomp.mso.bpmn.core.json.JsonUtils; public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { - + ExceptionUtil exceptionUtil = new ExceptionUtil() JsonUtils jsonUtil = new JsonUtils() /** @@ -78,20 +78,20 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { 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') @@ -100,16 +100,16 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { 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") @@ -126,31 +126,31 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { 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) - + exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request") + } catch(Exception e) { String restFaultMessage = e.getMessage() utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled) - workflowException(execution, restFaultMessage, 400) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request") } - - + + 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')) @@ -158,16 +158,16 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { 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()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage()) } } @@ -182,7 +182,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { ')' def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') logDebug('Entered ' + method, isDebugLogEnabled) - + try { def requestInfo = execution.getVariable('DELVfModI_requestInfo') def requestId = execution.getVariable('DELVfModI_requestId') @@ -195,11 +195,11 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { 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) @@ -208,10 +208,10 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage()) } } - + /** * Currently passing the entire DELETE_VF_MODULE vnf-request to DoDeleteVfModule. * 'DeleteVfModuleRequest' is now being set in preProcessRequest(). @@ -233,10 +233,10 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in prepDoDeleteVfModule(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoDeleteVfModule(): ' + e.getMessage()) } } - + /** * Prepare the DB update to add an entry for the Vf Module request. * @@ -257,19 +257,19 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { def volumeGroupId = execution.getVariable('DELVfModI_volumeGroupId') String updateInfraRequest = """ - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + <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> - """ + <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) @@ -281,7 +281,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in prepInfraRequest(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepInfraRequest(): ' + e.getMessage()) } } @@ -303,18 +303,18 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { 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>""" - + ${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) @@ -325,7 +325,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 2000, 'Internal Error') + exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error') } } @@ -342,7 +342,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { ')' def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') logDebug('Entered ' + method, isDebugLogEnabled) - + try { def prefix = execution.getVariable('prefix') def request = execution.getVariable("DeleteVfModuleRequest") @@ -360,13 +360,13 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { 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> - """ + ${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) @@ -377,7 +377,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 2000, 'Internal Error') + exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error') } } -}
\ 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 index 0a3af33d49..7bda7b4fe3 100644 --- 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 @@ -1,560 +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("&", "&").replace("<", "<").replace(">", ">") - 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) - - } - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.json.JsonSlurper
+
+import java.util.concurrent.ExecutionException;
+
+import org.springframework.web.util.UriUtils
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+
+/**
+ * This groovy class supports the <class>DeleteVfModuleVolume.bpmn</class> process.
+ */
+public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+
+ private XmlParser xmlParser = new XmlParser()
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ execution.setVariable('prefix', 'DELVfModVol_')
+ execution.setVariable("DELVfModVol_volumeRequest", null)
+ execution.setVariable('DELVfModVol_requestInfo', null)
+ execution.setVariable('DELVfModVol_requestId', null)
+ execution.setVariable('DELVfModVol_source', null)
+ execution.setVariable('DELVfModVol_volumeInputs', null)
+ execution.setVariable('DELVfModVol_volumeOutputs', null)
+ execution.setVariable('DELVfModVol_volumeGroupId', null)
+ execution.setVariable('DELVfModVol_vnfType', null)
+ execution.setVariable('DELVfModVol_serviceId', null)
+ execution.setVariable('DELVfModVol_cloudRegion', null)
+ execution.setVariable('DELVfModVol_tenantId', null)
+ execution.setVariable('DELVfModVol_volumeParams', null)
+ execution.setVariable('DELVfModVol_volumeGroupHeatStackId', null)
+ execution.setVariable('DELVfModVol_volumeGroupTenantId', null)
+ execution.setVariable("DELVfModVol_queryAAIVolGrpResponse", null)
+ execution.setVariable('DELVfModVol_messageId', null)
+ execution.setVariable('DELVfModVol_deleteVnfARequest', null)
+ execution.setVariable('DELVfModVol_updateInfraRequest', null)
+ execution.setVariable('DELVfModVol_CompleteMsoProcessRequest', null)
+ execution.setVariable('DELVfModVol_WorkflowException', null)
+ execution.setVariable('DELVfModVol_TransactionSuccessIndicator', false)
+ execution.setVariable("DELVfModVol_isErrorMessageException", false)
+ execution.setVariable('DELVfModVol_syncResponseSent', false)
+ }
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution, isDebugLogEnabled) {
+
+ InitializeProcessVariables(execution)
+
+ String createVolumeIncoming = validateRequest(execution)
+ utils.logAudit(createVolumeIncoming)
+
+ // check if request is xml or json
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+ utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def vidUtils = new VidUtils(this)
+ createVolumeIncoming = vidUtils.createXmlVolumeRequest(reqMap, 'DELETE_VF_MODULE_VOL', serviceInstanceId, volumeGroupId)
+ execution.setVariable("DELVfModVol_isVidRequest", true)
+ }
+ catch(groovy.json.JsonException je) {
+ utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
+ // assume request is in XML format - proceed as usual to process XML request
+ }
+
+ String request = utils.getNodeXml(createVolumeIncoming, "volume-request").drop(38).trim().replace("tag0:","").replace(":tag0","")
+ execution.setVariable("DELVfModVol_volumeRequest", request)
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('DELVfModVol_requestInfo', requestInfo)
+ String requestId = execution.getVariable("mso-request-id")
+ if (requestId == null || requestId == "") {
+ requestId = getRequiredNodeText(execution, requestInfo, 'request-id')
+ }
+ execution.setVariable('DELVfModVol_requestId', requestId)
+ execution.setVariable('DELVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+ def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+ execution.setVariable('DELVfModVol_volumeInputs', volumeInputs)
+ execution.setVariable('DELVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+ execution.setVariable('DELVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+ execution.setVariable('DELVfModVol_serviceId', utils.getNodeText1(volumeInputs, 'service-id'))
+ execution.setVariable('DELVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+ execution.setVariable('DELVfModVol_messageId', UUID.randomUUID().toString())
+ execution.setVariable('DELVfModVol_volumeOutputs', utils.getNodeXml(request, 'volume-outputs', false))
+ execution.setVariable('DELVfModVol_volumeParams', utils.getNodeXml(request, 'volume-params'))
+ execution.setVariable('DELVfModVol_cloudRegion', utils.getNodeText1(request, 'aic-cloud-region'))
+
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ logDebug('Request: ' + createVolumeIncoming, isDebugLogEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution, isDebugEnabled) {
+
+ String volumeRequest = execution.getVariable("DELVfModVol_volumeRequest")
+ utils.log("DEBUG", " DELVfModVol_volumeRequest - " + "\n" + volumeRequest, isDebugEnabled)
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String deleteVolumeRequest =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd" statusCode="200">
+ <rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ contentType="text/xml">
+ ${volumeRequest}
+ </rest:payload>
+ </rest:RESTResponse>""".trim()
+
+ def isVidRequest = execution.getVariable('DELVfModVol_isVidRequest')
+ def syncResponse = ''
+
+ if(isVidRequest) {
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+ }
+ else {
+ syncResponse = utils.formatXml(deleteVolumeRequest)
+ }
+
+ execution.setVariable('DELVfModVol_syncResponseSent', true)
+
+ sendWorkflowResponse(execution, 200, syncResponse)
+ }
+
+
+ public void sendSyncError (Execution execution, isDebugEnabled) {
+ WorkflowException we = execution.getVariable('WorkflowException')
+ def errorCode = we?.getErrorCode()
+ def errorMessage = we?.getErrorMessage()
+ //default to 400 since only invalid request will trigger this method
+ sendWorkflowResponse(execution, 400, errorMessage)
+ }
+
+
+ public void callRESTQueryAAICloudRegion (Execution execution, isDebugEnabled) {
+
+ String cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ utils.logAudit(queryCloudRegionRequest)
+ execution.setVariable("DELVfModVol_queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", " DELVfModVol_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((cloudRegion != "ERROR")) {
+ if(execution.getVariable("DELVfModVol_queryCloudRegionReturnCode") == "404"){
+ execution.setVariable("DELVfModVol_aicCloudRegion", "AAIAIC25")
+ }else{
+ execution.setVariable("DELVfModVol_aicCloudRegion", cloudRegion)
+ }
+ execution.setVariable("DELVfModVol_cloudRegion", cloudRegion)
+ execution.setVariable("DELVfModVol_isCloudRegionGood", true)
+
+ } else {
+ utils.log("DEBUG", "AAI Query Cloud Region Unsuccessful.", isDebugEnabled)
+ execution.setVariable("DELVfModVol_isCloudRegionGood", false)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable("DELVfModVol_queryCloudRegionReturnCode"))
+ }
+
+ utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("DELVfModVol_isCloudRegionGood"), isDebugEnabled)
+ }
+
+ /**
+ * Query volume group by id
+ * @param execution
+ */
+ public void queryAAIForVolumeGroup(Execution execution, isDebugLogEnabled) {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+ if(volumeGroupId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, 'volume-group-id is not provided in the request')
+ throw new Exception('volume-group-id is not provided in the request')
+ }
+ String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+ logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query volume group by id return code: " + returnCode)
+ utils.logAudit("AAI query volume group by id response: " + aaiResponseAsString)
+
+ execution.setVariable("DELVfModVol_queryAAIVolGrpResponse", aaiResponseAsString)
+
+ if (returnCode=='200' || returnCode == '204') {
+
+ def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+ execution.setVariable('DELVfModVol_volumeGroupHeatStackId', heatStackId)
+
+ if(hasVfModuleRelationship(aaiResponseAsString)){
+ utils.log("DEBUG", 'Volume Group ' + volumeGroupId + ' currently in use', isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
+ }
+
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+ if (volumeGroupTenantId == null) {
+ utils.log("DEBUG", "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
+ }
+
+ execution.setVariable('DELVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ logDebug('Received Tenant Id ' + volumeGroupTenantId + ' from AAI for Volume Group with Volume Group Id ' + volumeGroupId , isDebugLogEnabled)
+ }
+ else {
+ if (returnCode=='404') {
+ utils.log("DEBUG", "Volume Group ${volumeGroupId} not found in AAI", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} not found in AAI. Response code: 404")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ /**
+ * Extract the Tenant Id from the Volume Group information returned by AAI.
+ *
+ * @param volumeGroupXml Volume Group XML returned by AAI.
+ * @return the Tenant Id extracted from the Volume Group information. 'null' is returned if
+ * the Tenant Id is missing or could not otherwise be extracted.
+ */
+ private String getTenantIdFromVolumeGroup(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('tenant'))) {
+ def NodeList relationshipDataList = utils.getIdenticalChildren(relationship, 'relationship-data')
+ for (Node relationshipData in relationshipDataList) {
+ def Node relationshipKey = utils.getChildNode(relationshipData, 'relationship-key')
+ if ((relationshipKey != null) && (relationshipKey.text().equals('tenant.tenant-id'))) {
+ def Node relationshipValue = utils.getChildNode(relationshipData, 'relationship-value')
+ if (relationshipValue != null) {
+ return relationshipValue.text()
+ }
+ }
+ }
+ }
+ }
+ }
+ return null
+ }
+
+ private boolean hasVnfRelationship(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('generic-vnf'))) {
+ def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+ if (relatedLink !=null && relatedLink.text() != null){
+ return true
+ }
+ }
+ }
+ }
+ return false
+ }
+
+ private boolean hasVfModuleRelationship(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('vf-module'))) {
+ def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+ if (relatedLink !=null && relatedLink.text() != null){
+ return true
+ }
+ }
+ }
+ }
+ return false
+ }
+
+ public void prepareVnfAdapterDeleteRequest(Execution execution, isDebugLogEnabled) {
+ def cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+ def tenantId = execution.getVariable('DELVfModVol_tenantId')
+ def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+ def volumeGroupHeatStackId = execution.getVariable('DELVfModVol_volumeGroupHeatStackId')
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ def serviceId = execution.getVariable('DELVfModVol_serviceId')
+
+ def messageId = execution.getVariable('DELVfModVol_messageId')
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <deleteVolumeGroupRequest>
+ <cloudSiteId>${cloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </deleteVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('DELVfModVol_deleteVnfARequest', vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+ }
+
+
+ public void deleteVolGrpId(Execution execution, isDebugEnabled) {
+
+ // get variables
+ String queryAAIVolGrpIdResponse = execution.getVariable("DELVfModVol_queryAAIVolGrpResponse")
+ String groupId = utils.getNodeText(queryAAIVolGrpIdResponse, "volume-group-id")
+ String resourceVersion = utils.getNodeText(queryAAIVolGrpIdResponse, "resource-version")
+ String messageId = execution.getVariable('DELVfModVol_messageId')
+ String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String deleteAAIVolumeGrpIdRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(groupId, "UTF-8")
+
+ if(resourceVersion !=null){
+ deleteAAIVolumeGrpIdRequest = deleteAAIVolumeGrpIdRequest +'?resource-version=' + UriUtils.encode(resourceVersion, 'UTF-8')
+ }
+
+ utils.logAudit('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
+ utils.log("DEBUG", "Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest, isDebugEnabled)
+
+ APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI delete volume group return code: " + returnCode)
+ utils.logAudit("AAI delete volume group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ if (returnCode=='200' || (returnCode == '204')) {
+ utils.log("DEBUG", "Volume group $groupId deleted.", isDebugEnabled)
+ } else {
+ if (returnCode=='404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $groupId not found for delete in AAI Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ public void prepareDBRequest (Execution execution, isDebugLogEnabled) {
+
+ WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ def volOutputs = execution.getVariable('DELVfModVol_volumeOutputs')
+ def statusMessage = "VolumeGroup successfully deleted"
+ def progress = "100"
+ def requestStatus = "COMPLETE"
+
+ if (workflowExceptionObj != null) {
+ statusMessage = (workflowExceptionObj.getErrorMessage()).replace("&", "&").replace("<", "<").replace(">", ">")
+ 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/DoCreateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy index ed65dbc79b..2d5ddf0d0c 100644 --- 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 @@ -1,37 +1,37 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
*/ -package org.openecomp.mso.bpmn.infrastructure.scripts; +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 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; @@ -223,8 +223,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { 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 == "") { @@ -491,7 +489,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { 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 + String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1" utils.logAudit(queryIdAAIRequest) execution.setVariable(Prefix + "queryIdAAIRequest", queryIdAAIRequest) utils.log("DEBUG", Prefix + "queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled) @@ -570,7 +568,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { 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 + String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1" utils.logAudit(requeryIdAAIRequest) execution.setVariable(Prefix + "requeryIdAAIRequest", requeryIdAAIRequest) utils.log("DEBUG", Prefix + "requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled) @@ -1078,7 +1076,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { 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 + String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1" utils.logAudit(updateContrailAAIUrlRequest) execution.setVariable(Prefix + "updateContrailAAIUrlRequest", updateContrailAAIUrlRequest) @@ -1092,18 +1090,11 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { 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) + APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payloadXml) + String returnCode = response.getStatusCode() execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode) - utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled) - String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString() if (returnCode=='200') { @@ -1117,7 +1108,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { } else { execution.setVariable(Prefix + "isPONR", true) } - + utils.log("DEBUG", Prefix + "isPONR" + ": " + execution.getVariable(Prefix + "isPONR"), isDebugEnabled) } else { if (returnCode=='404') { String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)." @@ -1162,7 +1153,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { // get variables String requestId = execution.getVariable("msoRequestId") if (requestId == null) { - requestId = execution.getVariable("mso-request-id") + requestId = execution.getVariable("mso-request-id")
} String messageId = execution.getVariable(Prefix + "messageId") String source = execution.getVariable(Prefix + "source") @@ -1209,12 +1200,12 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { String networkId = execution.getVariable(Prefix + "networkId") String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId") - // get/set 'msoRequestId' and 'mso-request-id' + // get/set 'msoRequestId' and 'mso-request-id'
String requestId = execution.getVariable("msoRequestId") if (requestId != null) { - execution.setVariable("mso-request-id", requestId) + execution.setVariable("mso-request-id", requestId)
} else { - requestId = execution.getVariable("mso-request-id") + requestId = execution.getVariable("mso-request-id")
} execution.setVariable(Prefix + "requestId", requestId) 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 index 0ad42f9da4..5b9cebc46b 100644 --- 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 @@ -1,387 +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("&", "&").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("&", "&").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) - } - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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("&", "&").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("&", "&").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 index be26247416..e6276a8852 100644 --- 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 @@ -1,39 +1,39 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; +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 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; @@ -46,7 +46,7 @@ import org.springframework.web.util.UriUtils; /** * This groovy class supports the <class>DoCreateServiceInstance.bpmn</class> process. - * + * * Inputs: * @param - msoRequestId * @param - globalSubscriberId @@ -64,7 +64,7 @@ import org.springframework.web.util.UriUtils; * @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) + * @param - serviceInstanceName - (GET from AAI if null in input) * */ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { @@ -362,9 +362,9 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { } 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"> + """<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> @@ -423,7 +423,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { } utils.log("DEBUG"," *****Exit preProcessSDNCAssignRequest *****", isDebugEnabled) } - + public void postProcessSDNCAssign (Execution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") utils.log("DEBUG"," ***** postProcessSDNCAssign ***** ", isDebugEnabled) @@ -460,6 +460,49 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { } utils.log("DEBUG"," *** Exit postProcessSDNCAssign *** ", isDebugEnabled) } + + public void postProcessAAIGET2(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + utils.log("DEBUG"," ***** postProcessAAIGET2 ***** ", isDebugEnabled) + String msg = "" + + try { + String serviceInstanceName = execution.getVariable("serviceInstanceName") + boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator") + if(succInAAI != true){ + utils.log("DEBUG","Error getting Service-instance from AAI in postProcessAAIGET2", + serviceInstanceName, isDebugEnabled) + WorkflowException workflowException = execution.getVariable("WorkflowException") + utils.logAudit("workflowException: " + workflowException) + if(workflowException != null){ + exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage()) + } + else + { + msg = "Failure in postProcessAAIGET2 GENGS_SuccessIndicator:" + succInAAI + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg) + } + } + else + { + boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator") + if(foundInAAI == true){ + String aaiService = execution.getVariable("GENGS_service") + if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "service-instance-name"))) { + execution.setVariable("serviceInstanceName", utils.getNodeText1(aaiService, "service-instance-name")) + utils.log("DEBUG","Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"), isDebugEnabled) + } + } + } + } catch (BpmnError e) { + throw e; + } catch (Exception ex) { + msg = "Exception in DoCreateServiceInstance.postProcessAAIGET2 " + ex.getMessage() + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + utils.log("DEBUG"," *** Exit postProcessAAIGET2 *** ", isDebugEnabled) + } public void preProcessRollback (Execution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") 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 index bc34987cec..1e6541e226 100644 --- 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 @@ -1,231 +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) - } - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 index 739a9dd027..269cb808c4 100644 --- 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 @@ -17,12 +17,12 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - +
package org.openecomp.mso.bpmn.infrastructure.scripts; - -import javax.xml.parsers.DocumentBuilder -import javax.xml.parsers.DocumentBuilderFactory - +
+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 @@ -37,21 +37,22 @@ 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.springframework.web.util.UriUtils
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.NamedNodeMap
+import org.w3c.dom.Node
import org.w3c.dom.NodeList -import org.xml.sax.InputSource - - +import org.xml.sax.InputSource
+
+
public class DoCreateVfModule extends VfModuleBase { String Prefix="DCVFM_" ExceptionUtil exceptionUtil = new ExceptionUtil() JsonUtils jsonUtil = new JsonUtils() + SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this) /** * Validates the request message and sets up the workflow. @@ -65,36 +66,40 @@ public class DoCreateVfModule extends VfModuleBase { logDebug('Entered ' + method, isDebugLogEnabled) execution.setVariable('prefix', Prefix) - try{ + try{ def rollbackData = execution.getVariable("RollbackData") if (rollbackData == null) { rollbackData = new RollbackData() } - + execution.setVariable("DCVFM_vnfParamsExistFlag", false) execution.setVariable("DCVFM_oamManagementV4Address", "") execution.setVariable("DCVFM_oamManagementV6Address", "") - + String request = execution.getVariable("DoCreateVfModuleRequest") - + if (request == null || request.isEmpty()) { // Building Block-type request + + String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo") - String cloudConfiguration = execution.getVariable("cloudConfiguration") - String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo") + def serviceModelInfo = execution.getVariable("serviceModelInfo") + logDebug("serviceModelInfo: " + serviceModelInfo, isDebugLogEnabled) + def vnfModelInfo = execution.getVariable("vnfModelInfo") + //tenantId - def tenantId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.tenantId") + def tenantId = execution.getVariable("tenantId") execution.setVariable("DCVFM_tenantId", tenantId) rollbackData.put("VFMODULE", "tenantid", tenantId) //volumeGroupId - def volumeGroupId = execution.getVariable("volumeGroupId") + def volumeGroupId = execution.getVariable("volumeGroupId") execution.setVariable("DCVFM_volumeGroupId", volumeGroupId) //volumeGroupName - def volumeGroupName = execution.getVariable("volumeGroupName") + def volumeGroupName = execution.getVariable("volumeGroupName") execution.setVariable("DCVFM_volumeGroupName", volumeGroupName) //cloudSiteId - def cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.lcpCloudRegionId") + def cloudSiteId = execution.getVariable("lcpCloudRegionId") execution.setVariable("DCVFM_cloudSiteId", cloudSiteId) rollbackData.put("VFMODULE", "aiccloudregion", cloudSiteId) logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled) @@ -104,50 +109,50 @@ public class DoCreateVfModule extends VfModuleBase { rollbackData.put("VFMODULE", "vnftype", vnfType) logDebug("vnfType: " + vnfType, isDebugLogEnabled) //vnfName - def vnfName = execution.getVariable("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") + 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") + 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") + def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName") execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName) rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName) logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled) //modelCustomizationUuid - def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo.modelCustomizationId") + def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationUuid") execution.setVariable("DCVFM_modelCustomizationUuid", modelCustomizationUuid) rollbackData.put("VFMODULE", "modelcustomizationuuid", modelCustomizationUuid) logDebug("modelCustomizationUuid: " + modelCustomizationUuid, isDebugLogEnabled) //vfModuleId - def vfModuleId = execution.getVariable("vfModuleId") + def vfModuleId = execution.getVariable("vfModuleId") execution.setVariable("DCVFM_vfModuleId", vfModuleId) logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled) - def requestId = execution.getVariable("requestId") + def requestId = execution.getVariable("msoRequestId") execution.setVariable("DCVFM_requestId", requestId) logDebug("requestId: " + requestId, isDebugLogEnabled) // Set mso-request-id to request-id for VNF Adapter interface execution.setVariable("mso-request-id", requestId) //serviceId - def serviceId = execution.getVariable("serviceId") + def serviceId = execution.getVariable("serviceId") execution.setVariable("DCVFM_serviceId", serviceId) logDebug("serviceId: " + serviceId, isDebugLogEnabled) //serviceInstanceId - def serviceInstanceId = execution.getVariable("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" + def source = "VID" execution.setVariable("DCVFM_source", source) rollbackData.put("VFMODULE", "source", source) logDebug("source: " + source, isDebugLogEnabled) @@ -156,21 +161,27 @@ public class DoCreateVfModule extends VfModuleBase { 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") + def isBaseVfModule = execution.getVariable("isBaseVfModule") execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule) - logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled) + logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled) //asdcServiceModelVersion - def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion") + def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion") execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion) - logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled) + logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled) //personaModelId - execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo.modelInvariantId")) + execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantId")) //personaModelVersion - execution.setVariable("DCVFM_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo.modelVersion")) + execution.setVariable("DCVFM_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelVersion")) + //vfModuleLabel + def vfModuleLabel = execution.getVariable("vfModuleLabel") + if (vfModuleLabel != null) { + execution.setVariable("DCVFM_vfModuleLabel", vfModuleLabel) + logDebug("vfModuleLabel: " + vfModuleLabel, isDebugLogEnabled) + } //Get or Generate UUID String uuid = execution.getVariable("DCVFM_uuid") if(uuid == null){ @@ -185,14 +196,25 @@ public class DoCreateVfModule extends VfModuleBase { if (isVidRequest == null || isVidRequest.isEmpty()) { execution.setVariable("isVidRequest", "true") } - - String vnfParamsChildNodes = execution.getVariable("vfModuleInputParams") - + //globalSubscriberId + String globalSubscriberId = execution.getVariable("globalSubscriberId") + execution.setVariable("DCVFM_globalSubscriberId", globalSubscriberId) + logDebug("globalSubsrciberId: " + globalSubscriberId, isDebugLogEnabled) + Map<String,String> vfModuleInputParams = execution.getVariable("vfModuleInputParams") + if (vfModuleInputParams != null) { + execution.setVariable("DCVFM_vnfParamsMap", vfModuleInputParams) + execution.setVariable("DCVFM_vnfParamsExistFlag", true) + } + //usePreload + def usePreload = execution.getVariable("usePreload") + execution.setVariable("DCVFM_usePreload", usePreload) + logDebug("usePreload: " + usePreload, isDebugLogEnabled) + } else { - // The info is inside the request + // The info is inside the request - DEAD CODE utils.logAudit("DoCreateVfModule request: " + request) - + //tenantId def tenantId = "" if (utils.nodeExists(request, "tenant-id")) { @@ -316,15 +338,15 @@ public class DoCreateVfModule extends VfModuleBase { } 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) - + logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled) + //personaModelId def personaModelId = "" if (utils.nodeExists(request, "persona-model-id")) { @@ -332,7 +354,7 @@ public class DoCreateVfModule extends VfModuleBase { } execution.setVariable("DCVFM_personaModelId", personaModelId) logDebug("personaModelId: " + personaModelId, isDebugLogEnabled) - + //personaModelVersion def personaModelVersion = "" if (utils.nodeExists(request, "persona-model-version")) { @@ -340,16 +362,16 @@ public class DoCreateVfModule extends VfModuleBase { } 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) @@ -358,7 +380,7 @@ public class DoCreateVfModule extends VfModuleBase { //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() @@ -369,7 +391,7 @@ public class DoCreateVfModule extends VfModuleBase { execution.setVariable("DCVFM_vnfParamsMap", paramsMap) } } - + //Get or Generate UUID String uuid = execution.getVariable("DCVFM_uuid") if(uuid == null){ @@ -378,6 +400,14 @@ public class DoCreateVfModule extends VfModuleBase { }else{ logDebug("Found messageId (UUID) is: " + uuid, isDebugLogEnabled) } + // Get sdncVersion, default to empty + String sdncVersion = execution.getVariable("sdncVersion") + if (sdncVersion == null) { + sdncVersion = "" + } + logDebug("sdncVersion: " + sdncVersion, isDebugLogEnabled) + execution.setVariable("DCVFM_sdncVersion", sdncVersion) + execution.setVariable("DCVFM_uuid", uuid) execution.setVariable("DCVFM_baseVfModuleId", "") execution.setVariable("DCVFM_baseVfModuleHeatStackId", "") @@ -386,6 +416,7 @@ public class DoCreateVfModule extends VfModuleBase { execution.setVariable("DCVFM_volumeGroupStackId", "") execution.setVariable("DCVFM_cloudRegionForVolume", "") execution.setVariable("DCVFM_contrailNetworkPolicyFqdnList", "") + execution.setVariable("DCVFM_vnfTypeToQuery", "generic-vnf") rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "false") rollbackData.put("VFMODULE", "rollbackUpdateAAIVfModule", "false") rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "false") @@ -394,7 +425,7 @@ public class DoCreateVfModule extends VfModuleBase { 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' @@ -403,9 +434,9 @@ public class DoCreateVfModule extends VfModuleBase { } execution.setVariable("DCVFM_sdncCallbackUrl", sdncCallbackUrl) utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl) - logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugLogEnabled) - - + logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugLogEnabled) + + execution.setVariable("RollbackData", rollbackData) }catch(BpmnError b){ throw b @@ -442,7 +473,7 @@ public class DoCreateVfModule extends VfModuleBase { logDebug('Entered ' + method, isDebugLogEnabled) try { - buildResponse(execution, "", 200) + sendWorkflowResponse(execution, 200, "") logDebug('Exited ' + method, isDebugLogEnabled) } catch (BpmnError e) { throw e; @@ -483,6 +514,9 @@ public class DoCreateVfModule extends VfModuleBase { String vfModuleId = utils.getNodeText1(createResponse, 'vf-module-id') execution.setVariable('DCVFM_vfModuleId', vfModuleId) logDebug("vfModuleId is: " + vfModuleId, isDebugLogEnabled) + String vfModuleIndex= utils.getNodeText1(createResponse, 'vf-module-index') + execution.setVariable('DCVFM_vfModuleIndex', vfModuleIndex) + logDebug("vfModuleIndex is: " + vfModuleIndex, isDebugLogEnabled) rollbackData.put("VFMODULE", "vnfid", vnfId) rollbackData.put("VFMODULE", "vfmoduleid", vfModuleId) rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true") @@ -621,30 +655,24 @@ public class DoCreateVfModule extends VfModuleBase { logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled) } - public void preProcessSDNCGetRequest(Execution execution){ + public void preProcessSDNCGetRequest(Execution execution, String element){ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled") + String sdncVersion = execution.getVariable("DCVFM_sdncVersion") execution.setVariable("prefix", Prefix) utils.log("DEBUG", " ======== STARTED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled) try{ - String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse") - utils.logAudit("DCVFM_assignSDNCAdapterResponse is: \n" + response) - - String data = utils.getNodeXml(response, "response-data") - data = data.replaceAll("<", "<") - data = data.replaceAll(">", ">") - 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() + uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis() } - - String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vfModuleId + def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl") utils.logAudit("callbackUrl:" + callbackUrl) - + + def vfModuleId = execution.getVariable('DCVFM_vfModuleId') + def svcInstId = "" if (serviceInstanceId == null || serviceInstanceId.isEmpty()) { svcInstId = vfModuleId @@ -652,6 +680,35 @@ public class DoCreateVfModule extends VfModuleBase { else { svcInstId = serviceInstanceId } + // For VNF, serviceOperation (URI for topology GET) will be retrieved from "selflink" element + // in the response from GenericGetVnf + // For VF Module, in 1707 serviceOperation will be retrieved from "object-path" element + // in SDNC Assign Response + // For VF Module for older versions, serviceOperation is constructed using vfModuleId + + String serviceOperation = "" + if (element.equals("vnf")) { + def vnfQueryResponse = execution.getVariable("DCVFM_vnfQueryResponse") + serviceOperation = utils.getNodeText1(vnfQueryResponse, "selflink") + utils.log("DEBUG", "VNF - service operation: " + serviceOperation, isDebugLogEnabled) + } + else if (element.equals("vfmodule")) { + String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse") + utils.logAudit("DCVFM_assignSDNCAdapterResponse is: \n" + response) + + if (!sdncVersion.equals("1707")) { + serviceOperation = "/VNF-API:vnfs/vnf-list/" + vfModuleId + utils.log("DEBUG", "VF Module with sdncVersion before 1707 - service operation: " + serviceOperation, isDebugLogEnabled) + } + else { + String data = utils.getNodeXml(response, "response-data") + data = data.replaceAll("<", "<") + data = data.replaceAll(">", ">") + utils.log("DEBUG", "responseData: " + data, isDebugLogEnabled) + serviceOperation = utils.getNodeText1(data, "object-path") + utils.log("DEBUG", "VF Module with sdncVersion of 1707 - service operation: " + serviceOperation, isDebugLogEnabled) + } + } //!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE sleep(5000) @@ -710,6 +767,8 @@ public class DoCreateVfModule extends VfModuleBase { def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName") //vfModuleId def vfModuleId = execution.getVariable("DCVFM_vfModuleId") + //vfModuleIndex + def vfModuleIndex = execution.getVariable("DCVFM_vfModuleIndex") //requestId def requestId = execution.getVariable("DCVFM_requestId") //serviceId @@ -744,34 +803,14 @@ public class DoCreateVfModule extends VfModuleBase { notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl) } - String vnfParams - if(execution.getVariable("DCVFM_vnfParamsExistFlag") == true){ - StringBuilder sbParams = new StringBuilder() - Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap") - - for (Map.Entry<String, String> entry : paramsMap.entrySet()) { - String paramsXml - String paramName = entry.getKey(); - String paramValue = entry.getValue() - paramsXml = - """ <entry> - <key>${paramName}</key> - <value>${paramValue}</value> - </entry> - """ - - vnfParams = sbParams.append(paramsXml) - } - }else{ - vnfParams = "" - } - + Map<String, String> vnfParamsMap = execution.getVariable("DCVFM_vnfParamsMap") + //Get SDNC Response Data for VnfSubCreate Request String sdncGetResponse = execution.getVariable('DCVFM_getSDNCAdapterResponse') utils.logAudit("sdncGetResponse: " + sdncGetResponse) - String vfModuleParams = buildVfModuleParams(vnfParams, sdncGetResponse, vnfId, vnfName, - vfModuleId, vfModuleName) + String vfModuleParams = buildVfModuleParams(vnfParamsMap, sdncGetResponse, vnfId, vnfName, + vfModuleId, vfModuleName, vfModuleIndex) def svcInstId = "" if (serviceInstanceId == null || serviceInstanceId.isEmpty()) { @@ -781,7 +820,6 @@ public class DoCreateVfModule extends VfModuleBase { svcInstId = serviceInstanceId } - def createVnfARequest = """ <createVfModuleRequest> <cloudSiteId>${cloudSiteId}</cloudSiteId> @@ -864,13 +902,13 @@ public class DoCreateVfModule extends VfModuleBase { def requestId = execution.getVariable("mso-request-id") if (requestId == null) { - createWorkflowException(execution, 1002, processKey + " request has no mso-request-id") + exceptionUtil.buildAndThrowWorkflowException(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") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
} utils.logContext(requestId, serviceInstanceId) @@ -947,6 +985,21 @@ public class DoCreateVfModule extends VfModuleBase { def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName") def vnfId = execution.getVariable("DCVFM_vnfId") def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId") + def sdncVersion = execution.getVariable("DCVFM_sdncVersion") + def serviceModelInfo = execution.getVariable("serviceModelInfo") + def vnfModelInfo = execution.getVariable("vnfModelInfo") + def vfModuleModelInfo = execution.getVariable("vfModuleModelInfo") + String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo) + String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo) + String vfModuleEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vfModuleModelInfo) + def globalSubscriberId = execution.getVariable("DCVFM_globalSubscriberId") + boolean usePreload = execution.getVariable("DCVFM_usePreload") + String usePreloadToSDNC = usePreload ? "Y" : "N" + def modelCustomizationUuid = execution.getVariable("DCVFM_modelCustomizationUuid") + def modelCustomizationUuidString = "" + if (!usePreload) { + modelCustomizationUuidString = "<modelCustomizationUuid>" + modelCustomizationUuid + "</modelCustomizationUuid>" + } String sdncVNFParamsXml = "" @@ -955,11 +1008,15 @@ public class DoCreateVfModule extends VfModuleBase { }else{ sdncVNFParamsXml = "" } + + String sdncRequest = "" + + if (!sdncVersion.equals("1707")) { - 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"> + 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> @@ -989,10 +1046,114 @@ public class DoCreateVfModule extends VfModuleBase { <generic-vnf-type>${vnfType}</generic-vnf-type> <aic-cloud-region>${cloudSiteId}</aic-cloud-region> <tenant>${tenantId}</tenant> + ${modelCustomizationUuidString} + <use-preload>${usePreloadToSDNC}</use-preload> ${sdncVNFParamsXml} </vnf-request-information> </sdncadapterworkflow:SDNCRequestData> </sdncadapterworkflow:SDNCAdapterWorkflowRequest>""" + + } + else { + + sdncRequest = + """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1" + xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" + xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader> + <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId> + <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId> + <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction> + <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation> + <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl> + <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction> + </sdncadapter:RequestHeader> + <sdncadapterworkflow:SDNCRequestData> + <request-information> + <request-id>${requestId}</request-id> + <request-action>CreateVfModuleInstance</request-action> + <source>${source}</source> + <notification-url/> + </request-information> + <service-information> + <service-id>${serviceId}</service-id> + <subscription-service-type>${serviceId}</subscription-service-type> + ${serviceEcompModelInformation} + <service-instance-id>${svcInstId}</service-instance-id> + <global-customer-id>${globalSubscriberId}</global-customer-id> + </service-information> + <vnf-request-information> + <vnf-type>${vfModuleModelName}</vnf-type> + </vnf-request-information> + <vnf-information> + <vnf-id>${vnfId}</vnf-id> + <vnf-type>${vnfType}</vnf-type> + ${vnfEcompModelInformation} + </vnf-information> + <vf-module-information> + <vf-module-id>${vfModuleId}</vf-module-id> + <vf-module-type>${vfModuleModelName}</vf-module-type> + ${vfModuleEcompModelInformation} + </vf-module-information> + <vf-module-request-input> + <request-version>${sdncVersion}</request-version> + <vf-module-name>${vfModuleName}</vf-module-name> + <tenant>${tenantId}</tenant> + <aic-cloud-region>${cloudSiteId}</aic-cloud-region> + ${sdncVNFParamsXml} + </vf-module-request-input> + </sdncadapterworkflow:SDNCRequestData> + </sdncadapterworkflow:SDNCAdapterWorkflowRequest>""" + + + /* + sdncRequest = + """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader> + <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId> + <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId> + <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction> + <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation> + <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl> + </sdncadapter:RequestHeader> + <sdncadapterworkflow:SDNCRequestData> + <request-information> + <request-id>${requestId}</request-id> + <request-action>CreateVfModuleInstance</request-action> + <source>${source}</source> + <notification-url/> + </request-information> + <service-information> + <service-id>${serviceId}</service-id> + <service-type>${serviceId}</service-type> + ${serviceEcompModelInformation} + <service-instance-id>${svcInstId}</service-instance-id> + <global-customer-id>${globalSubscriberId}</global-customer-id> + </service-information> + <vnf-information> + <vnf-id>${vnfId}</vnf-id> + <vnf-type>${vnfType}</vnf-type> + ${vnfEcompModelInformation} + </vnf-information> + <vf-module-information> + <vf-module-id>${vfModuleId}</vf-module-id> + <vf-module-type>${vfModuleModelName}</vf-module-type> + ${vfModuleEcompModelInformation} + </vf-module-information> + <vf-module-request-input> + <request-version>${sdncVersion}</request-version> + <vf-module-name>${vfModuleName}</vf-module-name> + <tenant>${tenantId}</tenant> + <aic-cloud-region>${cloudSiteId}</aic-cloud-region> + ${sdncVNFParamsXml} + </vf-module-request-input> + </sdncadapterworkflow:SDNCRequestData> + </sdncadapterworkflow:SDNCAdapterWorkflowRequest>""" + */ + + } utils.logAudit("sdncRequest: " + sdncRequest) return sdncRequest @@ -1080,20 +1241,20 @@ public class DoCreateVfModule extends VfModuleBase { else if (key.endsWith("contrail_network_policy_fqdn")) { String contrailNetworkPolicyFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent() logDebug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn, isDebugLogEnabled) - contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn) + 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) + 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) @@ -1435,7 +1596,7 @@ public class DoCreateVfModule extends VfModuleBase { logDebug("======== COMPLETED prepareCreateAAIVfModuleVolumeGroupRequest ======== ", isDebugLogEnabled) } - + public void createNetworkPoliciesInAAI(Execution execution) { def method = getClass().getSimpleName() + '.createNetworkPoliciesInAAI(' + 'execution=' + execution.getId() + @@ -1444,13 +1605,13 @@ public class DoCreateVfModule extends VfModuleBase { 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) @@ -1458,8 +1619,8 @@ public class DoCreateVfModule extends VfModuleBase { AaiUtil aaiUriUtil = new AaiUtil(this) String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution) - if (fqdnCount > 0) { - + if (fqdnCount > 0) { + // AII loop call over contrail network policy fqdn list for (i in 0..fqdnCount-1) { @@ -1467,10 +1628,10 @@ public class DoCreateVfModule extends VfModuleBase { 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) @@ -1489,32 +1650,32 @@ public class DoCreateVfModule extends VfModuleBase { // 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) + 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") + 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) - + 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> + <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) @@ -1527,8 +1688,8 @@ public class DoCreateVfModule extends VfModuleBase { int returnCodePut = responsePut.getStatusCode() execution.setVariable("DCVFM_aaiAddNetworkPolicyReturnCode", returnCodePut) logDebug(" ***** AAI add network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodePut, isDebugLogEnabled) - - String aaiResponseAsStringPut = responsePut.getResponseBodyAsString() + + 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 @@ -1538,14 +1699,14 @@ public class DoCreateVfModule extends VfModuleBase { 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) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, putErrorMessage) } - + } else { if (aaiResponseAsString.contains("RESTFault")) { WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) @@ -1564,7 +1725,7 @@ public class DoCreateVfModule extends VfModuleBase { } // end loop - + } else { logDebug("No contrail network policies to query/create", isDebugLogEnabled) @@ -1580,7 +1741,7 @@ public class DoCreateVfModule extends VfModuleBase { } } - + /** * Prepare a Request for invoking the UpdateAAIGenericVnf subflow. * @@ -1600,18 +1761,18 @@ public class DoCreateVfModule extends VfModuleBase { def oamManagementV6Address = execution.getVariable("DCVFM_oamManagementV6Address") def ipv4OamAddressElement = '' def managementV6AddressElement = '' - + if (oamManagementV4Address != null && !oamManagementV4Address.isEmpty()) { - ipv4OamAddressElement = '<ipv4-oam-address>' + oamManagementV4Address + '</ipv4-oam-address>' + 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> @@ -1623,17 +1784,17 @@ public class DoCreateVfModule extends VfModuleBase { 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()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage()) } } - + /** * Post process a result from invoking the UpdateAAIGenericVnf subflow. * @@ -1648,31 +1809,33 @@ public class DoCreateVfModule extends VfModuleBase { 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()) { + + if (oamManagementV4Address != null && !oamManagementV4Address.isEmpty()) { rollbackData.put("VFMODULE", "oamManagementV4Address", oamManagementV4Address) } - + if (oamManagementV6Address != null && !oamManagementV6Address.isEmpty()) { - rollbackData.put("VFMODULE", "oamManagementV6Address", oamManagementV6Address) + rollbackData.put("VFMODULE", "oamManagementV6Address", oamManagementV6Address) } - - execution.setVariable("RollbackData", rollbackData) - + + 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()) + exceptionUtil.buildAndThrowWorkflowException(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 index 391b76a21a..8ca749d1ec 100644 --- 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 @@ -1,38 +1,38 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 +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() @@ -72,7 +72,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ execution.setVariable("DCVFMR_cloudSiteId", cloudSiteId) String heatStackId = rollbackData.get("VFMODULE", "heatstackid") execution.setVariable("DCVFMR_heatStackId", heatStackId) - String requestId = rollbackData.get("VFMODULE", "msorequestid") + String requestId = rollbackData.get("VFMODULE", "msorequestid")
execution.setVariable("DCVFMR_requestId", requestId) List createdNetworkPolicyFqdnList = [] int i = 0 @@ -84,15 +84,15 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ 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") + //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")) @@ -105,10 +105,10 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ // 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 + <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) @@ -119,7 +119,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ public void prepSDNCAdapterRequest(Execution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId") - + def callbackUrl = execution.getVariable("URN_mso_workflow_sdncadapter_callback") String source = execution.getVariable("DCVFMR_source") @@ -133,12 +133,12 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ String vfModuleModelName = execution.getVariable("DCVFMR_vfModuleModelName") String cloudSiteId = execution.getVariable("DCVFMR_cloudSiteId") String requestId = execution.getVariable("DCVFMR_requestId") - + String serviceInstanceIdToSdnc = "" if (srvInstId != null && !srvInstId.isEmpty()) { serviceInstanceIdToSdnc = srvInstId } else { - serviceInstanceIdToSdnc = vfModuleId + serviceInstanceIdToSdnc = vfModuleId } def doSDNCActivateRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestActivate") @@ -159,43 +159,43 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ 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>""" + 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) @@ -214,7 +214,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId") String vfModuleStackId = execution.getVariable("DCVFMR_heatStackId") String tenantId = execution.getVariable("DCVFMR_tenantId") - def messageId = execution.getVariable('mso-request-id') + '-' + + def messageId = execution.getVariable('mso-request-id') + '-' +
System.currentTimeMillis() def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId) def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host") @@ -223,21 +223,21 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ } 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 + <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) @@ -252,11 +252,11 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ 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 + <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) @@ -270,9 +270,9 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ 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 + <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) @@ -305,7 +305,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ throw new BpmnError("MSOWorkflowException") } } - + public void deleteNetworkPoliciesFromAAI(Execution execution) { def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' + 'execution=' + execution.getId() + @@ -314,7 +314,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ logDebug('Entered ' + method, isDebugLogEnabled) execution.setVariable("prefix", Prefix) logDebug(" ======== STARTED deleteNetworkPoliciesFromAAI ======== ", isDebugLogEnabled) - + try { // get variables List fqdnList = execution.getVariable(Prefix + "createdNetworkPolicyFqdnList") @@ -323,35 +323,35 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ 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 @@ -361,32 +361,32 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ // 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 @@ -412,29 +412,29 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ } } - - - + + + } // 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. * @@ -446,42 +446,42 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ ')' 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> + <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()) + exceptionUtil.buildAndThrowWorkflowException(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/DoCreateVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy index 23763c63b8..55d56a6194 100644 --- 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 @@ -16,12 +16,12 @@ * 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.openecomp.mso.bpmn.core.RollbackData
+import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution import org.openecomp.mso.bpmn.common.scripts.AaiUtil import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor @@ -30,385 +30,429 @@ 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) +
+
+/**
+ * This class supports the DoCreateVnf building block subflow
+ * with the creation of a generic vnf for
+ * infrastructure.
+ *
+ */
+class DoCreateVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="DoCVNF_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoCreateVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ // DISABLE SDNC INTERACTION FOR NOW
+ execution.setVariable("SDNCInteractionEnabled", false)
+
+
+ /*******************/
+ try{
+ // Get Variables
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("DoCVNF_requestId", requestId)
execution.setVariable("mso-request-id", requestId) - utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled) - - String serviceInstanceId = execution.getVariable("serviceInstanceId") - execution.setVariable("DoCVNF_serviceInstanceId", serviceInstanceId) - utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled) - - String vnfType = execution.getVariable("vnfType") - execution.setVariable("DoCVNF_vnfType", vnfType) - utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled) - - String vnfName = execution.getVariable("vnfName") - execution.setVariable("DoCVNF_vnfName", vnfName) - utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled) - - String serviceId = execution.getVariable("productFamilyId") - execution.setVariable("DoCVNF_serviceId", serviceId) - utils.log("DEBUG", "Incoming Service Id is: " + serviceId, isDebugEnabled) - - String source = "VID" - execution.setVariable("DoCVNF_source", source) - utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled) - - String suppressRollback = execution.getVariable("disableRollback") - execution.setVariable("DoCVNF_suppressRollback", suppressRollback) - utils.log("DEBUG", "Incoming Suppress Rollback is: " + suppressRollback, isDebugEnabled) - - String modelInvariantId = jsonUtil.getJsonValue(vnfModelInfo, "modelInvariantId") - execution.setVariable("DoCVNF_modelInvariantId", modelInvariantId) - utils.log("DEBUG", "Incoming Invariant Id is: " + modelInvariantId, isDebugEnabled) - - String modelVersionId = jsonUtil.getJsonValue(vnfModelInfo, "modelVersionId") - if (modelVersionId == null) { - modelVersionId = "" - } - execution.setVariable("DoCVNF_modelVersionId", modelVersionId) - utils.log("DEBUG", "Incoming Version Id is: " + modelVersionId, isDebugEnabled) - - String modelVersion = jsonUtil.getJsonValue(vnfModelInfo, "modelVersion") - execution.setVariable("DoCVNF_modelVersion", modelVersion) - utils.log("DEBUG", "Incoming Model Version is: " + modelVersion, isDebugEnabled) - - String modelName = jsonUtil.getJsonValue(vnfModelInfo, "modelName") - execution.setVariable("DoCVNF_modelName", modelName) - utils.log("DEBUG", "Incoming Model Name is: " + modelName, isDebugEnabled) - - String modelCustomizationId = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationId") - if (modelCustomizationId == null) { - modelCustomizationId = "" - } - execution.setVariable("DoCVNF_modelCustomizationId", modelCustomizationId) - utils.log("DEBUG", "Incoming Model Customization Id is: " + modelCustomizationId, isDebugEnabled) - - String cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId") - execution.setVariable("DoCVNF_cloudSiteId", cloudSiteId) - utils.log("DEBUG", "Incoming Cloud Site Id is: " + cloudSiteId, isDebugEnabled) - - String tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId") - execution.setVariable("DoCVNF_tenantId", tenantId) - utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId, isDebugEnabled) - - //For Completion Handler & Fallout Handler - String requestInfo = + utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DoCVNF_serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DoCVNF_vnfType", vnfType)
+ utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled)
+
+ String vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DoCVNF_vnfName", vnfName)
+ utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+ String serviceId = execution.getVariable("productFamilyId")
+ execution.setVariable("DoCVNF_serviceId", serviceId)
+ utils.log("DEBUG", "Incoming Service Id is: " + serviceId, isDebugEnabled)
+
+ String source = "VID"
+ execution.setVariable("DoCVNF_source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ String suppressRollback = execution.getVariable("disableRollback")
+ execution.setVariable("DoCVNF_suppressRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String modelInvariantId = jsonUtil.getJsonValue(vnfModelInfo, "modelInvariantId")
+ execution.setVariable("DoCVNF_modelInvariantId", modelInvariantId)
+ utils.log("DEBUG", "Incoming Invariant Id is: " + modelInvariantId, isDebugEnabled)
+
+ String modelVersionId = jsonUtil.getJsonValue(vnfModelInfo, "modelVersionId")
+ if (modelVersionId == null) {
+ modelVersionId = ""
+ }
+ execution.setVariable("DoCVNF_modelVersionId", modelVersionId)
+ utils.log("DEBUG", "Incoming Version Id is: " + modelVersionId, isDebugEnabled)
+
+ String modelVersion = jsonUtil.getJsonValue(vnfModelInfo, "modelVersion")
+ execution.setVariable("DoCVNF_modelVersion", modelVersion)
+ utils.log("DEBUG", "Incoming Model Version is: " + modelVersion, isDebugEnabled)
+
+ String modelName = jsonUtil.getJsonValue(vnfModelInfo, "modelName")
+ execution.setVariable("DoCVNF_modelName", modelName)
+ utils.log("DEBUG", "Incoming Model Name is: " + modelName, isDebugEnabled)
+
+ String modelCustomizationId = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationId")
+ if (modelCustomizationId == null) {
+ modelCustomizationId = ""
+ }
+ execution.setVariable("DoCVNF_modelCustomizationId", modelCustomizationId)
+ utils.log("DEBUG", "Incoming Model Customization Id is: " + modelCustomizationId, isDebugEnabled)
+
+ String cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
+ execution.setVariable("DoCVNF_cloudSiteId", cloudSiteId)
+ utils.log("DEBUG", "Incoming Cloud Site Id is: " + cloudSiteId, isDebugEnabled)
+
+ String tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId")
+ execution.setVariable("DoCVNF_tenantId", tenantId)
+ utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId, isDebugEnabled)
+
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ if (globalSubscriberId == null) {
+ globalSubscriberId = ""
+ }
+ execution.setVariable("DoCVNF_globalSubscriberId", globalSubscriberId)
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null) {
+ sdncVersion = "1702"
+ }
+ execution.setVariable("DoCVNF_sdncVersion", sdncVersion)
+ utils.log("DEBUG", "Incoming Sdnc Version is: " + sdncVersion, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
"""<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> - <request-id>${requestId}</request-id> - <action>CREATE</action> - <source>${source}</source> - </request-info>""" - - execution.setVariable("DoCVNF_requestInfo", requestInfo) - //TODO: Orch Status - TBD, will come from SDN-C Response in 1702 - String orchStatus = "Created" - execution.setVariable("DoCVNF_orchStatus", orchStatus) - - //TODO: Equipment Role - Should come from SDN-C Response in 1702 - String equipmentRole = " " - execution.setVariable("DoCVNF_equipmentRole", equipmentRole) - String vnfId = execution.getVariable("testVnfId") // for junits - if(isBlank(vnfId)){ - vnfId = execution.getVariable("vnfId") - if (isBlank(vnfId)) { - vnfId = UUID.randomUUID().toString() - utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled) - } - } - execution.setVariable("DoCVNF_vnfId", vnfId) - - // Setting for Sub Flow Calls - execution.setVariable("DoCVNF_type", "generic-vnf") - execution.setVariable("GENGS_type", "service-instance") - - String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback') - if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) { - def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing' - logError(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) - } - execution.setVariable("DoCVNF_sdncCallbackUrl", sdncCallbackUrl) - utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl) - logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugEnabled) - - }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){ + <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("DoCVNF_requestInfo", requestInfo)
+ //TODO: Orch Status - TBD, will come from SDN-C Response in 1702
+ String orchStatus = "Created"
+ execution.setVariable("DoCVNF_orchStatus", orchStatus)
+
+ //TODO: Equipment Role - Should come from SDN-C Response in 1702
+ String equipmentRole = " "
+ execution.setVariable("DoCVNF_equipmentRole", equipmentRole)
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = execution.getVariable("vnfId")
+ if (isBlank(vnfId)) {
+ vnfId = UUID.randomUUID().toString()
+ utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+ }
+ }
+ execution.setVariable("DoCVNF_vnfId", vnfId)
+
+ // Setting for Sub Flow Calls
+ execution.setVariable("DoCVNF_type", "generic-vnf")
+ execution.setVariable("GENGS_type", "service-instance")
+
+ String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("DoCVNF_sdncCallbackUrl", sdncCallbackUrl)
+ utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
+ logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugEnabled)
+
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+
+ execution.setVariable("RollbackData", rollbackData)
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnf PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void prepareCreateGenericVnf (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DoCreateVnf PrepareCreateGenericVnf Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ def vnfName = execution.getVariable("DoCVNF_vnfName")
+ def vnfType = execution.getVariable("DoCVNF_vnfType")
+ def serviceId = execution.getVariable("DoCVNF_serviceId")
+ def orchStatus = execution.getVariable("DoCVNF_orchStatus")
+ def modelInvariantId = execution.getVariable("DoCVNF_modelInvariantId")
+ def modelVersion = execution.getVariable("DoCVNF_modelVersion")
+ def modelCustomizationId = execution.getVariable("DoCVNF_modelCustomizationId")
+ // TODO: 1702 Variable
+ def equipmentRole = execution.getVariable("DoCVNF_equipmentRole")
+
+ //Get Service Instance Info
+ def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+ String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
+
+ int custStart = siRelatedLink.indexOf("customer/")
+ int custEnd = siRelatedLink.indexOf("/service-subscriptions")
+ String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
+ int serviceStart = siRelatedLink.indexOf("service-subscription/")
+ int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+ String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+
+ //Get Namespace
+ AaiUtil aaiUtil = new AaiUtil(this)
+ def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+ String namespace = aaiUtil.getNamespaceFromUri(aai_uri)
+
+ String payload =
+ """<generic-vnf xmlns="${namespace}">
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-name>${vnfName}</vnf-name>
+ <service-id>${serviceId}</service-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <prov-status>PREPROV</prov-status>
+ <orchestration-status>${orchStatus}</orchestration-status>
+ <persona-model-id>${modelInvariantId}</persona-model-id>
+ <persona-model-version>${modelVersion}</persona-model-version>
+ <persona-model-customization-id>${modelCustomizationId}</persona-model-customization-id>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>${siRelatedLink}</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>${globalCustId}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>${serviceType}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>${serviceInstanceId}</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </generic-vnf>"""
+
+ execution.setVariable("DoCVNF_genericVnfPayload", payload)
+
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoCreateVnf PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PrepareCreateGenericVnf Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnf PrepareCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+ public void postProcessCreateGenericVnf (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DoCreateVnf PostProcessCreateGenericVnf Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ def rollbackData = execution.getVariable("RollbackData")
+ rollbackData.put("VNF", "vnfId", vnfId)
+ execution.setVariable("RollbackData", rollbackData)
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoCreateVnf PostProcessCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PostProcessCreateGenericVnf Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnf PostProcessCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+
+ public void preProcessSDNCAssignRequest(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ def vnfId = execution.getVariable("DoCVNF_vnfId")
+ def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+ logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled)
+ utils.logAudit("NEW VNF ID: " + vnfId)
+
+ try{
+ //Build SDNC Request
+
+ String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("DoCVNF_assignSDNCRequest", assignSDNCRequest)
+ logDebug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessSDNCAssignRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCAssignRequest Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void preProcessSDNCActivateRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ try{
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ String serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+
+ String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate")
+
+ execution.setVariable("DoCVNF_activateSDNCRequest", activateSDNCRequest)
+ logDebug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+
+ }catch(Exception e){
+ log.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ }
+
+ public String buildSDNCRequest(Execution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis() - } - def callbackURL = execution.getVariable("DoCVNF_sdncCallbackUrl") - def requestId = execution.getVariable("DoCVNF_requestId") - def serviceId = execution.getVariable("DoCVNF_serviceId") - def vnfType = execution.getVariable("DoCVNF_vnfType") - def vnfName = execution.getVariable("DoCVNF_vnfName") - def tenantId = execution.getVariable("DoCVNF_tenantId") - def source = execution.getVariable("DoCVNF_source") - def vnfId = execution.getVariable("DoCVNF_vnfId") - def cloudSiteId = execution.getVariable("DoCVNF_cloudSiteId") - def 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 = + }
+ def callbackURL = execution.getVariable("DoCVNF_sdncCallbackUrl")
+ def requestId = execution.getVariable("DoCVNF_requestId")
+ def serviceId = execution.getVariable("DoCVNF_serviceId")
+ def vnfType = execution.getVariable("DoCVNF_vnfType")
+ def vnfName = execution.getVariable("DoCVNF_vnfName")
+ def tenantId = execution.getVariable("DoCVNF_tenantId")
+ def source = execution.getVariable("DoCVNF_source")
+ def vnfId = execution.getVariable("DoCVNF_vnfId")
+ def cloudSiteId = execution.getVariable("DoCVNF_cloudSiteId")
+ def modelCustomizationId = execution.getVariable("DoCVNF_modelCustomizationId")
+ def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ def vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo)
+ String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo)
+ def globalSubscriberId = execution.getVariable("DoCVNF_globalSubscriberId")
+ def sdncVersion = execution.getVariable("DoCVNF_sdncVersion")
+
+ String sdncVNFParamsXml = ""
+
+ if(execution.getVariable("DoCVNF_vnfParamsExistFlag") == true){
+ sdncVNFParamsXml = buildSDNCParamsXml(execution)
+ }else{
+ sdncVNFParamsXml = ""
+ }
+
+ String sdncRequest =
"""<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1" xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1"> - <sdncadapter:RequestHeader> - <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId> - <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId> - <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction> - <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation> - <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl> - </sdncadapter: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) - } - - -} + <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>CreateVnfInstance</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <subscription-service-type>${serviceId}</subscription-service-type>
+ ${serviceEcompModelInformation}
+ <service-instance-id>${svcInstId}</service-instance-id>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-type>${vnfType}</vnf-type>
+ ${vnfEcompModelInformation}
+ </vnf-information>
+ <vnf-request-input>
+ <request-version>${sdncVersion}</request-version>
+ <vnf-name></vnf-name>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ ${sdncVNFParamsXml}
+ </vnf-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.logAudit("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(Execution execution, String response, String method){
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ utils.logAudit("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ utils.logAudit("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
+
+ }else{
+ logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+ }
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy index e1fca3ddc3..861da52397 100644 --- 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 @@ -1,241 +1,285 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.mso.bpmn.infrastructure.scripts - -import java.util.UUID; - -import org.json.JSONObject; -import org.json.JSONArray; - -import org.camunda.bpm.engine.delegate.BpmnError -import org.camunda.bpm.engine.runtime.Execution; - -import static org.apache.commons.lang3.StringUtils.*; - -import org.openecomp.mso.bpmn.core.json.JsonUtils -import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils -import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil -import org.openecomp.mso.bpmn.common.scripts.VidUtils -import org.openecomp.mso.bpmn.core.RollbackData -import org.openecomp.mso.bpmn.core.WorkflowException - - - -/** - * This class supports the macro VID Flow - * with the creation of a generic vnf and related VF modules. - */ -class DoCreateVnfAndModules extends AbstractServiceTaskProcessor { - - String Prefix="DCVAM_" - ExceptionUtil exceptionUtil = new ExceptionUtil() - JsonUtils jsonUtil = new JsonUtils() - VidUtils vidUtils = new VidUtils(this) - CatalogDbUtils cutils = new CatalogDbUtils() - - /** - * This method gets and validates the incoming - * request. - * - * @param - execution - */ - public void preProcessRequest(Execution execution) { - def isDebugEnabled = execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix",Prefix) - utils.log("DEBUG", " *** STARTED DoCreateVnfAndModules PreProcessRequest Process*** ", isDebugEnabled) - - try{ - // Get Variables - - - String cloudConfiguration = execution.getVariable("cloudConfiguration") - String vnfModelInfo = execution.getVariable("vnfModelInfo") - - String requestId = execution.getVariable("requestId") - execution.setVariable("mso-request-id", requestId) - utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled) - - String serviceInstanceId = execution.getVariable("serviceInstanceId") - utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled) - - String vnfType = execution.getVariable("vnfType") - utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled) - - String vnfName = execution.getVariable("vnfName") - execution.setVariable("CREVI_vnfName", vnfName) - utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled) - - String productFamilyId = execution.getVariable("productFamilyId") - utils.log("DEBUG", "Incoming Product Family Id is: " + productFamilyId, isDebugEnabled) - - String source = "VID" - execution.setVariable("source", source) - utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled) - - String disableRollback = execution.getVariable("disableRollback") - utils.log("DEBUG", "Incoming Disable Rollback is: " + disableRollback, isDebugEnabled) - - String asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion") - utils.log("DEBUG", "Incoming asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugEnabled) - - String vnfId = execution.getVariable("testVnfId") // for junits - if(isBlank(vnfId)){ - vnfId = execution.getVariable("vnfId") - if (isBlank(vnfId)) { - vnfId = UUID.randomUUID().toString() - utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled) - } - } - execution.setVariable("vnfId", vnfId) - - }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) - } - - - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.UUID;
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+
+/**
+* This class supports the macro VID Flow
+* with the creation of a generic vnf and related VF modules.
+*/
+class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
+
+ String Prefix="DCVAM_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ CatalogDbUtils cutils = new CatalogDbUtils()
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoCreateVnfAndModules PreProcessRequest Process*** ", isDebugEnabled)
+
+ try{
+ // Get Variables
+
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("mso-request-id", requestId)
+ utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfType = execution.getVariable("vnfType")
+ utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled)
+
+ String vnfName = execution.getVariable("vnfName")
+ execution.setVariable("CREVI_vnfName", vnfName)
+ utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+ String productFamilyId = execution.getVariable("productFamilyId")
+ utils.log("DEBUG", "Incoming Product Family Id is: " + productFamilyId, isDebugEnabled)
+
+ String source = "VID"
+ execution.setVariable("source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ String disableRollback = execution.getVariable("disableRollback")
+ utils.log("DEBUG", "Incoming Disable Rollback is: " + disableRollback, isDebugEnabled)
+
+ String asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ utils.log("DEBUG", "Incoming asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugEnabled)
+
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = execution.getVariable("vnfId")
+ if (isBlank(vnfId)) {
+ vnfId = UUID.randomUUID().toString()
+ utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+ }
+ }
+ execution.setVariable("vnfId", vnfId)
+
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+
+ execution.setVariable("numOfCreatedAddOnModules", 0)
+
+ rollbackData.put("VNFANDMODULES", "numOfCreatedAddOnModules", 0)
+ execution.setVariable("RollbackData", rollbackData)
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnfAndModules PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnfAndModules PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void queryCatalogDB (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DoCreateVnfAndModules QueryCatalogDB Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String vnfModelCustomizationUuid = jsonUtil.getJsonValueForKey(vnfModelInfo, "modelCustomizationId")
+ utils.log("DEBUG", "querying Catalog DB by vnfModelCustomizationUuid: " + vnfModelCustomizationUuid)
+ String catalogDbEndpoint = execution.getVariable("URN_mso_catalog_db_endpoint")
+
+ JSONArray vnfs = cutils.getAllVnfsByVnfModelCustomizationUuid(catalogDbEndpoint,
+ vnfModelCustomizationUuid)
+ utils.log("DEBUG", "obtained VNF list")
+ // Only one match here
+ JSONObject vnf = vnfs[0]
+ JSONArray vfModules = vnf.getJSONArray("vfModules")
+ JSONArray addOnModules = new JSONArray()
+
+ // Set up base Vf Module info
+ for (int i = 0; i < vfModules.length(); i++) {
+ utils.log("DEBUG", "handling VF Module ")
+ JSONObject vfModule = vfModules[i]
+ String isBase = jsonUtil.getJsonValueForKey(vfModule, "isBase")
+ if (isBase.equals("true")) {
+ JSONObject baseVfModuleModelInfoObject = vfModule.getJSONObject("modelInfo")
+ String baseVfModuleModelInfo = baseVfModuleModelInfoObject.toString()
+ execution.setVariable("baseVfModuleModelInfo", baseVfModuleModelInfo)
+ String baseVfModuleLabel = jsonUtil.getJsonValueForKey(vfModule, "vfModuleLabel")
+ execution.setVariable("baseVfModuleLabel", baseVfModuleLabel)
+ String basePersonaModelId = jsonUtil.getJsonValueForKey(baseVfModuleModelInfoObject, "modelInvariantId")
+ execution.setVariable("basePersonaModelId", basePersonaModelId)
+ }
+ else {
+ addOnModules.add(vfModules[i])
+ }
+ }
+
+ execution.setVariable("addOnModules", addOnModules)
+ execution.setVariable("addOnModulesToDeploy", addOnModules.length())
+ execution.setVariable("addOnModulesDeployed", 0)
+
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoCreateVnfAndModules QueryCatalogDB Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnfAndModules QueryCatalogDB Process")
+ }
+
+ // Generate vfModuleId for base VF Module
+ def baseVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("baseVfModuleId", baseVfModuleId)
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+ public void preProcessAddOnModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessAddOnModule ======== ", isDebugLogEnabled)
+
+ try {
+ JSONArray addOnModules = (JSONArray) execution.getVariable("addOnModules")
+ int addOnIndex = (int) execution.getVariable("addOnModulesDeployed")
+
+ JSONObject addOnModule = addOnModules[addOnIndex]
+
+ def newVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("addOnVfModuleId", newVfModuleId)
+
+ execution.setVariable("instancesOfThisModelDeployed", 0)
+
+ JSONObject addOnVfModuleModelInfoObject = jsonUtil.getJsonValueForKey(addOnModule, "modelInfo")
+ String addOnVfModuleModelInfo = addOnVfModuleModelInfoObject.toString()
+ execution.setVariable("addOnVfModuleModelInfo", addOnVfModuleModelInfo)
+ String addOnVfModuleLabel = jsonUtil.getJsonValueForKey(addOnModule, "vfModuleLabel")
+ execution.setVariable("addOnVfModuleLabel", addOnVfModuleLabel)
+ String addOnPersonaModelId = jsonUtil.getJsonValueForKey(addOnVfModuleModelInfoObject, "modelInvariantId")
+ execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
+ String addOnInitialCount = jsonUtil.getJsonValueForKey(addOnModule, "initialCount")
+ execution.setVariable("initialCount", addOnInitialCount)
+
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void validateBaseModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED validateBaseModule ======== ", isDebugLogEnabled)
+
+ try {
+ def baseRollbackData = execution.getVariable("DCVAM_baseRollbackData")
+ def rollbackData = execution.getVariable("RollbackData")
+
+ def baseModuleMap = baseRollbackData.get("VFMODULE")
+ baseModuleMap.each{ k, v -> rollbackData.put("VFMODULE_BASE", "${k}","${v}") }
+ execution.setVariable("RollbackData", rollbackData)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing validateBaseModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during validateBaseModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED validateBaseModule ======== ", isDebugLogEnabled)
+ }
+
+ public void validateAddOnModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED validateAddOnModule ======== ", isDebugLogEnabled)
+
+ try {
+ int instancesOfThisModuleDeployed = execution.getVariable("instancesOfThisModuleDeployed")
+ int numOfCreatedAddOnModules = execution.getVariable("numOfCreatedAddOnModules")
+ def addOnRollbackData = execution.getVariable("DCVAM_addOnRollbackData")
+ def rollbackData = execution.getVariable("RollbackData")
+
+ def addOnModuleMap = addOnRollbackData.get("VFMODULE")
+ numOfCreatedAddOnModules = numOfCreatedAddOnModules + 1
+ addOnModuleMap.each{ k, v -> rollbackData.put("VFMODULE_ADDON_" + numOfCreatedAddOnModules, "${k}","${v}") }
+
+ execution.setVariable("DCVAM_addOnRollbackData", null)
+
+ execution.setVariable("instancesOfThisModuleDeployed", instancesOfThisModuleDeployed + 1)
+
+ execution.setVariable("numOfCreatedAddOnModules", numOfCreatedAddOnModules)
+ rollbackData.put("VNFANDMODULES", "numOfCreatedAddOnModules", numOfCreatedAddOnModules)
+ execution.setVariable("RollbackData", rollbackData)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void finishProcessingInitialCountDeployment(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED finishProcessingInitialCountDeployment ======== ", isDebugLogEnabled)
+
+ try {
+ int addOnModulesDeployed = execution.getVariable("addOnModulesDeployed")
+ execution.setVariable("addOnModulesDeployed", addOnModulesDeployed + 1)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy new file mode 100644 index 0000000000..7b9bed3f7a --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy @@ -0,0 +1,153 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.UUID;
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+/**
+ * This class supports the macro VID Flow
+ * with the rollback of a creation of a generic vnf and related VF modules.
+ */
+class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
+
+ String Prefix="DCVAMR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoCreateVnfAndModulesRollback PreProcessRequest Process*** ", isDebugEnabled)
+
+ try{
+ // Get Rollback Variables
+
+ def rollbackData = execution.getVariable("RollbackData")
+ utils.log("DEBUG", "Incoming RollbackData is: " + rollbackData.toString(), isDebugEnabled)
+ String vnfId = rollbackData.get("VNF", "vnfId")
+ utils.log("DEBUG", "Rollback vnfId is: " + vnfId, isDebugEnabled)
+ execution.setVariable("DCVAMR_vnfId", vnfId)
+
+ def numOfAddOnModulesString = rollbackData.get("VNFANDMODULES", "numOfCreatedAddOnModules")
+ int numOfAddOnModules = 0
+ if (numOfAddOnModulesString != null) {
+ numOfAddOnModules = Integer.parseInt(numOfAddOnModulesString)
+ }
+ execution.setVariable("DCVAMR_numOfAddOnModules", numOfAddOnModules)
+
+ def baseVfModuleRollbackMap = rollbackData.get("VFMODULE_BASE")
+ if (baseVfModuleRollbackMap == null) {
+ // there are no VF Modules to delete
+ execution.setVariable("DCVAMR_numOfModulesToDelete", 0)
+ }
+ else {
+ execution.setVariable("DCVAMR_numOfModulesToDelete", numOfAddOnModules + 1)
+ }
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnfAndModulesRollback PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnfAndModulesRollback PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnfAndModulesRollback PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+
+ public void preProcessCreateVfModuleRollback(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessCreateVfModuleRollback ======== ", isDebugLogEnabled)
+
+ try {
+
+ def rollbackData = execution.getVariable("RollbackData")
+
+ def vfModuleRollbackData = new RollbackData()
+
+ def numOfModulesToDelete = execution.getVariable("DCVAMR_numOfModulesToDelete")
+ logDebug("numOfModulesToDelete: " + numOfModulesToDelete, isDebugLogEnabled)
+ def moduleMap = null
+
+ if (numOfModulesToDelete > 1) {
+ int addOnModuleIndex = numOfModulesToDelete - 1
+ moduleMap = rollbackData.get("VFMODULE_ADDON_" + addOnModuleIndex)
+ logDebug("Removing ADDON VF module # " + addOnModuleIndex, isDebugLogEnabled)
+ }
+ else {
+ moduleMap = rollbackData.get("VFMODULE_BASE")
+ logDebug("Removing BASE VF module", isDebugLogEnabled)
+ }
+ moduleMap.each{ k, v -> vfModuleRollbackData.put("VFMODULE", "${k}","${v}") }
+ execution.setVariable("DCVAMR_RollbackData", vfModuleRollbackData)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessCreateVfModuleRollback. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessCreateVfModuleRollback Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessCreateVfModuleRollback ======== ", isDebugLogEnabled)
+ }
+
+
+ public void postProcessCreateVfModuleRollback(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED postProcessCreateVfModuleRollback ======== ", isDebugLogEnabled)
+
+ try {
+ def numOfModulesToDelete = execution.getVariable("DCVAMR_numOfModulesToDelete")
+ execution.setVariable("DCVAMR_numOfModulesToDelete", numOfModulesToDelete - 1)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing postProcessCreateVfModuleRollback. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during postProcessCreateVfModuleRollback Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED postProcessCreateVfModuleRollback ======== ", isDebugLogEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy index dbe31528cf..76a86ff516 100644 --- 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 @@ -1,35 +1,35 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; @@ -179,7 +179,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { // 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") + lcpCloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region") if (lcpCloudRegion == 'null') { lcpCloudRegion = null } @@ -245,7 +245,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { 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 + String queryAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1" utils.logAudit(queryAAIRequest) execution.setVariable(Prefix + "queryAAIRequest", queryAAIRequest) utils.log("DEBUG", Prefix + "AAIRequest - " + "\n" + queryAAIRequest, isDebugEnabled) @@ -388,7 +388,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { ExceptionUtil exceptionUtil = new ExceptionUtil() try { // get variables - String networkInputs = execution.getVariable(Prefix + "networkInputs") + String networkRequest = execution.getVariable(Prefix + "networkRequest") String cloudSiteId = execution.getVariable(Prefix + "cloudRegionPo") String tenantId = execution.getVariable(Prefix + "tenantId") @@ -399,11 +399,16 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { String networkStackId = "" networkStackId = utils.getNodeText1(queryAAIResponse, "heat-stack-id") - if (networkStackId == 'null' || networkStackId == "") { + if (networkStackId == 'null' || networkStackId == "" || networkStackId == null) { networkStackId = "force_delete" } - String requestId = execution.getVariable(Prefix + "requestId") + String requestId = execution.getVariable("msoRequestId") + if (requestId != null) { + execution.setVariable("mso-request-id", requestId) + } else { + requestId = execution.getVariable("mso-request-id") + } String serviceInstanceId = execution.getVariable("serviceInstanceId") // Added new Elements @@ -411,6 +416,12 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { String notificationUrl = "" //TODO - is this coming from URN? What variable/value to use? //String notificationUrl = execution.getVariable("URN_?????") //TODO - is this coming from URN? What variable/value to use? + String modelCustomizationUuid = "" + if (utils.nodeExists(networkRequest, "networkModelInfo")) { + String networkModelInfo = utils.getNodeXml(networkRequest, "networkModelInfo", false).replace("tag0:","").replace(":tag0","") + modelCustomizationUuid = utils.getNodeText1(networkModelInfo, "modelCustomizationUuid") + } + String deleteNetworkRequest = """ <deleteNetworkRequest> <cloudSiteId>${cloudSiteId}</cloudSiteId> @@ -418,6 +429,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { <networkId>${networkId}</networkId> <networkStackId>${networkStackId}</networkStackId> <networkType>${networkType}</networkType> + <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid> <skipAAI>true</skipAAI> <msoRequest> <requestId>${requestId}</requestId> @@ -508,15 +520,16 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id") - // get/set 'msoRequestId' and 'mso-request-id' + // get/set 'msoRequestId' and 'mso-request-id'
String requestId = execution.getVariable("msoRequestId") if (requestId != null) { - execution.setVariable("mso-request-id", requestId) + execution.setVariable("mso-request-id", requestId)
} else { - requestId = execution.getVariable("mso-request-id") + requestId = execution.getVariable("mso-request-id")
} execution.setVariable(Prefix + "requestId", requestId) - +
+ utils.log("DEBUG", Prefix + "requestId " + requestId, isDebugEnabled) String queryAAIResponse = execution.getVariable(Prefix + "queryAAIResponse") SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() @@ -642,7 +655,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "rollbackNetworkRequest", "") } else { String rollbackNetwork = - """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network"> + """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network">
${rollbackData} </NetworkAdapter:rollbackNetwork>""" String rollbackNetworkXml = utils.formatXml(rollbackNetwork) @@ -847,8 +860,14 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { if (execution.getVariable(Prefix + "WorkflowException") != null) { WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException") exceptionMessage = pwfex.getErrorMessage() - } + } else { + if (execution.getVariable("WorkflowException") != null) { + WorkflowException pwfex = execution.getVariable("WorkflowException") + exceptionMessage = pwfex.getErrorMessage() + } + } } + // going to the Main flow: a-la-carte or macro utils.log("DEBUG", " ***** postProcessResponse(), BAD !!!", isDebugEnabled) exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) @@ -977,12 +996,12 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id") - // get/set 'msoRequestId' and 'mso-request-id' + // get/set 'msoRequestId' and 'mso-request-id'
String requestId = execution.getVariable("msoRequestId") if (requestId != null) { - execution.setVariable("mso-request-id", requestId) + execution.setVariable("mso-request-id", requestId)
} else { - requestId = execution.getVariable("mso-request-id") + requestId = execution.getVariable("mso-request-id")
} execution.setVariable(Prefix + "requestId", requestId) 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 index 5863fdcb65..58c6f68bb3 100644 --- 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 @@ -1,335 +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("&", "&").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("&", "&").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) - } - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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("&", "&").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("&", "&").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 index 83fcd33443..6daec69b9d 100644 --- 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 @@ -1,420 +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) - } -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 index dcb70ff712..cd9c798c09 100644 --- 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 @@ -40,7 +40,7 @@ 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 @@ -68,7 +68,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ 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 @@ -76,19 +76,19 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ 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") @@ -114,14 +114,14 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ //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") @@ -141,7 +141,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ 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") @@ -156,7 +156,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ 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> @@ -178,7 +178,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ // (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") @@ -305,7 +305,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ // 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 @@ -346,7 +346,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ throw new BpmnError("MSOWorkflowException") } } - + public void postProcessVNFAdapterRequest(Execution execution) { def method = getClass().getSimpleName() + '.postProcessVNFAdapterRequest(' + 'execution=' + execution.getId() + @@ -366,15 +366,15 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ 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) + DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); + docFactory.setNamespaceAware(true) + DocumentBuilder docBuilder = docFactory.newDocumentBuilder() + Document outputsXml = docBuilder.parse(source) NodeList entries = outputsXml.getElementsByTagNameNS("*", "entry") List contrailNetworkPolicyFqdnList = [] @@ -398,7 +398,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ logDebug("Obtained oamManagementV6Address: " + oamManagementV6Address, isDebugLogEnabled) execution.setVariable(Prefix + "oamManagementV6Address", oamManagementV6Address) } - + } } if (!contrailNetworkPolicyFqdnList.isEmpty()) { @@ -423,7 +423,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ } logDebug(" *** COMPLETED postProcessVnfAdapterResponse Process*** ", isDebugLogEnabled) } - + public void deleteNetworkPoliciesFromAAI(Execution execution) { def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' + 'execution=' + execution.getId() + @@ -432,7 +432,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ logDebug('Entered ' + method, isDebugLogEnabled) execution.setVariable("prefix", Prefix) logDebug(" ======== STARTED deleteNetworkPoliciesFromAAI ======== ", isDebugLogEnabled) - + try { // get variables List fqdnList = execution.getVariable("DoDVfMod_contrailNetworkPolicyFqdnList") @@ -441,34 +441,34 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ 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 @@ -478,28 +478,28 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ // 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") + + + 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 @@ -525,28 +525,28 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ } } - - - + + + } // 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. * @@ -558,23 +558,23 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ ')' 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> @@ -586,14 +586,18 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{ 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()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage()) } } -} + + + + +}
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy index fe98b709a5..66a3fed6a5 100644 --- 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 @@ -1,136 +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) - } - - - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+import org.xml.sax.InputSource
+
+
+/**
+ * This class supports the DoDeleteVnf subFlow
+ * with the Deletion of a generic vnf for
+ * infrastructure.
+ *
+ */
+class DoDeleteVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="DoDVNF_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoDeleteVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("DoDVNF_SuccessIndicator", false)
+ execution.setVariable("DoDVNF_vnfInUse", false)
+
+ try{
+ // Get Variables
+
+ String vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DoDVNF_vnfId", vnfId)
+ utils.log("DEBUG", "Incoming Vnf(Instance) Id is: " + vnfId, isDebugEnabled)
+
+ // Setting for sub flow calls
+ execution.setVariable("DoDVNF_type", "generic-vnf")
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoDeleteVnf PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoDeleteVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void processGetVnfResponse(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoDeleteVnf processGetVnfResponse Process *** ", isDebugEnabled)
+ try {
+ String vnf = execution.getVariable("DoDVNF_genericVnf")
+ String resourceVersion = utils.getNodeText1(vnf, "resource-version")
+ execution.setVariable("DoDVNF_resourceVersion", resourceVersion)
+
+ if(utils.nodeExists(vnf, "relationship")){
+ InputSource source = new InputSource(new StringReader(vnf));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document vnfXml = docBuilder.parse(source)
+
+ NodeList nodeList = vnfXml.getElementsByTagName("relationship")
+ for (int x = 0; x < nodeList.getLength(); x++) {
+ Node node = nodeList.item(x)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ def e = eElement.getElementsByTagName("related-to").item(0).getTextContent()
+ if(e.equals("volume-group") || e.equals("l3-network")){
+ utils.log("DEBUG", "Generic Vnf still has relationship to OpenStack.", isDebugEnabled)
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ }else{
+ utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
+ }
+ }
+ }
+ }
+
+ if(utils.nodeExists(vnf, "vf-module")){
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ utils.log("DEBUG", "Generic Vnf still has vf-modules.", isDebugEnabled)
+ }
+
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoDeleteVnf processGetVnfResponse Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf processGetVnfResponse Process")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoDeleteVnf processGetVnfResponse Process ***", isDebugEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy new file mode 100644 index 0000000000..92456b0216 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy @@ -0,0 +1,256 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.UUID;
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+/**
+ * This class supports the macro VID Flow
+ * with the deletion of a generic vnf and related VF modules.
+ */
+class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
+
+ String Prefix="DDVAM_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoDeleteVnfAndModules PreProcessRequest Process*** ", isDebugEnabled)
+
+ try{
+ // Get Variables
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("mso-request-id", requestId)
+ utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfId = execution.getVariable("vnfId")
+ utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
+
+ String source = "VID"
+ execution.setVariable("source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ execution.setVariable("DDVAM_moduleCount", 0)
+ execution.setVariable("DDVAM_nextModule", 0)
+
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnfAndModules PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnfAndModules PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+
+ public void preProcessAddOnModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessAddOnModule ======== ", isDebugLogEnabled)
+
+ try {
+ JSONArray addOnModules = (JSONArray) execution.getVariable("addOnModules")
+ int addOnIndex = (int) execution.getVariable("addOnModulesDeployed")
+
+ JSONObject addOnModule = addOnModules[addOnIndex]
+
+ def newVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("addOnVfModuleId", newVfModuleId)
+
+ execution.setVariable("instancesOfThisModelDeployed", 0)
+
+ JSONObject addOnVfModuleModelInfoObject = jsonUtil.getJsonValueForKey(addOnModule, "modelInfo")
+ String addOnVfModuleModelInfo = addOnVfModuleModelInfoObject.toString()
+ execution.setVariable("addOnVfModuleModelInfo", addOnVfModuleModelInfo)
+ String addOnVfModuleLabel = jsonUtil.getJsonValueForKey(addOnModule, "vfModuleLabel")
+ execution.setVariable("addOnVfModuleLabel", addOnVfModuleLabel)
+ String addOnPersonaModelId = jsonUtil.getJsonValueForKey(addOnVfModuleModelInfoObject, "modelInvariantId")
+ execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
+ String addOnInitialCount = jsonUtil.getJsonValueForKey(addOnModule, "initialCount")
+ execution.setVariable("initialCount", addOnInitialCount)
+
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+ * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIVfModule(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def method = getClass().getSimpleName() + '.queryAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DvnfId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+ String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ utils.logAudit("AAI endPoint: " + endPoint)
+
+ try {
+ RESTConfig config = new RESTConfig(endPoint);
+ def responseData = ''
+ def aaiRequestId = UUID.randomUUID().toString()
+ RESTClient client = new RESTClient(config).
+ addHeader('X-TransactionId', aaiRequestId).
+ addHeader('X-FromAppId', 'MSO').
+ addHeader('Content-Type', 'application/xml').
+ addHeader('Accept','application/xml');
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ APIResponse response = client.httpGet()
+ utils.logAudit("createVfModule - invoking httpGet() to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+ }
+
+ utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
+ utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DCVFM_queryAAIVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ //Map<String, String>[] vfModules = new HashMap<String,String>[]
+ List<Map<String,String>> vfModulesList = new ArrayList<Map<String,String>>();
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled)
+ if (responseData != null) {
+ def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ execution.setVariable("DDVAM_moduleCount", vfModules.size())
+ int vfModulesSize = 0
+ for (i in 0..vfModules.size()-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+
+ Map<String, String> vfModuleEntry = new HashMap<String, String>()
+ def vfModuleId = utils.getNodeText1(vfModuleXml, "vf-module-id")
+ vfModuleEntry.put("vfModuleId", vfModuleName)
+ def vfModuleName = utils.getNodeText1(vfModuleXml, "vf-module-name")
+ vfModuleEntry.put("vfModuleName", vfModuleName)
+ vfModulesList.add(vfModuleEntry)
+ }
+
+ }
+ }
+ execution.setVariable("DDVAM_vfModules", vfModules)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ public void prepareNextModuleToDelete(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED prepareNextModuleToDelete ======== ", isDebugLogEnabled)
+
+ try {
+ int i = execution.getVariable("DDVAM_nextModule")
+ def vfModules = execution.getVariable("DDVAM_vfModules")
+ def vfModule = vfModules[i]
+
+ def vfModuleId = vfModule.get("vfModuleId")
+ execution.setVariable("DDVAM_vfModuleId", vfModuleId)
+
+ def vfModuleName = vfModule.get("vfModuleName")
+ execution.setVariable("DDVAM_vfModuleName", vfModuleName)
+
+
+ // HARDCODED FOR NOW
+ def vfModuleModelInfo = ""
+ execution.setVariable("DDVAM_vfModuleModelInfo", vfModuleModelInfo)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy new file mode 100644 index 0000000000..dd35334ddf --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy @@ -0,0 +1,1399 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.openecomp.mso.bpmn.infrastructure.scripts; + +import groovy.xml.XmlUtil +import groovy.json.* +import org.openecomp.mso.bpmn.common.scripts.AaiUtil +import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil +import org.openecomp.mso.bpmn.common.scripts.NetworkUtils +import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils +import org.openecomp.mso.bpmn.common.scripts.VidUtils +import org.openecomp.mso.bpmn.core.WorkflowException +import org.openecomp.mso.bpmn.core.json.JsonUtils +import org.openecomp.mso.rest.APIResponse + +import java.util.UUID; + +import org.camunda.bpm.engine.delegate.BpmnError +import org.camunda.bpm.engine.runtime.Execution +import org.apache.commons.lang3.* +import org.apache.commons.codec.binary.Base64; +import org.springframework.web.util.UriUtils + +/** + * This groovy class supports the <class>DoUpdateNetworkInstance.bpmn</class> process. + * + */ +public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { + String Prefix="UPDNETI_" + ExceptionUtil exceptionUtil = new ExceptionUtil() + JsonUtils jsonUtil = new JsonUtils() + VidUtils vidUtils = new VidUtils(this) + NetworkUtils networkUtils = new NetworkUtils() + SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + /** + * This method is executed during the preProcessRequest task of the <class>DoUpdateNetworkInstance.bpmn</class> process. + * @param execution + */ + public InitializeProcessVariables(Execution execution){ + /* Initialize all the process variables in this block */ + + execution.setVariable(Prefix + "messageId", "") + execution.setVariable("BasicAuthHeaderValuePO", "") + execution.setVariable("BasicAuthHeaderValueSDNC", "") + execution.setVariable(Prefix + "networkRequest", "") + execution.setVariable(Prefix + "networkInputs", "") + execution.setVariable(Prefix + "networkOutputs", "") + execution.setVariable(Prefix + "requestId", "") + execution.setVariable(Prefix + "source", "") + execution.setVariable(Prefix + "networkId", "") + + execution.setVariable(Prefix + "isPONR", false) // Point-of-no-return, means, rollback is not needed + + // AAI query Cloud Region + execution.setVariable(Prefix + "queryCloudRegionRequest","") + execution.setVariable(Prefix + "queryCloudRegionReturnCode","") + execution.setVariable(Prefix + "queryCloudRegionResponse","") + execution.setVariable(Prefix + "cloudRegionPo","") + execution.setVariable(Prefix + "cloudRegionSdnc","") + execution.setVariable(Prefix + "isCloudRegionGood", false) + + // AAI query Id + execution.setVariable(Prefix + "queryIdAAIRequest","") + execution.setVariable(Prefix + "queryIdAAIResponse", "") + execution.setVariable(Prefix + "aaiIdReturnCode", "") + + // AAI query vpn binding + execution.setVariable(Prefix + "queryVpnBindingAAIRequest","") + execution.setVariable(Prefix + "queryVpnBindingAAIResponse", "") + execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "") + execution.setVariable(Prefix + "vpnBindings", null) + execution.setVariable(Prefix + "vpnCount", 0) + execution.setVariable(Prefix + "routeCollection", "") + + // AAI query network policy + execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest","") + execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", "") + execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "") + execution.setVariable(Prefix + "networkPolicyUriList", null) + execution.setVariable(Prefix + "networkPolicyCount", 0) + execution.setVariable(Prefix + "networkCollection", "") + + // AAI query route table reference + execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest","") + execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", "") + execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "") + execution.setVariable(Prefix + "networkTableRefUriList", null) + execution.setVariable(Prefix + "networkTableRefCount", 0) + execution.setVariable(Prefix + "tableRefCollection", "") + + // AAI requery Id + execution.setVariable(Prefix + "requeryIdAAIRequest","") + execution.setVariable(Prefix + "requeryIdAAIResponse", "") + execution.setVariable(Prefix + "aaiRequeryIdReturnCode", "") + + // AAI update contrail + execution.setVariable(Prefix + "updateContrailAAIUrlRequest","") + execution.setVariable(Prefix + "updateContrailAAIPayloadRequest","") + execution.setVariable(Prefix + "updateContrailAAIResponse", "") + execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", "") + + execution.setVariable(Prefix + "updateNetworkRequest", "") + execution.setVariable(Prefix + "updateNetworkResponse", "") + execution.setVariable(Prefix + "rollbackNetworkRequest", "") + execution.setVariable(Prefix + "networkReturnCode", "") + execution.setVariable(Prefix + "isNetworkRollbackNeeded", false) + + execution.setVariable(Prefix + "changeAssignSDNCRequest", "") + execution.setVariable(Prefix + "changeAssignSDNCResponse", "") + execution.setVariable(Prefix + "rollbackSDNCRequest", "") + execution.setVariable(Prefix + "sdncReturnCode", "") + execution.setVariable(Prefix + "isSdncRollbackNeeded", false) + execution.setVariable(Prefix + "sdncResponseSuccess", false) + + execution.setVariable(Prefix + "isVnfBindingPresent", false) + execution.setVariable(Prefix + "Success", false) + execution.setVariable(Prefix + "serviceInstanceId", "") + + execution.setVariable(Prefix + "isException", false) + + } + + // ************************************************** + // Pre or Prepare Request Section + // ************************************************** + /** + * This method is executed during the preProcessRequest task of the <class>DoUpdateNetworkInstance.bpmn</class> process. + * @param execution + */ + public void preProcessRequest (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside preProcessRequest DoUpdateNetworkInstance Request ***** ", isDebugEnabled) + + try { + // initialize flow variables + InitializeProcessVariables(execution) + + // GET Incoming request & validate 3 kinds of format. + execution.setVariable("action", "UPDATE") + String networkRequest = execution.getVariable("bpmnRequest") + if (networkRequest != null) { + if (networkRequest.contains("requestDetails")) { + // JSON format request is sent, create xml + try { + def prettyJson = JsonOutput.prettyPrint(networkRequest.toString()) + utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled) + networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, networkRequest) + + } catch (Exception ex) { + String dataErrorMessage = " Invalid json format Request - " + ex.getMessage() + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + } + } else { + // XML format request is sent + + } + } else { + // vIPR format request is sent, create xml from individual variables + networkRequest = vidUtils.createXmlNetworkRequestInstance(execution) + } + + networkRequest = utils.formatXml(networkRequest) + utils.logAudit(networkRequest) + execution.setVariable(Prefix + "networkRequest", networkRequest) + utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled) + + // validate 'disableRollback' (aka, 'suppressRollback') + boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest) + execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled) + utils.log("DEBUG", Prefix + "rollbackEnabled - " + rollbackEnabled, isDebugEnabled) + + String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","") + execution.setVariable(Prefix + "networkInputs", networkInputs) + utils.log("DEBUG", Prefix + "networkInputs - " + '\n' + networkInputs, isDebugEnabled) + + // prepare messageId + String messageId = execution.getVariable(Prefix + "messageId") // for testing + if (messageId == null || messageId == "") { + messageId = UUID.randomUUID() + utils.log("DEBUG", " UPDNETI_messageId, random generated: " + messageId, isDebugEnabled) + } else { + utils.log("DEBUG", " UPDNETI_messageId, pre-assigned: " + messageId, isDebugEnabled) + } + execution.setVariable(Prefix + "messageId", messageId) + + String source = utils.getNodeText1(networkRequest, "source") + execution.setVariable(Prefix + "source", source) + utils.log("DEBUG", Prefix + "source - " + source, isDebugEnabled) + + String networkId = "" + if (utils.nodeExists(networkRequest, "network-id")) { + networkId = utils.getNodeText1(networkRequest, "network-id") + if (networkId == 'null' || networkId == "") { + sendSyncError(execution) + // missing value of networkId + String dataErrorMessage = "Variable 'network-id' value/element is missing." + utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } + } + + String lcpCloudRegion = "" + if (utils.nodeExists(networkRequest, "aic-cloud-region")) { + lcpCloudRegion = utils.getNodeText1(networkRequest, "aic-cloud-region") + if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) { + sendSyncError(execution) + String dataErrorMessage = "requestDetails has missing 'aic-cloud-region' value/element." + utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + } + } + + String serviceInstanceId = "" + if (utils.nodeExists(networkRequest, "service-instance-id")) { + serviceInstanceId = utils.getNodeText1(networkRequest, "service-instance-id") + if ((serviceInstanceId == 'null') || (lcpCloudRegion == "")) { + sendSyncError(execution) + String dataErrorMessage = "Variable 'serviceInstanceId' value/element is missing." + utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + } + } + + // PO Authorization Info / headers Authorization= + String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth") + utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled) + try { + def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey")) + execution.setVariable("BasicAuthHeaderValuePO",encodedString) + execution.setVariable("BasicAuthHeaderValueSDNC", encodedString) + + } catch (IOException ex) { + String exceptionMessage = "Exception Encountered in DoUpdateNetworkInstance, PreProcessRequest() - " + String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage() + utils.log("DEBUG", dataErrorMessage, , isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + } + + // Set variables for Generic Get Sub Flow use + execution.setVariable(Prefix + "serviceInstanceId", serviceInstanceId) + utils.log("DEBUG", Prefix + "serviceInstanceId - " + serviceInstanceId, isDebugEnabled) + + execution.setVariable("GENGS_type", "service-instance") + utils.log("DEBUG", "GENGS_type - " + "service-instance", isDebugEnabled) + utils.log("DEBUG", " Url for SDNC adapter: " + execution.getVariable("URN_mso_adapters_sdnc_endpoint"), isDebugEnabled) + + String sdncVersion = execution.getVariable("sdncVersion") + utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled) + + // build 'networkOutputs' + networkId = utils.getNodeText1(networkRequest, "network-id") + if ((networkId == null) || (networkId == "null")) { + networkId = "" + } + String networkName = utils.getNodeText1(networkRequest, "network-name") + if ((networkName == null) || (networkName == "null")) { + networkName = "" + } + String networkOutputs = + """<network-outputs> + <network-id>${networkId}</network-id> + <network-name>${networkName}</network-name> + </network-outputs>""" + execution.setVariable(Prefix + "networkOutputs", networkOutputs) + utils.log("DEBUG", Prefix + "networkOutputs - " + '\n' + networkOutputs, isDebugEnabled) + execution.setVariable(Prefix + "networkId", networkId) + execution.setVariable(Prefix + "networkName", networkName) + + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex){ + sendSyncError(execution) + // caught exception + String exceptionMessage = "Exception Encountered in DoUpdateNetworkInstance, PreProcessRequest() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + } + + public void callRESTQueryAAICloudRegion (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of DoUpdateNetworkInstance ***** " , isDebugEnabled) + + try { + String networkInputs = execution.getVariable(Prefix + "networkInputs") + String cloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region") + cloudRegion = UriUtils.encode(cloudRegion,"UTF-8") + + // Prepare AA&I url + String aai_endpoint = execution.getVariable("URN_aai_endpoint") + AaiUtil aaiUtil = new AaiUtil(this) + String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution) + String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion + utils.logAudit(queryCloudRegionRequest) + execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest) + utils.log("DEBUG", " UPDNETI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled) + + String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion) + String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion) + + if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) { + execution.setVariable(Prefix + "cloudRegionPo", cloudRegionPo) + execution.setVariable(Prefix + "cloudRegionSdnc", cloudRegionSdnc) + execution.setVariable(Prefix + "isCloudRegionGood", true) + + } else { + String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable(Prefix + "queryCloudRegionReturnCode") + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } + + utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable(Prefix + "isCloudRegionGood"), isDebugEnabled) + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + // try error + String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow - callRESTQueryAAICloudRegion() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void callRESTQueryAAINetworkId(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkId of DoUpdateNetworkInstance ***** " , isDebugEnabled) + + try { + // get variables + String networkRequest = execution.getVariable(Prefix + "networkRequest") + String networkId = utils.getNodeText1(networkRequest, "network-id") + networkId = UriUtils.encode(networkId,"UTF-8") + execution.setVariable(Prefix + "networkId", networkId) + String messageId = execution.getVariable(Prefix + "messageId") + + // Prepare AA&I url + String aai_endpoint = execution.getVariable("URN_aai_endpoint") + AaiUtil aaiUriUtil = new AaiUtil(this) + String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) + String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1" + utils.logAudit(queryIdAAIRequest) + execution.setVariable(Prefix + "queryIdAAIRequest", queryIdAAIRequest) + utils.log("DEBUG", Prefix + "queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled) + + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryIdAAIRequest) + String returnCode = response.getStatusCode() + execution.setVariable(Prefix + "aaiIdReturnCode", returnCode) + utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled) + + String aaiResponseAsString = response.getResponseBodyAsString() + + if (returnCode=='200') { + utils.logAudit(aaiResponseAsString) + execution.setVariable(Prefix + "queryIdAAIResponse", aaiResponseAsString) + utils.log("DEBUG", " QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled) + + } else { + if (returnCode=='404') { + String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)." + utils.log("DEBUG", " AAI Query Failed. " + dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } else { + if (aaiResponseAsString.contains("RESTFault")) { + WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) + execution.setVariable("WorkflowException", exceptionObject) + throw new BpmnError("MSOWorkflowException") + + } else { + // aai all errors + String dataErrorMessage = "Unexpected Response from QueryAAINetworkId - " + returnCode + utils.log("DEBUG", "Unexpected Response from QueryAAINetworkId - " + dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } + } + } + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkId() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void callRESTReQueryAAINetworkId(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside callRESTReQueryAAINetworkId of DoUpdateNetworkInstance ***** " , isDebugEnabled) + + try { + // get variables + String networkRequest = execution.getVariable(Prefix + "networkRequest") + String networkId = utils.getNodeText1(networkRequest, "network-id") + networkId = UriUtils.encode(networkId,"UTF-8") + String messageId = execution.getVariable(Prefix + "messageId") + + // Prepare AA&I url + String aai_endpoint = execution.getVariable("URN_aai_endpoint") + AaiUtil aaiUriUtil = new AaiUtil(this) + String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) + String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1" + utils.logAudit(requeryIdAAIRequest) + execution.setVariable(Prefix + "requeryIdAAIRequest", requeryIdAAIRequest) + utils.log("DEBUG", " UPDNETI_requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled) + + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, requeryIdAAIRequest) + String returnCode = response.getStatusCode() + execution.setVariable(Prefix + "aaiRequeryIdReturnCode", returnCode) + utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled) + + String aaiResponseAsString = response.getResponseBodyAsString() + + if (returnCode=='200') { + utils.logAudit(aaiResponseAsString) + execution.setVariable(Prefix + "requeryIdAAIResponse", aaiResponseAsString) + utils.log("DEBUG", " ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled) + + String netId = utils.getNodeText1(aaiResponseAsString, "network-id") + String netName = utils.getNodeText1(aaiResponseAsString, "network-name") + String networkOutputs = + """<network-outputs> + <network-id>${netId}</network-id> + <network-name>${netName}</network-name> + </network-outputs>""" + execution.setVariable(Prefix + "networkOutputs", networkOutputs) + utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled) + + } else { + if (returnCode=='404') { + String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)." + utils.log("DEBUG", " AAI ReQuery Failed. - " + dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } else { + if (aaiResponseAsString.contains("RESTFault")) { + WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) + execution.setVariable("WorkflowException", exceptionObject) + throw new BpmnError("MSOWorkflowException") + + } else { + // aai all errors + String dataErrorMessage = "Unexpected Response from ReQueryAAINetworkId - " + returnCode + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } + } + } + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTReQueryAAINetworkId() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void callRESTQueryAAINetworkVpnBinding(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkVpnBinding of DoUpdateNetworkInstance ***** " , isDebugEnabled) + + try { + + // get variables + String messageId = execution.getVariable(Prefix + "messageId") + String queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") + String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") + utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) + + // Check if Vnf Binding is present, then build a List of vnfBinding + List vpnBindingUri = networkUtils.getVnfBindingObject(relationship) + int vpnCount = vpnBindingUri.size() + execution.setVariable(Prefix + "vpnCount", vpnCount) + utils.log("DEBUG", " UPDNETI_vpnCount - " + vpnCount, isDebugEnabled) + + String aai_endpoint = execution.getVariable("URN_aai_endpoint") + AaiUtil aaiUriUtil = new AaiUtil(this) + + if (vpnCount > 0) { + execution.setVariable(Prefix + "vpnBindings", vpnBindingUri) + utils.log("DEBUG", " vpnBindingUri List - " + vpnBindingUri, isDebugEnabled) + + String routeTargets = "" + // AII loop call using list vpnBindings + for (i in 0..vpnBindingUri.size()-1) { + + int counting = i+1 + + // prepare url using vpnBinding + String queryVpnBindingAAIRequest = "" + String aai_uri = aaiUriUtil.getNetworkVpnBindingUri(execution) + + // Note: By default, the vpnBinding url is found in 'related-link' of the response, + // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping. + if (aai_uri == null || aai_uri == "") { + // using value of 'related-link' from response + if (vpnBindingUri[i].charAt(vpnBindingUri[i].length()-1) == '/') { + queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i].substring(0, vpnBindingUri[i].length()-1) + } else { + queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i] + } + + } else { + // using uri value in URN mapping + String vpnBindingId = vpnBindingUri[i].substring(vpnBindingUri[i].indexOf("/vpn-binding/")+13, vpnBindingUri[i].length()) + if (vpnBindingId.charAt(vpnBindingId.length()-1) == '/') { + vpnBindingId = vpnBindingId.substring(0, vpnBindingId.length()-1) + } + queryVpnBindingAAIRequest = "${aai_endpoint}${aai_uri}/" + vpnBindingId + } + + utils.logAudit(queryVpnBindingAAIRequest) + execution.setVariable(Prefix + "queryVpnBindingAAIRequest", queryVpnBindingAAIRequest) + utils.log("DEBUG", " UPDNETI_queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled) + + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryVpnBindingAAIRequest) + String returnCode = response.getStatusCode() + execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", returnCode) + utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled) + + String aaiResponseAsString = response.getResponseBodyAsString() + + if (returnCode=='200') { + utils.logAudit(aaiResponseAsString) + execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiResponseAsString) + utils.log("DEBUG", " AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled) + + String routeTarget = "" + if (utils.nodeExists(aaiResponseAsString, "global-route-target")) { + routeTarget = utils.getNodeText1(aaiResponseAsString, "global-route-target") + routeTargets += "<routeTargets>" + routeTarget + "</routeTargets>" + '\n' + } + + } else { + if (returnCode=='404') { + String dataErrorMessage = "Response Error from AAINetworkVpnBinding is 404 (Not Found)." + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } else { + if (aaiResponseAsString.contains("RESTFault")) { + WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) + execution.setVariable("WorkflowException", exceptionObject) + throw new BpmnError("MSOWorkflowException") + + } else { + // aai all errors + String dataErrorMessage = " Unexpected Response from AAINetworkVpnBinding - " + returnCode + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } + } + } + + } // end loop + + execution.setVariable(Prefix + "routeCollection", routeTargets) + utils.log("DEBUG", " UPDNETI_routeCollection - " + '\n' + routeTargets, isDebugEnabled) + + } else { + // reset return code to success + execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200") + String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String aaiStubResponse = + """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> + <vpn-binding xmlns="${schemaVersion}"> + <global-route-target/> + </vpn-binding> + </rest:payload>""" + String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse) + execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiStubResponseAsXml) + execution.setVariable(Prefix + "routeCollection", "<routeTargets/>") + utils.log("DEBUG", " No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled) + + } + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void callRESTQueryAAINetworkPolicy(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkPolicy of DoUpdateNetworkInstance ***** " , isDebugEnabled) + + try { + // get variables + String messageId = execution.getVariable(Prefix + "messageId") + String queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") + String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") + utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) + + // Check if Network Policy is present, then build a List of network policy + List networkPolicyUriList = networkUtils.getNetworkPolicyObject(relationship) + int networkPolicyCount = networkPolicyUriList.size() + execution.setVariable(Prefix + "networkPolicyCount", networkPolicyCount) + utils.log("DEBUG", " UPDNETI_networkPolicyCount - " + networkPolicyCount, isDebugEnabled) + + String aai_endpoint = execution.getVariable("URN_aai_endpoint") + AaiUtil aaiUriUtil = new AaiUtil(this) + + if (networkPolicyCount > 0) { + execution.setVariable(Prefix + "networkPolicyUriList", networkPolicyUriList) + utils.log("DEBUG", " networkPolicyUri List - " + networkPolicyUriList, isDebugEnabled) + + String networkPolicies = "" + // AII loop call using list vpnBindings + for (i in 0..networkPolicyUriList.size()-1) { + + int counting = i+1 + + // prepare url using vpnBinding + String queryNetworkPolicyAAIRequest = "" + + String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution) + + // Note: By default, the network policy url is found in 'related-link' of the response, + // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping. + if (aai_uri == null || aai_uri == "") { + // using value of 'related-link' from response + if (networkPolicyUriList[i].charAt(networkPolicyUriList[i].length()-1) == '/') { + queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i].substring(0, networkPolicyUriList[i].length()-1) + } else { + queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i] + } + } else { + // using uri value in URN mapping + String networkPolicyId = networkPolicyUriList[i].substring(networkPolicyUriList[i].indexOf("/network-policy/")+16, networkPolicyUriList[i].length()) + println " networkPolicyId - " + networkPolicyId + if (networkPolicyId.charAt(networkPolicyId.length()-1) == '/') { + networkPolicyId = networkPolicyId.substring(0, networkPolicyId.length()-1) + } + queryNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + networkPolicyId + + } + + + utils.logAudit(queryNetworkPolicyAAIRequest) + execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest) + utils.log("DEBUG", " UPDNETI_queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled) + + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyAAIRequest) + String returnCode = response.getStatusCode() + execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", returnCode) + utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled) + + String aaiResponseAsString = response.getResponseBodyAsString() + + if (returnCode=='200') { + utils.logAudit(aaiResponseAsString) + execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiResponseAsString) + utils.log("DEBUG", " QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled) + + String networkPolicy = "" + if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) { + networkPolicy = utils.getNodeText1(aaiResponseAsString, "network-policy-fqdn") + networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n' + } + + } else { + if (returnCode=='404') { + String dataErrorMessage = "Response Error from QueryAAINetworkPolicy is 404 (Not Found)." + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } else { + if (aaiResponseAsString.contains("RESTFault")) { + WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) + execution.setVariable("WorkflowException", exceptionObject) + throw new BpmnError("MSOWorkflowException") + + } else { + // aai all errors + String dataErrorMessage = "Unexpected Response from QueryAAINetworkPolicy - " + returnCode + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } + } + } + + } // end loop + + execution.setVariable(Prefix + "networkCollection", networkPolicies) + utils.log("DEBUG", " UPDNETI_networkCollection - " + '\n' + networkPolicies, isDebugEnabled) + + } else { + // reset return code to success + execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200") + String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String aaiStubResponse = + """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> + <network-policy xmlns="${schemaVersion}"> + <network-policy-fqdn/> + </network-policy> + </rest:payload>""" + String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse) + execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiStubResponseAsXml) + execution.setVariable(Prefix + "networkCollection", "<policyFqdns/>") + utils.log("DEBUG", " No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled) + + } + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void callRESTQueryAAINetworkTableRef(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkTableRef of DoUpdateNetworkInstance ***** " , isDebugEnabled) + + try { + // get variables + String messageId = execution.getVariable(Prefix + "messageId") + String queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") + String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") + utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) + + // Check if Network TableREf is present, then build a List of network policy + List networkTableRefUriList = networkUtils.getNetworkTableRefObject(relationship) + int networkTableRefCount = networkTableRefUriList.size() + execution.setVariable(Prefix + "networkTableRefCount", networkTableRefCount) + utils.log("DEBUG", " UPDNETI_networkTableRefCount - " + networkTableRefCount, isDebugEnabled) + + String aai_endpoint = execution.getVariable("URN_aai_endpoint") + AaiUtil aaiUriUtil = new AaiUtil(this) + + if (networkTableRefCount > 0) { + execution.setVariable(Prefix + "networkTableRefUriList", networkTableRefUriList) + utils.log("DEBUG", " networkTableRefUri List - " + networkTableRefUriList, isDebugEnabled) + + // AII loop call using list vpnBindings + String networkTableRefs = "" + for (i in 0..networkTableRefUriList.size()-1) { + + int counting = i+1 + + // prepare url using tableRef + String queryNetworkTableRefAAIRequest = "" + + String aai_uri = aaiUriUtil.getNetworkTableReferencesUri(execution) + + // Note: By default, the network policy url is found in 'related-link' of the response, + // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping. + if (aai_uri == null || aai_uri == "") { + // using value of 'related-link' from response + if (networkTableRefUriList[i].charAt(networkTableRefUriList[i].length()-1) == '/') { + queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i].substring(0, networkTableRefUriList[i].length()-1) + } else { + queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i] + } + } else { + // using uri value in URN mapping + String networkTableRefId = networkTableRefUriList[i].substring(networkTableRefUriList[i].indexOf("/route-table-reference/")+23, networkTableRefUriList[i].length()) + + if (networkTableRefId.charAt(networkTableRefId.length()-1) == '/') { + networkTableRefId = networkTableRefId.substring(0, networkTableRefId.length()-1) + } + queryNetworkTableRefAAIRequest = "${aai_endpoint}${aai_uri}/" + networkTableRefId + + } + + + utils.logAudit(queryNetworkTableRefAAIRequest) + execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest) + utils.log("DEBUG", " UPDNETI_queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled) + + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkTableRefAAIRequest) + String returnCode = response.getStatusCode() + execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", returnCode) + utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled) + + String aaiResponseAsString = response.getResponseBodyAsString() + + if (returnCode=='200') { + utils.logAudit(aaiResponseAsString) + execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiResponseAsString) + utils.log("DEBUG", " QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled) + + String networkTableRef = "" + if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) { + networkTableRef = utils.getNodeText1(aaiResponseAsString, "route-table-reference-fqdn") + networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n' + } + + } else { + if (returnCode=='404') { + String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)." + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } else { + if (aaiResponseAsString.contains("RESTFault")) { + WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) + execution.setVariable("WorkflowException", exceptionObject) + throw new BpmnError("MSOWorkflowException") + + } else { + // aai all errors + String dataErrorMessage = "Unexpected Response from QueryAAINetworkTableRef - " + returnCode + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } + } + } + + } // end loop + + execution.setVariable(Prefix + "tableRefCollection", networkTableRefs) + utils.log("DEBUG", " UPDNETI_tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled) + + } else { + // reset return code to success + execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200") + String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String aaiStubResponse = + """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> + <route-table-references xmlns="${schemaVersion}"> + <route-table-reference-fqdn/> + </route-table-references> + </rest:payload>""" + String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse) + execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiStubResponseAsXml) + execution.setVariable(Prefix + "tableRefCollection", "<routeTableFqdns/>") + utils.log("DEBUG", " No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled) + + } + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void callRESTUpdateContrailAAINetwork(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside callRESTUpdateContrailAAINetwork of DoUpdateNetworkInstance ***** " , isDebugEnabled) + + try { + // get variables + String networkRequest = execution.getVariable(Prefix + "networkRequest") + String networkId = utils.getNodeText1(networkRequest, "network-id") + networkId = UriUtils.encode(networkId,"UTF-8") + String requeryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse") + String updateNetworkResponse = execution.getVariable(Prefix + "updateNetworkResponse") + String messageId = execution.getVariable(Prefix + "messageId") + + // Prepare url + String aai_endpoint = execution.getVariable("URN_aai_endpoint") + AaiUtil aaiUriUtil = new AaiUtil(this) + String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) + String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1" + + utils.logAudit(updateContrailAAIUrlRequest) + execution.setVariable(Prefix + "updateContrailAAIUrlRequest", updateContrailAAIUrlRequest) + utils.log("DEBUG", " UPDNETI_updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled) + + //Prepare payload (PUT) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, updateNetworkResponse, schemaVersion) + String payloadXml = utils.formatXml(payload) + utils.logAudit(payloadXml) + execution.setVariable(Prefix + "updateContrailAAIPayloadRequest", payloadXml) + utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled) + + APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payload) + String returnCode = response.getStatusCode() + String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString() + + execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode) + utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled) + + + if (returnCode=='200') { + utils.logAudit(aaiUpdateContrailResponseAsString) + execution.setVariable(Prefix + "updateContrailAAIResponse", aaiUpdateContrailResponseAsString) + utils.log("DEBUG", " AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString, isDebugEnabled) + // Point-of-no-return is set to false, rollback not needed. + execution.setVariable(Prefix + "isPONR", true) + + } else { + if (returnCode=='404') { + String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)." + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } else { + if (aaiUpdateContrailResponseAsString.contains("RESTFault")) { + WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiUpdateContrailResponseAsString, execution) + execution.setVariable("WorkflowException", exceptionObject) + throw new BpmnError("MSOWorkflowException") + + } else { + // aai all errors + String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode + utils.log("DEBUG", errorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage) + } + } + } + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void prepareUpdateNetworkRequest (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside prepareUpdateNetworkRequest of DoUpdateNetworkInstance ***** ", isDebugEnabled) + + try { + + // get variables + String requestId = execution.getVariable(Prefix + "requestId") + String messageId = execution.getVariable(Prefix + "messageId") + String source = execution.getVariable(Prefix + "source") + + String requestInput = execution.getVariable(Prefix + "networkRequest") + String queryIdResponse = execution.getVariable(Prefix + "requeryIdAAIResponse") + String cloudRegionId = execution.getVariable(Prefix + "cloudRegionPo") + String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled") + + // Prepare Network request + String routeCollection = execution.getVariable(Prefix + "routeCollection") + String policyCollection = execution.getVariable(Prefix + "networkCollection") + String tableCollection = execution.getVariable(Prefix + "tableRefCollection") + String updateNetworkRequest = networkUtils.UpdateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyCollection, tableCollection, cloudRegionId, backoutOnFailure, source ) + // Format Response + String buildUpdateNetworkRequestAsString = utils.formatXml(updateNetworkRequest) + buildUpdateNetworkRequestAsString = buildUpdateNetworkRequestAsString.replace(":w1aac13n0", "").replace("w1aac13n0:", "") + utils.logAudit(buildUpdateNetworkRequestAsString) + + execution.setVariable(Prefix + "updateNetworkRequest", buildUpdateNetworkRequestAsString) + utils.log("DEBUG", " UPDNETI_updateNetworkRequest - " + "\n" + buildUpdateNetworkRequestAsString, isDebugEnabled) + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareUpdateNetworkRequest() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void prepareSDNCRequest (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside prepareSDNCRequest of DoUpdateNetworkInstance ***** ", isDebugEnabled) + + try { + // get variables + String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback") + String updateNetworkInput = execution.getVariable(Prefix + "networkRequest") + String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc") + + String networkId = "" + if (utils.nodeExists(updateNetworkInput, "network-id")) { + networkId = utils.getNodeText1(updateNetworkInput, "network-id") + } + if (networkId == null) {networkId = ""} + + String serviceInstanceId = utils.getNodeText1(updateNetworkInput, "service-instance-id") + + // 1. prepare assign topology via SDNC Adapter SUBFLOW call + String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "changeassign", "NetworkActivateRequest", cloudRegionId, networkId, null, null) + + String sndcTopologyUpdateRequesAsString = utils.formatXml(sndcTopologyCreateRequest) + utils.logAudit(sndcTopologyUpdateRequesAsString) + execution.setVariable(Prefix + "changeAssignSDNCRequest", sndcTopologyUpdateRequesAsString) + utils.log("DEBUG", " UPDNETI_changeAssignSDNCRequest - " + "\n" + sndcTopologyUpdateRequesAsString, isDebugEnabled) + + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSDNCRequest() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + + + + // ************************************************** + // Post or Validate Response Section + // ************************************************** + + public void validateUpdateNetworkResponse (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside validateUpdateNetworkResponse of DoUpdateNetworkInstance *****", isDebugEnabled) + + try { + String returnCode = execution.getVariable(Prefix + "networkReturnCode") + String networkResponse = execution.getVariable(Prefix + "updateNetworkResponse") + if (networkResponse==null) { + networkResponse="" // reset + } + + utils.log("DEBUG", " Network Adapter update responseCode: " + returnCode, isDebugEnabled) + + String errorMessage = "" + if (returnCode == "200") { + execution.setVariable(Prefix + "isNetworkRollbackNeeded", true) + utils.logAudit(networkResponse) + execution.setVariable(Prefix + "updateNetworkResponse", networkResponse) + utils.log("DEBUG", " Network Adapter update Success Response - " + "\n" + networkResponse, isDebugEnabled) + + // prepare rollback data + String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","") + rollbackData = rollbackData.replace("rollback>", "networkRollback>") + String rollbackNetwork = + """<rollbackNetworkRequest> + ${rollbackData} + </rollbackNetworkRequest>""" + String rollbackNetworkXml = utils.formatXml(rollbackNetwork) + execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkXml) + utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled) + + } else { // network error + if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) { //4xx, 5xx + if (networkResponse.contains("updateNetworkError")) { + networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '') + errorMessage = utils.getNodeText1(networkResponse, "message") + errorMessage = "Received error from Network Adapter: " + errorMessage + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage) + + } else { // CatchAll exception + if (returnCode == "500") { + errorMessage = "JBWEB000065: HTTP Status 500." + } else { + errorMessage = "Return code is " + returnCode + } + errorMessage = "Received error from Network Adapter: " + errorMessage + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage) + + } + + } else { // CatchAll exception + String dataErrorMessage = "Received error from Network Adapter. Return code is: " + returnCode + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + + } + + } + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. validateUpdateNetworkResponse() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + + } + + public void validateSDNCResponse (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside validateSDNCResponse of DoUpdateNetworkInstance ***** ", isDebugEnabled) + + String response = execution.getVariable(Prefix + "changeAssignSDNCResponse") + WorkflowException workflowException = null + try { + workflowException = execution.getVariable(Prefix + "WorkflowException") + //execution.setVariable("WorkflowException", workflowException) + } catch (Exception ex) { + utils.log("DEBUG", " Sdnc 'WorkflowException' object is empty or null. ", isDebugEnabled) + } + + boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator") + + SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this) + sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator) + // reset variable + String changeAssignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "changeAssignSDNCResponse")) + changeAssignSDNCResponseDecodeXml = changeAssignSDNCResponseDecodeXml.replace("&", "&").replace('<?xml version="1.0" encoding="UTF-8"?>', "") + execution.setVariable(Prefix + "changeAssignSDNCResponse", changeAssignSDNCResponseDecodeXml) + + if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, prefix+'sdncResponseSuccess' + execution.setVariable(Prefix + "isSdncRollbackNeeded", true) + utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled) + + } else { + utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled) + throw new BpmnError("MSOWorkflowException") + } + + } + + + public void postProcessResponse (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside postProcessResponse of DoUpdateNetworkInstance ***** ", isDebugEnabled) + + try { + utils.log("DEBUG", " ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"), isDebugEnabled) + if (execution.getVariable(Prefix + "isException") == false) { + // set rollback data + execution.setVariable("orchestrationStatus", "") + execution.setVariable("networkId", execution.getVariable(Prefix + "networkId")) + execution.setVariable("networkName", execution.getVariable(Prefix + "networkName")) + prepareSuccessRollbackData(execution) // populate rollbackData + execution.setVariable("WorkflowException", null) + execution.setVariable(Prefix + "Success", true) + utils.log("DEBUG", " ***** postProcessResponse(), GOOD !!!", isDebugEnabled) + } else { + execution.setVariable(Prefix + "Success", false) + execution.setVariable("rollbackData", null) + String exceptionMessage = " Exception encountered in MSO Bpmn. " + if (execution.getVariable("workflowException") != null) { // Output of Rollback flow. + utils.log("DEBUG", " ***** workflowException: " + execution.getVariable("workflowException"), isDebugEnabled) + WorkflowException wfex = execution.getVariable("workflowException") + exceptionMessage = wfex.getErrorMessage() + } else { + if (execution.getVariable(Prefix + "WorkflowException") != null) { + WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException") + exceptionMessage = pwfex.getErrorMessage() + } + } + // going to the Main flow: a-la-carte or macro + utils.log("DEBUG", " ***** postProcessResponse(), BAD !!!", isDebugEnabled) + exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) + throw new BpmnError("MSOWorkflowException") + } + + } catch(BpmnError b){ + utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled) + throw b + + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. postProcessResponse() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + + } + + public void prepareSDNCRollbackRequest (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside prepareSDNCRollbackRequest of DoUpdateNetworkInstance ***** ", isDebugEnabled) + + try { + // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException. + execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException")) + // get variables + String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback") + String updateNetworkInput = execution.getVariable(Prefix + "networkRequest") + String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc") + String changeAssignSDNCResponse = execution.getVariable(Prefix + "changeAssignSDNCResponse") + String networkId = utils.getNodeText1(changeAssignSDNCResponse, "network-id") + + String serviceInstanceId = utils.getNodeText1(updateNetworkInput, "service-instance-id") + + // 2. prepare rollback topology via SDNC Adapter SUBFLOW call + String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null, null) + String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest) + execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyRollbackRequestAsString) + utils.log("DEBUG", " Preparing request for SDNC Topology assign's rollback/compensation . . . - " + "\n" + sndcTopologyRollbackRequestAsString, isDebugEnabled) + + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSDNCRollbackRequest() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void prepareRollbackData(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside prepareRollbackData() of DoUpdateNetworkInstance ***** ", isDebugEnabled) + + try { + + Map<String, String> rollbackData = new HashMap<String, String>(); + String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest") + if (rollbackSDNCRequest != null) { + if (rollbackSDNCRequest != "") { + rollbackData.put("rollbackSDNCRequest", execution.getVariable(Prefix + "rollbackSDNCRequest")) + } + } + String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest") + if (rollbackNetworkRequest != null) { + if (rollbackNetworkRequest != "") { + rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest")) + } + } + execution.setVariable("rollbackData", rollbackData) + utils.log("DEBUG", "** rollbackData : " + rollbackData, isDebugEnabled) + + execution.setVariable("WorkflowException", execution.getVariable(Prefix + "WorkflowException")) + utils.log("DEBUG", "** WorkflowException : " + execution.getVariable("WorkflowException"), isDebugEnabled) + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareRollbackData() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void prepareSuccessRollbackData(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside prepareSuccessRollbackData() of DoUpdateNetworkInstance ***** ", isDebugEnabled) + + try { + + if (execution.getVariable("sdncVersion") == '1702') { + // skip: 1702 for 'changeassign' or equivalent not yet defined in SNDC, so no rollback. + } else { + prepareSDNCRollbackRequest(execution) + } + + Map<String, String> rollbackData = new HashMap<String, String>(); + String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest") + if (rollbackSDNCRequest != null) { + if (rollbackSDNCRequest != "") { + rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest) + } + } + String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest") + if (rollbackNetworkRequest != null) { + if (rollbackNetworkRequest != "") { + rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest) + } + } + execution.setVariable("rollbackData", rollbackData) + + utils.log("DEBUG", "** 'rollbackData' for Full Rollback : " + rollbackData, isDebugEnabled) + execution.setVariable("WorkflowException", null) + + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void setExceptionFlag(Execution execution){ + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside setExceptionFlag() of DoUpdateNetworkInstance ***** ", isDebugEnabled) + + try { + + execution.setVariable(Prefix + "isException", true) + + if (execution.getVariable("SavedWorkflowException1") != null) { + execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1")) + } else { + execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException")) + } + utils.log("DEBUG", Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled) + + } catch(Exception ex){ + String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. setExceptionFlag(): " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) + } + + } + + + // ******************************* + // Build Error Section + // ******************************* + + public void processJavaException(Execution execution){ + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + try{ + utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled) + utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled) + utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled) + execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated + exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception") + + }catch(Exception e){ + utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled) + execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated + exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method") + } + utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled) + } + +} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy new file mode 100644 index 0000000000..c91771116f --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy @@ -0,0 +1,304 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.openecomp.mso.bpmn.infrastructure.scripts; + +import groovy.xml.XmlUtil +import groovy.json.* + +import org.openecomp.mso.bpmn.common.scripts.AaiUtil +import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil +import org.openecomp.mso.bpmn.common.scripts.NetworkUtils +import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils +import org.openecomp.mso.bpmn.common.scripts.VidUtils +import org.openecomp.mso.bpmn.core.WorkflowException +import org.openecomp.mso.bpmn.core.json.JsonUtils +import org.openecomp.mso.rest.APIResponse + +import java.util.UUID; + +import org.camunda.bpm.engine.delegate.BpmnError +import org.camunda.bpm.engine.runtime.Execution +import org.apache.commons.lang3.* +import org.apache.commons.codec.binary.Base64; +import org.springframework.web.util.UriUtils + +/** + * This groovy class supports the <class>DoCreateNetworkInstance.bpmn</class> process. + * + */ +public class DoUpdateNetworkInstanceRollback extends AbstractServiceTaskProcessor { + String Prefix="UPDNETIR_" + ExceptionUtil exceptionUtil = new ExceptionUtil() + JsonUtils jsonUtil = new JsonUtils() + VidUtils vidUtils = new VidUtils(this) + NetworkUtils networkUtils = new NetworkUtils() + SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + def className = getClass().getSimpleName() + + /** + * This method is executed during the preProcessRequest task of the <class>DoUpdateNetworkInstanceRollback.bpmn</class> process. + * @param execution + */ + public InitializeProcessVariables(Execution execution){ + /* Initialize all the process variables in this block */ + + execution.setVariable(Prefix + "rollbackNetworkRequest", null) + execution.setVariable(Prefix + "rollbackSDNCRequest", null) + execution.setVariable(Prefix + "WorkflowException", null) + + execution.setVariable(Prefix + "rollbackNetworkRequest", "") + execution.setVariable(Prefix + "rollbackNetworkResponse", "") + execution.setVariable(Prefix + "rollbackNetworkReturnCode", "") + + execution.setVariable(Prefix + "rollbackSDNCRequest", "") + execution.setVariable(Prefix + "rollbackSDNCResponse", "") + execution.setVariable(Prefix + "rollbackSDNCReturnCode", "") + + execution.setVariable(Prefix + "Success", false) + execution.setVariable(Prefix + "fullRollback", false) + + } + + // ************************************************** + // Pre or Prepare Request Section + // ************************************************** + /** + * This method is executed during the preProcessRequest task of the <class>DoUpdateNetworkInstanceRollback.bpmn</class> process. + * @param execution + */ + public void preProcessRequest (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside preProcessRequest() of " + className + ".groovy ***** ", isDebugEnabled) + + try { + // initialize flow variables + InitializeProcessVariables(execution) + + // GET Incoming request/variables + String rollbackNetworkRequest = null + String rollbackSDNCRequest = null + + // Partial Rollback + Map<String, String> rollbackData = execution.getVariable("rollbackData") + if (rollbackData != null && rollbackData instanceof Map) { + + if(rollbackData.containsKey("rollbackNetworkRequest")) { + rollbackNetworkRequest = rollbackData["rollbackNetworkRequest"] + } + + if(rollbackData.containsKey("rollbackSDNCRequest")) { + rollbackSDNCRequest = rollbackData["rollbackSDNCRequest"] + } + } + + execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkRequest) + execution.setVariable(Prefix + "rollbackSDNCRequest", rollbackSDNCRequest) + utils.log("DEBUG", "'rollbackData': " + '\n' + execution.getVariable("rollbackData"), isDebugEnabled) + + String sdncVersion = execution.getVariable("sdncVersion") + utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled) + + // PO Authorization Info / headers Authorization= + String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth") + utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled) + try { + def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey")) + execution.setVariable("BasicAuthHeaderValuePO",encodedString) + execution.setVariable("BasicAuthHeaderValueSDNC", encodedString) + + } catch (IOException ex) { + String exceptionMessage = "Exception Encountered in DoCreateNetworkInstance, PreProcessRequest() - " + String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage() + utils.log("DEBUG", dataErrorMessage , isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + } + + if (execution.getVariable("SavedWorkflowException1") != null) { + execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1")) + } else { + execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException")) + } + utils.log("DEBUG", "*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled) + if(execution.getVariable(Prefix + "WorkflowException") != null) { + // called by: DoCreateNetworkInstance, partial rollback + execution.setVariable(Prefix + "fullRollback", false) + + } else { + // called by: Macro - Full Rollback, WorkflowException = null + execution.setVariable(Prefix + "fullRollback", true) + + } + utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled) + + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex) { + sendSyncError(execution) + // caught exception + String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void validateRollbackResponses (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside validateRollbackResponses() of DoUpdateNetworkInstanceRollback ***** ", isDebugEnabled) + + try { + // validate PO network rollback response + String rollbackNetworkErrorMessages = "" + String rollbackNetworkReturnCode = "200" + if (execution.getVariable(Prefix + "rollbackNetworkRequest") != null) { + rollbackNetworkReturnCode = execution.getVariable(Prefix + "rollbackNetworkReturnCode") + String rollbackNetworkResponse = execution.getVariable(Prefix + "rollbackNetworkResponse") + utils.log("DEBUG", " NetworkRollback Code - " + rollbackNetworkReturnCode, isDebugEnabled) + utils.log("DEBUG", " NetworkRollback Response - " + rollbackNetworkResponse, isDebugEnabled) + if (rollbackNetworkReturnCode != "200") { + rollbackNetworkErrorMessages = " + PO Network rollback failed. " + } else { + rollbackNetworkErrorMessages = " + PO Network rollback completed." + } + } + + // validate SDNC rollback response + String rollbackSdncErrorMessages = "" + String rollbackSDNCReturnCode = "200" + if (execution.getVariable(Prefix + "rollbackSDNCRequest") != null) { + rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode") + String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse") + String rollbackSDNCReturnInnerCode = "" + SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this) + rollbackSDNCResponse = sdncAdapterUtils.decodeXML(rollbackSDNCResponse) + rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "") + if (rollbackSDNCReturnCode == "200") { + if (utils.nodeExists(rollbackSDNCResponse, "response-code")) { + rollbackSDNCReturnInnerCode = utils.getNodeText1(rollbackSDNCResponse, "response-code") + if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") { + rollbackSdncErrorMessages = " + SNDC changeassign rollback completed." + } else { + rollbackSdncErrorMessages = " + SDNC changeassign rollback failed. " + } + } else { + rollbackSdncErrorMessages = " + SNDC changeassign rollback completed." + } + } else { + rollbackSdncErrorMessages = " + SDNC changeassign rollback failed. " + } + utils.log("DEBUG", " SDNC changeassign rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled) + utils.log("DEBUG", " SDNC changeassign rollback Response - " + rollbackSDNCResponse, isDebugEnabled) + } + + String statusMessage = "" + int errorCode = 7000 + utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled) + if (execution.getVariable(Prefix + "fullRollback") == false) { + // original WorkflowException, + WorkflowException wfe = execution.getVariable(Prefix + "WorkflowException") + if (wfe != null) { + // rollback due to failure in DoCreate - Partial rollback + statusMessage = wfe.getErrorMessage() + errorCode = wfe.getErrorCode() + } else { + statusMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception." + errorCode = '7000' + } + + // set if all rolledbacks are successful + if (rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200") { + execution.setVariable("rolledBack", true) + + } else { + execution.setVariable("rolledBack", false) + + } + + statusMessage = statusMessage + rollbackNetworkErrorMessages + rollbackSdncErrorMessages + utils.log("DEBUG", "Final DoUpdateNetworkInstanceRollback status message: " + statusMessage, isDebugEnabled) + String processKey = getProcessKey(execution); + WorkflowException exception = new WorkflowException(processKey, errorCode, statusMessage); + execution.setVariable("workflowException", exception); + + } else { + // rollback due to failures in Main flow (Macro) - Full rollback + // WorkflowException = null + if (rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200") { + execution.setVariable("rollbackSuccessful", true) + execution.setVariable("rollbackError", false) + } else { + String exceptionMessage = "Network Update Rollback was not Successful. " + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + execution.setVariable("rollbackSuccessful", false) + execution.setVariable("rollbackError", true) + exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) + throw new BpmnError("MSOWorkflowException") + } + + } + + + } catch (Exception ex) { + execution.setVariable("WorkflowException", null) + String errorMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception." + String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstanceRollback flow. validateRollbackResponses() - " + errorMessage + ": " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) + execution.setVariable("WorkflowException", execution.getVariable("WorkflowException")) + + } + + } + + // ******************************* + // Build Error Section + // ******************************* + + + + public void processJavaException(Execution execution){ + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + try{ + utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled) + utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled) + utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled) + execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated + exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception") + + }catch(Exception e){ + utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled) + execution.setVariable("UnexpectedError", "Exception in processJavaException method - " + Prefix) // Adding this line temporarily until this flows error handling gets updated + exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix) + } + utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled) + } + +} diff --git a/bpmn/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 index 7d6a21dc98..5999857608 100644 --- 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 @@ -1,789 +1,919 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package 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()) - } - } - - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModule
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+public class DoUpdateVfModule extends VfModuleBase {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'DOUPVfMod_')
+ execution.setVariable('DOUPVfMod_requestInfo', null)
+ execution.setVariable('DOUPVfMod_serviceInstanceId', null)
+ execution.setVariable('DOUPVfMod_requestId', null)
+ execution.setVariable('DOUPVfMod_vnfInputs', null)
+ execution.setVariable('DOUPVfMod_vnfId', null)
+ execution.setVariable('DOUPVfMod_vnfName', null)
+ execution.setVariable('DOUPVfMod_vnfNameFromAAI', null)
+ execution.setVariable('DOUPVfMod_vfModuleName', null)
+ execution.setVariable('DOUPVfMod_vfModuleId', null)
+ execution.setVariable('DOUPVfMod_vnfType', null)
+ execution.setVariable('DOUPVfMod_asdcServiceModelVersion', null)
+ execution.setVariable('DOUPVfMod_vfModuleModelName', null)
+ execution.setVariable('DOUPVfMod_modelCustomizationUuid', null)
+ execution.setVariable("DOUPVfMod_isBaseVfModule", "false")
+ execution.setVariable('DOUPVfMod_serviceId', null)
+ execution.setVariable('DOUPVfMod_aicCloudRegion', null)
+ execution.setVariable('DOUPVfMod_tenantId', null)
+ execution.setVariable('DOUPVfMod_volumeGroupId', null)
+ execution.setVariable('DOUPVfMod_vfModule', null)
+ execution.setVariable('DOUPVfMod_vnfParams', null)
+ execution.setVariable("DOUPVfMod_baseVfModuleId", "")
+ execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", "")
+ execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', null)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignRequest', null)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignResponse', null)
+ execution.setVariable('DOUPVfMod_sdncActivateRequest', null)
+ execution.setVariable('DOUPVfMod_sdncActivateResponse', null)
+ execution.setVariable('DOUPVfMod_sdncTopologyRequest', null)
+ execution.setVariable('DOUPVfMod_sdncTopologyResponse', null)
+ execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', null)
+ execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', null)
+ execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', null)
+ execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', false)
+ execution.setVariable('DoUpdateVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ initProcessVariables(execution)
+ def xml = getVariable(execution, 'DoUpdateVfModuleRequest')
+ utils.logAudit("DoUpdateVfModule request: " + xml)
+ logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+
+ if (xml == null || xml.isEmpty()) {
+ // Building Block-type request
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+
+ def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ logDebug("serviceModelInfo: " + serviceModelInfo, isDebugLogEnabled)
+ def vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+
+ //tenantId
+ def tenantId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.tenantId")
+ execution.setVariable("DOUPVfMod_tenantId", tenantId)
+
+ //volumeGroupId
+ def volumeGroupId = execution.getVariable("volumeGroupId")
+ execution.setVariable("DOUPVfMod_volumeGroupId", volumeGroupId)
+ //volumeGroupName
+ def volumeGroupName = execution.getVariable("volumeGroupName")
+ execution.setVariable("DOUPVfMod_volumeGroupName", volumeGroupName)
+ //cloudSiteId
+ def cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("DOUPVfMod_cloudSiteId", cloudSiteId)
+
+ logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled)
+ //vnfType
+ def vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DOUPVfMod_vnfType", vnfType)
+
+ logDebug("vnfType: " + vnfType, isDebugLogEnabled)
+ //vnfName
+ def vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DOUPVfMod_vnfName", vnfName)
+
+ logDebug("vnfName: " + vnfName, isDebugLogEnabled)
+ //vnfId
+ def vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DOUPVfMod_vnfId", vnfId)
+
+ logDebug("vnfId: " + vnfId, isDebugLogEnabled)
+ //vfModuleName
+ def vfModuleName = execution.getVariable("vfModuleName")
+ execution.setVariable("DOUPVfMod_vfModuleName", vfModuleName)
+
+ logDebug("vfModuleName: " + vfModuleName, isDebugLogEnabled)
+ //vfModuleModelName
+ def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
+ execution.setVariable("DOUPVfMod_vfModuleModelName", vfModuleModelName)
+
+ logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled)
+ //modelCustomizationUuid
+ def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationId")
+ execution.setVariable("DOUPVfMod_modelCustomizationUuid", modelCustomizationUuid)
+
+ logDebug("modelCustomizationUuid: " + modelCustomizationUuid, isDebugLogEnabled)
+ //vfModuleId
+ def vfModuleId = execution.getVariable("vfModuleId")
+ execution.setVariable("DOUPVfMod_vfModuleId", vfModuleId)
+ logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled)
+ def requestId = execution.getVariable("requestId")
+ execution.setVariable("DOUPVfMod_requestId", requestId)
+ logDebug("requestId: " + requestId, isDebugLogEnabled)
+ // Set mso-request-id to request-id for VNF Adapter interface
+ execution.setVariable("mso-request-id", requestId)
+ //serviceId
+ def serviceId = execution.getVariable("serviceId")
+ execution.setVariable("DOUPVfMod_serviceId", serviceId)
+ logDebug("serviceId: " + serviceId, isDebugLogEnabled)
+ //serviceInstanceId
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DOUPVfMod_serviceInstanceId", serviceInstanceId)
+
+ logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled)
+ //source - HARDCODED
+ def source = "VID"
+ execution.setVariable("DOUPVfMod_source", source)
+
+ logDebug("source: " + source, isDebugLogEnabled)
+ //backoutOnFailure
+ def disableRollback = execution.getVariable("disableRollback")
+ def backoutOnFailure = true
+ if (disableRollback != null && disableRollback.equals("true")) {
+ backoutOnFailure = false
+ }
+ execution.setVariable("DOUPVfMod_backoutOnFailure", backoutOnFailure)
+ logDebug("backoutOnFailure: " + backoutOnFailure, isDebugLogEnabled)
+ //isBaseVfModule
+ def isBaseVfModule = execution.getVariable("isBaseVfModule")
+ execution.setVariable("DOUPVfMod_isBaseVfModule", isBaseVfModule)
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ execution.setVariable("DOUPVfMod_asdcServiceModelVersion", asdcServiceModelVersion)
+ logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled)
+ //personaModelId
+ execution.setVariable("DOUPVfMod_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantId"))
+ //personaModelVersion
+ execution.setVariable("DOUPVfMod_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelVersion"))
+ //Get or Generate UUID
+ String uuid = execution.getVariable("DOUPVfMod_uuid")
+ if(uuid == null){
+ uuid = UUID.randomUUID()
+ logDebug("Generated messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }else{
+ logDebug("Found messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }
+ //isVidRequest
+ String isVidRequest = execution.getVariable("isVidRequest")
+ // default to true
+ if (isVidRequest == null || isVidRequest.isEmpty()) {
+ execution.setVariable("isVidRequest", "true")
+ }
+ //globalSubscriberId
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ execution.setVariable("DOUPVfMod_globalSubscriberId", globalSubscriberId)
+ logDebug("globalSubsrciberId: " + globalSubscriberId, isDebugLogEnabled)
+ //vnfQueryPath
+ String vnfQueryPath = execution.getVariable("vnfQueryPath")
+ execution.setVariable("DOUPVfMod_vnfQueryPath", vnfQueryPath)
+ logDebug("vnfQueryPath: " + vnfQueryPath, isDebugLogEnabled)
+
+ String vnfParamsChildNodes = execution.getVariable("vfModuleInputParams")
+ execution.setVariable('DOUPVfMod_vnfParams', vnfParamsChildNodes)
+ }
+ else {
+
+ def requestInfo = getRequiredNodeXml(execution, xml, 'request-info')
+ execution.setVariable('DOUPVfMod_requestInfo', requestInfo)
+ execution.setVariable('DOUPVfMod_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ def serviceInstanceId = execution.getVariable('mso-service-instance-id')
+ if (serviceInstanceId == null) {
+ serviceInstanceId = ''
+ }
+ execution.setVariable('DOUPVfMod_serviceInstanceId', serviceInstanceId)
+
+ def vnfInputs = getRequiredNodeXml(execution, xml, 'vnf-inputs')
+ execution.setVariable('DOUPVfMod_vnfInputs', vnfInputs)
+ execution.setVariable('DOUPVfMod_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+ execution.setVariable('DOUPVfMod_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('DOUPVfMod_vfModuleName', getNodeTextForce(vnfInputs, 'vf-module-name'))
+ execution.setVariable('DOUPVfMod_vnfType', getNodeTextForce(vnfInputs, 'vnf-type'))
+ execution.setVariable('DOUPVfMod_vnfName', getNodeTextForce(vnfInputs, 'vnf-name'))
+ execution.setVariable('DOUPVfMod_asdcServiceModelVersion', getNodeTextForce(vnfInputs, 'asdc-service-model-version'))
+ execution.setVariable('DOUPVfMod_vfModuleModelName', getRequiredNodeText(execution, vnfInputs, 'vf-module-model-name'))
+ execution.setVariable('DOUPVfMod_modelCustomizationUuid', getNodeTextForce(vnfInputs, 'model-customization-id'))
+ execution.setVariable('DOUPVfMod_serviceId', getRequiredNodeText(execution, vnfInputs, 'service-id'))
+ execution.setVariable('DOUPVfMod_aicCloudRegion', getRequiredNodeText(execution, vnfInputs, 'aic-cloud-region'))
+ execution.setVariable('DOUPVfMod_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ //isBaseVfModule
+ def isBaseVfModule = "false"
+ if (utils.nodeExists(xml, "is-base-vf-module")) {
+ isBaseVfModule = utils.getNodeText(xml, "is-base-vf-module")
+ execution.setVariable("DOUPVfMod_isBaseVfModule", isBaseVfModule)
+ }
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+
+ NetworkUtils networkUtils = new NetworkUtils()
+ def backoutOnFailure = networkUtils.isRollbackEnabled(execution, xml)
+ execution.setVariable("DOUPVfMod_backoutOnFailure", backoutOnFailure)
+
+ def String vgi = getNodeTextForce(vnfInputs, 'volume-group-id')
+ execution.setVariable('DOUPVfMod_volumeGroupId', vgi)
+
+ execution.setVariable('DOUPVfMod_vnfParams', utils.getNodeXml(xml, 'vnf-params', false))
+ }
+
+ def sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the PrepareUpdateAAIVfModule subflow. This will
+ * set the orchestration-status to 'pending-update'.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepPrepareUpdateAAIVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.preparePrepareUpdateAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def orchestrationStatus = 'pending-update'
+
+ String prepareUpdateAAIVfModuleRequest = """
+ <PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <orchestration-status>${orchestrationStatus}</orchestration-status>
+ </PrepareUpdateAAIVfModuleRequest>
+ """
+ prepareUpdateAAIVfModuleRequest = utils.formatXml(prepareUpdateAAIVfModuleRequest)
+ execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', prepareUpdateAAIVfModuleRequest)
+ utils.logAudit("DoUpdateAAIVfModule request: " + prepareUpdateAAIVfModuleRequest)
+ logDebug('Request for PrepareUpdateAAIVfModule:\n' + prepareUpdateAAIVfModuleRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preparePrepareUpdateAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the ConfirmVolumeGroupTenant subflow. Currently,
+ * there is really nothing to do, so we just log that we're passing through.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepConfirmVolumeGroupTenant(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepConfirmVolumeGroupTenant(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ // Nothing to do - just log that we're passing through here
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepConfirmVolumeGroupTenant(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the SDNC Adapter subflow to perform
+ * a VNF topology 'changeassign' operation.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepSDNCTopologyChg(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyChg(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ def serviceId = execution.getVariable('DOUPVfMod_serviceId')
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vnfType = execution.getVariable('DOUPVfMod_vnfType')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+ def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+ def vfModuleName = vfModule.getElementText('vf-module-name')
+ def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+ def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')
+
+ // Retrieve vnf name from AAI response
+ def vnfName = execution.getVariable('DOUPVfMod_vnfNameFromAAI')
+ execution.setVariable('DOUPVfMod_vnfName', vnfName)
+
+ def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
+
+ String sdncTopologyRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${vnfId}</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vfModuleId}</vnf-id>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ <vnf-name>${vfModuleName}</vnf-name>
+ <generic-vnf-id>${vnfId}</generic-vnf-id>
+ <generic-vnf-name>${vnfName}</generic-vnf-name>
+ <generic-vnf-type>${vnfType}</generic-vnf-type>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ ${vnfNetworks}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignRequest', sdncTopologyRequest)
+ utils.logAudit("sdncChangeAssignRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter topology/changeassign:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepSDNCTopologyChg(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the SDNC Adapter subflow to perform
+ * a VNF topology 'query' operation.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepSDNCTopologyQuery(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyQuery(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vfModuleId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+
+ //!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE
+ sleep(5000)
+
+ String sdncTopologyRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>/VNF-API:vnfs/vnf-list/${vfModuleId}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
+ utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter query:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepSDNCTopologyQuery(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the VnfAdapterRest subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepVnfAdapterRest(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepVnfAdapterRest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def vfModuleName = execution.getVariable('DOUPVfMod_vfModuleName')
+ def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+ def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+ def volumeGroupId = execution.getVariable('DOUPVfMod_volumeGroupId')
+ def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+ def heatStackId = vfModule.getElementText('heat-stack-id')
+ def cloudId = execution.getVariable('DOUPVfMod_aicCloudRegion')
+ def vnfType = execution.getVariable('DOUPVfMod_vnfType')
+ def vnfName = execution.getVariable('DOUPVfMod_vnfName')
+ def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+ def baseVfModuleId = execution.getVariable("DOUPVfMod_baseVfModuleId")
+ def baseVfModuleStackId = execution.getVariable("DOUPVfMod_baseVfModuleHeatStackId")
+ def asdcServiceModelVersion = execution.getVariable('DOUPVfMod_asdcServiceModelVersion')
+ def modelCustomizationUuid = execution.getVariable('DOUPVfMod_modelCustomizationUuid')
+ def backoutOnFailure = execution.getVariable("DOUPVfMod_backoutOnFailure")
+
+ def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vfModuleParamsEntries = transformParamsToEntries(vnfParamsXml)
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String sdncGetResponse = execution.getVariable('DOUPVfMod_sdncTopologyResponse')
+
+ String vfModuleParams = buildVfModuleParams(vfModuleParamsEntries, sdncGetResponse, vnfId, vnfName,
+ vfModuleId, vfModuleName, null)
+
+
+ String vnfAdapterRestRequest = """
+ <updateVfModuleRequest>
+ <cloudSiteId>${cloudId}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vfModuleId>${vfModuleId}</vfModuleId>
+ <vfModuleStackId>${heatStackId}</vfModuleStackId>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion>${asdcServiceModelVersion}</vnfVersion>
+ <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid>
+ <vfModuleType>${vfModuleModelName}</vfModuleType>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <baseVfModuleId>${baseVfModuleId}</baseVfModuleId>
+ <baseVfModuleStackId>${baseVfModuleStackId}</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>${backoutOnFailure}</backout>
+ <failIfExists>false</failIfExists>
+ <vfModuleParams>
+ ${vfModuleParams}
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </updateVfModuleRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ utils.logAudit("vnfAdapterRestRequest : " + vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepVnfAdapterRest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+
+ def personaModelId = utils.getNodeText1(vnfInputs, 'vnf-persona-model-id')
+ def personaModelVersion = utils.getNodeText1(vnfInputs, 'vnf-persona-model-version')
+ if ((personaModelId == null) || (personaModelVersion == null)) {
+ logDebug('Skipping update for Generic VNF ' + vnfId +
+ ' because either \'vnf-persona-model-id\' or \'vnf-persona-model-version\' is absent', isDebugLogEnabled)
+ execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', true)
+ } else {
+ def personaModelIdElement = '<persona-model-id>' + personaModelId + '</persona-model-id>'
+ def personaModelVersionElement = '<persona-model-version>' + personaModelVersion + '</persona-model-version>'
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ ${personaModelIdElement}
+ ${personaModelVersionElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIVfModule subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def orchestrationStatus = 'updated'
+ def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+
+ def volumeGroupIdElement = ''
+ def volumeGroupId = execution.getVariable('DOUPVfMod_volumeGroupId')
+ if (volumeGroupId != null) {
+ volumeGroupIdElement = '<volume-group-id>' + volumeGroupId + '</volume-group-id>'
+ }
+ def personaModelIdElement = ''
+ def personaModelId = utils.getNodeText1(vnfInputs, 'persona-model-id')
+ if (personaModelId != null) {
+ personaModelIdElement = '<persona-model-id>' + personaModelId + '</persona-model-id>'
+ }
+ def personaModelVersionElement = ''
+ def personaModelVersion = utils.getNodeText1(vnfInputs, 'persona-model-version')
+ if (personaModelVersion != null) {
+ personaModelVersionElement = '<persona-model-version>' + personaModelVersion + '</persona-model-version>'
+ }
+ def contrailServiceInstanceFqdnElement = ''
+ def contrailServiceInstanceFqdn = utils.getNodeText1(vnfInputs, 'contrail-service-instance-fqdn')
+ if (contrailServiceInstanceFqdn != null) {
+ contrailServiceInstanceFqdnElement = '<contrail-service-instance-fqdn>' + contrailServiceInstanceFqdn + '</contrail-service-instance-fqdn>'
+ }
+ def personaModelCustomizationIdElement = ''
+ def modelCustomizationId = execution.getVariable('DOUPVfMod_modelCustomizationUuid')
+ if (modelCustomizationId != null) {
+ personaModelCustomizationIdElement = '<persona-model-customization-id>' + modelCustomizationId + '</persona-model-customization-id>'
+ }
+
+ String updateAAIVfModuleRequest = """
+ <UpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <orchestration-status>${orchestrationStatus}</orchestration-status>
+ ${volumeGroupIdElement}
+ ${personaModelIdElement}
+ ${personaModelVersionElement}
+ ${contrailServiceInstanceFqdnElement}
+ ${personaModelCustomizationIdElement}
+ </UpdateAAIVfModuleRequest>
+ """
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', updateAAIVfModuleRequest)
+ utils.logAudit("updateAAIVfModuleRequest : " + updateAAIVfModuleRequest)
+ logDebug('Request for UpdateAAIVfModule:\n' + updateAAIVfModuleRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the SDNC Adapter subflow to perform
+ * a VNF topology 'activate' operation.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepSDNCTopologyAct(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyAct(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ def serviceId = execution.getVariable('DOUPVfMod_serviceId')
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vnfName = execution.getVariable('DOUPVfMod_vnfName')
+ def vnfType = execution.getVariable('DOUPVfMod_vnfType')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+ def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+ def vfModuleName = vfModule.getElementText('vf-module-name')
+ def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+ def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')
+
+ def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
+
+ String sdncTopologyRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${vnfId}</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vfModuleId}</vnf-id>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ <vnf-name>${vfModuleName}</vnf-name>
+ <generic-vnf-id>${vnfId}</generic-vnf-id>
+ <generic-vnf-name>${vnfName}</generic-vnf-name>
+ <generic-vnf-type>${vnfType}</generic-vnf-type>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncActivateRequest', sdncTopologyRequest)
+ utils.logAudit("sdncActivateRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter topology/activate:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepSDNCTopologyAct(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Log a WorkflowException that has been created.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleWorkflowException(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleWorkflowException(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def WorkflowException workflowException = (WorkflowException) execution.getVariable('WorkflowException')
+ logError(method + ' caught WorkflowException: ' + workflowException.getErrorMessage())
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildWorkflowException(execution, 1002, 'Error in handleWorkflowException(): ' + e.getMessage())
+ }
+ }
+
+ public void validateSDNCResponse(Execution execution, String response, String method){
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def prefix = execution.getVariable("prefix")
+
+ logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ utils.logAudit("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ utils.logAudit("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(prefix + 'sdncResponseSuccess') == true){
+ logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
+ }else{
+ logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+ * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIVfModule(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def method = getClass().getSimpleName() + '.getVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+ String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ utils.logAudit("AAI endPoint: " + endPoint)
+
+ try {
+ def aaiRequestId = UUID.randomUUID().toString()
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
+ utils.logAudit("createVfModule - invoking httpGet() to AAI")
+
+ def responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+ }
+
+ utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
+ utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DOUPVfMod_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DOUPVfMod_queryAAIVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled)
+ if (responseData != null) {
+ def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ int vfModulesSize = 0
+ for (i in 0..vfModules.size()-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+ def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
+
+ if (isBaseVfModule == "true") {
+ String baseModuleId = utils.getNodeText1(vfModuleXml, "vf-module-id")
+ execution.setVariable("DOUPVfMod_baseVfModuleId", baseModuleId)
+ logDebug('Received baseVfModuleId: ' + baseModuleId, isDebugLogEnabled)
+ String baseModuleHeatStackId = utils.getNodeText1(vfModuleXml, "heat-stack-id")
+ execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", baseModuleHeatStackId)
+ logDebug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId, isDebugLogEnabled)
+ }
+ }
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+
+}
diff --git a/bpmn/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 index dd9f94d2f2..c2d394f02e 100644 --- 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 @@ -1,54 +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) - } - } - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.apache.commons.lang3.*
+
+public class HealthCheckActivate extends AbstractServiceTaskProcessor {
+
+
+ /**
+ * Validates the request message and sets up the workflow.
+ * @param execution the execution
+ */
+ public void preProcessRequest(Execution execution) {
+
+ }
+
+
+ /**
+ * Sends the synchronous response back to the API Handler.
+ * @param execution the execution
+ */
+ public void sendResponse(Execution execution) {
+ def status = execution.getVariable("healthyStatus")
+ def healthcheckmessage = execution.getVariable("healthcheckmessage")
+ if (status == "true") {
+ sendWorkflowResponse(execution, 200, healthcheckmessage)
+ }else{
+ sendWorkflowResponse(execution, 503, healthcheckmessage)
+ }
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy new file mode 100644 index 0000000000..68b0e58b57 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy @@ -0,0 +1,452 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.openecomp.mso.bpmn.infrastructure.scripts; + +import groovy.xml.XmlUtil +import groovy.json.* +import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil +import org.openecomp.mso.bpmn.core.WorkflowException +import org.openecomp.mso.bpmn.core.json.JsonUtils +import org.openecomp.mso.rest.APIResponse + +import java.util.UUID; + +import org.camunda.bpm.engine.delegate.BpmnError +import org.camunda.bpm.engine.runtime.Execution +import org.apache.commons.lang3.* +import org.apache.commons.codec.binary.Base64; +import org.springframework.web.util.UriUtils + +/** + * This groovy class supports the <class>UpdateNetworkInstance.bpmn</class> process. + * + */ +public class UpdateNetworkInstance extends AbstractServiceTaskProcessor { + String Prefix="UPDNI_" + ExceptionUtil exceptionUtil = new ExceptionUtil() + JsonUtils jsonUtil = new JsonUtils() + + public InitializeProcessVariables(Execution execution){ + + execution.setVariable(Prefix + "source", "") + execution.setVariable(Prefix + "Success", false) + + execution.setVariable(Prefix + "CompleteMsoProcessRequest", "") + execution.setVariable(Prefix + "FalloutHandlerRequest", "") + + } + + + /** + * This method is executed during the preProcessRequest task of the <class>UpdateNetworkInstance.bpmn</class> process. + * @param execution + */ + + // ************************************************** + // Pre or Prepare Request Section + // ************************************************** + /** + * This method is executed during the preProcessRequest task of the <class>UpdateNetworkInstance.bpmn</class> process. + * @param execution + */ + public void preProcessRequest (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside preProcessRequest() of UpdateNetworkInstance Request ***** ", isDebugEnabled) + + try { + // initialize flow variables + InitializeProcessVariables(execution) + + String sdncVersion = execution.getVariable("sdncVersion") + if (sdncVersion == null || sdncVersion == "1610") { + // 'a-la-cart' default, sdncVersion = '1610' + execution.setVariable("sdncVersion", "1610") + String bpmnRequest = execution.getVariable("bpmnRequest") + if (bpmnRequest != null) { + String disableRollback = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.requestInfo.suppressRollback") + if (disableRollback != null) { + execution.setVariable("disableRollback", disableRollback) + utils.log("DEBUG", "Received 'suppressRollback': " + disableRollback , isDebugEnabled) + } else { + execution.setVariable("disableRollback", false) + } + utils.log("DEBUG", " Set 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled) + } else { + String dataErrorMessage = " Invalid 'bpmnRequest' request." + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + } + + } else { + // 'macro' TEST ONLY, sdncVersion = '1702' + utils.log("DEBUG", " 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled) + } + + // get/set 'msoRequestId' and 'mso-request-id' + String requestId = execution.getVariable("msoRequestId") + if (requestId != null) { + execution.setVariable("mso-request-id", requestId) + } else { + requestId = execution.getVariable("mso-request-id") + } + execution.setVariable(Prefix + "requestId", requestId) + + // get/set 'requestId' + if (execution.getVariable("requestId") == null) { + execution.setVariable("requestId", requestId) + } + + //Place holder for additional code. + + // TODO ??? + // userParams??? 1) pre-loads indicator, 2) 'auto-activation' + // Tag/Value parameters + // + // Map: 'networkInputParams': 'auto-activation'' + // Sample format? + // "requestParameters": { + // "userParams": [ + // { + // "name": "someUserParam1", + // "value": "someValue1" + // } + // ] + // } + // + // String userParams = //use json util to extract "userParams"// + // execution.setVariable("networkInputParams", userParams) + // else: execution.setVariable("networkInputParams", null) + // + + } catch (BpmnError e) { + throw e; + + } catch (Exception ex){ + sendSyncError(execution) + // caught exception + String exceptionMessage = "Exception Encountered in UpdateNetworkInstance, PreProcessRequest() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + } + + public void sendSyncResponse (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside sendSyncResponse() of UpdateNetworkInstance ***** ", isDebugEnabled) + + try { + String requestId = execution.getVariable("mso-request-id") + String serviceInstanceId = execution.getVariable("serviceInstanceId") + + // RESTResponse (for API Handler (APIH) Reply Task) + String updateNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim() + + utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + updateNetworkRestRequest, isDebugEnabled) + sendWorkflowResponse(execution, 202, updateNetworkRestRequest) + + } catch (Exception ex) { + String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstance flow. sendSyncResponse() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + } + + } + + + public void getNetworkModelInfo (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside getNetworkModelInfo() of UpdateNetworkInstance ***** ", isDebugEnabled) + + try { + + // "networkModelInfo" is expected to be sent + String networkModelInfo = execution.getVariable("networkModelInfo") + utils.log("DEBUG", " networkModelInfo - " + networkModelInfo, isDebugEnabled) + + // "serviceModelInfo" is expected to be sent + String serviceModelInfo = execution.getVariable("serviceModelInfo") + utils.log("DEBUG", " serviceModelInfo - " + serviceModelInfo, isDebugEnabled) + + + } catch (Exception ex) { + sendSyncError(execution) + String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + + public void sendSyncError (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside sendSyncError() of UpdateNetworkInstance ***** ", isDebugEnabled) + + try { + + String requestId = execution.getVariable("mso-request-id") + String serviceInstanceId = execution.getVariable("serviceInstanceId") + + // REST Error (for API Handler (APIH) Reply Task) + String syncError = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim() + + sendWorkflowResponse(execution, 500, syncError) + + } catch (Exception ex) { + utils.log("DEBUG", " Bpmn error encountered in UpdateNetworkInstance flow. sendSyncError() - " + ex.getMessage(), isDebugEnabled) + } + + } + + public void prepareDBRequestError (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + try { + utils.log("DEBUG", " ***** Inside prepareDBRequestError() of UpdateNetworkInstance ***** ", isDebugEnabled) + + String statusMessage = "" + WorkflowException wfe = null + if (execution.getVariable("WorkflowException") instanceof WorkflowException) { + wfe = execution.getVariable("WorkflowException") + statusMessage = wfe.getErrorMessage() + } + + String requestId = execution.getVariable(Prefix + "requestId") + String networkName = execution.getVariable("networkName") !=null ? execution.getVariable("networkName") : "" + String networkId = execution.getVariable("networkId") !=null ? execution.getVariable("networkId") : "" + String dbRequest = + """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> + <soapenv:Header/> + <soapenv:Body> + <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb"> + <requestId>${requestId}</requestId> + <lastModifiedBy>BPMN</lastModifiedBy> + <statusMessage>${statusMessage}</statusMessage> + <responseBody></responseBody> + <requestStatus>FAILED</requestStatus> + <vnfOutputs><network-id>${networkId}</network-id><network-name>${networkName}</network-names></vnfOutputs> + </ns:updateInfraRequest> + </soapenv:Body> + </soapenv:Envelope>""" + + execution.setVariable(Prefix + "createDBRequest", dbRequest) + utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled) + utils.logAudit(dbRequest) + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstance flow. prepareDBRequestError() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + public void prepareCompletion (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " ***** Inside prepareCompletion() of UpdateNetworkInstance ***** ", isDebugEnabled) + + try { + + String requestId = execution.getVariable("mso-request-id") + String source = execution.getVariable(Prefix + "source") + + String msoCompletionRequest = + """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" + xmlns:ns="http://org.openecomp/mso/request/types/v1"> + <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> + <request-id>${requestId}</request-id> + <action>UPDATE</action> + <source>VID</source> + </request-info> + <aetgt:status-message>Network has been updated successfully.</aetgt:status-message> + <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name> + </aetgt:MsoCompletionRequest>""" + + // Format Response + String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest) + + // normal path + execution.setVariable(Prefix + "Success", true) + execution.setVariable(Prefix + "CompleteMsoProcessRequest", xmlMsoCompletionRequest) + utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled) + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstance flow. prepareCompletion() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + + } + + + + + // ************************************************** + // Post or Validate Response Section + // ************************************************** + + public void postProcessResponse (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside postProcessResponse() of UpdateNetworkInstance ***** ", isDebugEnabled) + + try { + + if (execution.getVariable("CMSO_ResponseCode") == "200") { + execution.setVariable(Prefix + "Success", true) + utils.log("DEBUG", " ***** UpdateNetworkInstance Success ***** ", isDebugEnabled) + // Place holder for additional code. + + } else { + execution.setVariable(Prefix + "Success", false) + utils.log("DEBUG", " ***** UpdateNetworkInstance Failed in CompletionMsoProces flow!. ***** ", isDebugEnabled) + + } + + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstance flow. postProcessResponse() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + + } + + + // ******************************* + // Build Error Section + // ******************************* + + public void processRollbackData (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Inside processRollbackData() of UpdateNetworkInstance ***** ", isDebugEnabled) + + try { + //execution.getVariable("orchestrationStatus") + //execution.getVariable("networkId") + //execution.getVariable("networkName") + //networkOutputParams + //rollbackData + //rolledBack + + } catch (Exception ex) { + utils.log("DEBUG", " Bpmn error encountered in UpdateNetworkInstance flow. callDBCatalog() - " + ex.getMessage(), isDebugEnabled) + } + + } + + // Prepare for FalloutHandler + public void buildErrorResponse (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + + utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled) + + String falloutHandlerRequest = "" + String requestId = execution.getVariable("mso-request-id") + + try { + WorkflowException wfe = execution.getVariable("WorkflowException") + String errorCode = String.valueOf(wfe.getErrorCode()) + String errorMessage = wfe.getErrorMessage() + falloutHandlerRequest = + """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" + xmlns:ns="http://org.openecomp/mso/request/types/v1" + xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1"> + <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> + <request-id>${requestId}</request-id> + <action>UPDATE</action> + <source>VID</source> + </request-info> + <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"> + <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage> + <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode> + </aetgt:WorkflowException> + </aetgt:FalloutHandlerRequest>""" + + utils.logAudit(falloutHandlerRequest) + execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest) + utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled) + + } catch (Exception ex) { + String errorException = " Bpmn error encountered in UpdateNetworkInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage() + utils.log("DEBUG", errorException, isDebugEnabled) + falloutHandlerRequest = + """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" + xmlns:ns="http://org.openecomp/mso/request/types/v1" + xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1"> + <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> + <request-id>${requestId}</request-id> + <action>UPDATE</action> + <source>VID</source> + </request-info> + <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"> + <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage> + <aetgt:ErrorCode>7000</aetgt:ErrorCode> + </aetgt:WorkflowException> + </aetgt:FalloutHandlerRequest>""" + + execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest) + utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled) + + } + + } + + public void processJavaException(Execution execution){ + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + try{ + utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled) + utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled) + utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled) + execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated + exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception") + + }catch(Exception e){ + utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled) + execution.setVariable("UnexpectedError", "Exception in processJavaException method - " + Prefix) // Adding this line temporarily until this flows error handling gets updated + exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix) + } + utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled) + } + +} diff --git a/bpmn/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 index a682c4d463..5f0f65bd85 100644 --- 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 @@ -1,37 +1,37 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
*/ - -package org.openecomp.mso.bpmn.infrastructure.scripts; +
+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 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; @@ -195,19 +195,19 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { } 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 { + // 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) @@ -230,7 +230,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { execution.setVariable("UPDNETI_networkOutputs", networkOutputs) utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled) - String requestId = execution.getVariable("mso-request-id") + String requestId = execution.getVariable("mso-request-id")
if (requestId == null || requestId == "") { requestId = execution.getVariable("requestId") } @@ -309,7 +309,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { try { String serviceInstanceId = execution.getVariable("UPDNETI_serviceInstanceId") - String requestId = execution.getVariable("mso-request-id") + String requestId = execution.getVariable("mso-request-id")
// RESTResponse (for API Handler (APIH) Reply Task) String updateNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim() @@ -1094,6 +1094,19 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { execution.setVariable("prefix", Prefix) try { + // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
utils.log("DEBUG", " ***** Inside prepareDBRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled) String networkOutputs = execution.getVariable("UPDNETI_networkOutputs") @@ -1121,7 +1134,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> - <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb"> + <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${requestId}</requestId> <lastModifiedBy>BPMN</lastModifiedBy> <statusMessage>${statusMessage}</statusMessage> @@ -1153,6 +1166,19 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { execution.setVariable("prefix", Prefix) try { + // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
utils.log("DEBUG", " ***** Inside prepareDBRequestError of UpdateNetworkInstanceInfra ***** ", isDebugEnabled) String statusMessage = "" @@ -1190,7 +1216,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> - <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb"> + <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${requestId}</requestId> <lastModifiedBy>BPMN</lastModifiedBy> <statusMessage>${statusMessage}</statusMessage> @@ -1244,7 +1270,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { // prepare rollback data String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","") String rollbackNetwork = - """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network"> + """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network">
${rollbackData} </NetworkAdapter:rollbackNetwork>""" String rollbackNetworkXml = utils.formatXml(rollbackNetwork) @@ -1345,9 +1371,9 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { 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"> + """<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> @@ -1528,15 +1554,15 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { 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"> + """<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:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
<aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage> <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode> </aetgt:WorkflowException> @@ -1550,15 +1576,15 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { String errorException = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage() utils.log("DEBUG", errorException, isDebugEnabled) falloutHandlerRequest = - """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://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"> + """<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:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
<aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage> <aetgt:ErrorCode>7000</aetgt:ErrorCode> </aetgt:WorkflowException> @@ -1578,7 +1604,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { try { - String requestId = execution.getVariable("mso-request-id") + String requestId = execution.getVariable("mso-request-id")
// REST Error (for API Handler (APIH) Reply Task) String syncError = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim() 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 index 8f2eb27b91..d428cc33dd 100644 --- 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 @@ -1,24 +1,24 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; @@ -28,19 +28,21 @@ 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 +import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil +import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.core.RollbackData
public class UpdateVfModule extends AbstractServiceTaskProcessor { - + + ExceptionUtil exceptionUtil = new ExceptionUtil() + /** * Initialize the flow's variables. - * + * * @param execution The flow's execution instance. */ public void initProcessVariables(Execution execution) { @@ -57,11 +59,11 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { 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) { @@ -74,13 +76,13 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { 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')) @@ -96,13 +98,13 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage()) } } - + /** * Prepare and send the synchronous response for this flow. - * + * * @param execution The flow's execution instance. */ public void sendSynchResponse(Execution execution) { @@ -125,7 +127,7 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { startTime = System.currentTimeMillis() } def vnfInputs = execution.getVariable('UPDVfMod_vnfInputs') - + String synchResponse = """ <vnf-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> <request-info> @@ -142,25 +144,25 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { 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()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendSynchResponse(): ' + e.getMessage()) } } - + /** * Prepare the Request for invoking the DoUpdateVfModule subflow. - * + * * NOTE: Currently, the method just logs passing through as the * incoming Request to this main flow is used as the Request to * the DoUpdateVfModule subflow. No preparation processing is * necessary. - * + * * @param execution The flow's execution instance. */ public void prepDoUpdateVfModule(Execution execution) { @@ -171,19 +173,19 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { logDebug('Entered ' + method, isDebugLogEnabled) try { - + logDebug('Exited ' + method, isDebugLogEnabled) } catch (BpmnError e) { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage()) } } - + /** * Prepare the Request for updating the DB for this Infra Request. - * + * * @param execution The flow's execution instance. */ public void prepUpdateInfraRequest(Execution execution) { @@ -199,10 +201,10 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { 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"> + xmlns:req="http://org.openecomp.mso/requestsdb">
<soapenv:Header/> <soapenv:Body> <req:updateInfraRequest> @@ -231,13 +233,13 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage()) } } - + /** * Builds a "CompletionHandler" request and stores it in the specified execution variable. - * + * * @param execution the execution * @param resultVar the execution variable in which the result will be stored */ @@ -251,10 +253,10 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { 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"> + <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> @@ -270,13 +272,13 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 2000, 'Internal Error') + exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error') } } /** * Builds a "FalloutHandler" request and stores it in the specified execution variable. - * + * * @param execution the execution * @param resultVar the execution variable in which the result will be stored */ @@ -287,12 +289,12 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { ')' def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') logDebug('Entered ' + method, isDebugLogEnabled) - + try { def prefix = execution.getVariable('prefix') def request = getVariable(execution, prefix+'Request') def requestInformation = utils.getNodeXml(request, 'request-information', false) - + def WorkflowException workflowException = execution.getVariable("WorkflowException") def errorResponseCode = workflowException.getErrorCode() def errorResponseMsg = workflowException.getErrorMessage() @@ -302,15 +304,15 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { } 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"> + <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
${requestInformation} <sdncadapterworkflow:WorkflowException> <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage> <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode> - </sdncadapterworkflow:WorkflowException> + </sdncadapterworkflow:WorkflowException> </sdncadapterworkflow:FalloutHandlerRequest> """ content = utils.formatXml(content) @@ -323,7 +325,7 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 2000, 'Internal Error') + exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error') } } } diff --git a/bpmn/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 index 8d05f41774..d0949ae4d1 100644 --- 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 @@ -26,7 +26,7 @@ import groovy.util.XmlParser; import groovy.xml.QName import java.io.Serializable; - +import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.runtime.Execution import org.openecomp.mso.rest.APIResponse @@ -39,10 +39,12 @@ import org.openecomp.mso.bpmn.core.WorkflowException public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { - + + ExceptionUtil exceptionUtil = new ExceptionUtil() + /** * Initialize the flow's variables. - * + * * @param execution The flow's execution instance. */ public void initProcessVariables(Execution execution) { @@ -59,11 +61,11 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { execution.setVariable('UPDVfModI_vnfParams', null) execution.setVariable('UPDVfModI_updateInfraRequest', null) execution.setVariable('UpdateVfModuleSuccessIndicator', false) - } - + } + /** * Check for missing elements in the received request. - * + * * @param execution The flow's execution instance. */ public void preProcessRequest(Execution execution) { @@ -72,58 +74,58 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { ')' def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') logDebug('Entered ' + method, isDebugLogEnabled) - + initProcessVariables(execution) - + def prefix = "UPDVfModI_" - + execution.setVariable("isVidRequest", "false") - + def incomingRequest = execution.getVariable('bpmnRequest') - + utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled) - + // check if request is xml or json try { def jsonSlurper = new JsonSlurper() Map reqMap = jsonSlurper.parseText(incomingRequest) utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled) - + def serviceInstanceId = execution.getVariable('serviceInstanceId') def vnfId = execution.getVariable('vnfId') - + def vidUtils = new VidUtils(this) - + String requestInXmlFormat = vidUtils.createXmlVfModuleRequest(execution, reqMap, 'UPDATE_VF_MODULE', serviceInstanceId) - + utils.log("DEBUG", " Request in XML format: " + requestInXmlFormat, isDebugLogEnabled) - + execution.setVariable(prefix + 'Request', requestInXmlFormat) execution.setVariable(prefix+'vnfId', vnfId) - execution.setVariable("isVidRequest", "true") - + execution.setVariable("isVidRequest", "true") + } catch(groovy.json.JsonException je) { utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled) - workflowException(execution, "Invalid request format", 400) - + exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Invalid request format") + } catch(Exception e) { - String restFaultMessage = e.getMessage() + String restFaultMessage = e.getMessage() utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled) - workflowException(execution, restFaultMessage, 400) + exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage) } - + try { - + String request = validateInfraRequest(execution) - + def requestInfo = getRequiredNodeXml(execution, request, 'request-info') execution.setVariable('UPDVfModI_requestInfo', requestInfo) execution.setVariable('UPDVfModI_requestId', getRequiredNodeText(execution, requestInfo, 'request-id')) execution.setVariable('UPDVfModI_source', getNodeTextForce(requestInfo, 'source')) - + def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs') execution.setVariable('UPDVfModI_vnfInputs', vnfInputs) execution.setVariable('UPDVfModI_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id')) @@ -139,13 +141,13 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage()) } } - + /** * Prepare and send the sychronous response for this flow. - * + * * @param execution The flow's execution instance. */ public void sendSynchResponse(Execution execution) { @@ -155,7 +157,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') logDebug('Entered ' + method, isDebugLogEnabled) - + try { def requestInfo = execution.getVariable('UPDVfModI_requestInfo') def requestId = execution.getVariable('UPDVfModI_requestId') @@ -167,12 +169,12 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { def startTime = getNodeTextForce(requestInfo, 'start-time') if (startTime.isEmpty()) { startTime = System.currentTimeMillis() - } - + } + // RESTResponse (for API Handler (APIH) Reply Task) def vfModuleId = execution.getVariable("vfModuleId") String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim() - + sendWorkflowResponse(execution, 200, synchResponse) logDebug('Exited ' + method, isDebugLogEnabled) @@ -180,18 +182,18 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage()) } } - + /** * Prepare the Request for invoking the DoUpdateVfModule subflow. - * + * * NOTE: Currently, the method just logs passing through as the * incoming Request to this main flow is used as the Request to * the DoUpdateVfModule subflow. No preparation processing is * necessary. - * + * * @param execution The flow's execution instance. */ public void prepDoUpdateVfModule(Execution execution) { @@ -202,19 +204,19 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { logDebug('Entered ' + method, isDebugLogEnabled) try { - + logDebug('Exited ' + method, isDebugLogEnabled) } catch (BpmnError e) { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage()) } } - + /** * Prepare the Request for updating the DB for this Infra Request. - * + * * @param execution The flow's execution instance. */ public void prepUpdateInfraRequest(Execution execution) { @@ -230,7 +232,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { def vfModuleId = execution.getVariable('UPDVfModI_vfModuleId') def tenantId = execution.getVariable('UPDVfModI_tenantId') def volumeGroupId = execution.getVariable('UPDVfModI_volumeGroupId') - + String updateInfraRequest = """ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb"> @@ -261,13 +263,13 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage()) } } - + /** * Builds a "CompletionHandler" request and stores it in the specified execution variable. - * + * * @param execution the execution * @param resultVar the execution variable in which the result will be stored */ @@ -281,7 +283,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { 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"> @@ -299,13 +301,13 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 2000, 'Internal Error') + exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error') } } /** * Builds a "FalloutHandler" request and stores it in the specified execution variable. - * + * * @param execution the execution * @param resultVar the execution variable in which the result will be stored */ @@ -316,12 +318,12 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { ')' def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') logDebug('Entered ' + method, isDebugLogEnabled) - + try { def prefix = execution.getVariable('prefix') def request = getVariable(execution, prefix+'Request') def requestInformation = utils.getNodeXml(request, 'request-info', false) - + def WorkflowException workflowException = execution.getVariable("WorkflowException") def errorResponseCode = workflowException.getErrorCode() def errorResponseMsg = workflowException.getErrorMessage() @@ -339,7 +341,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { <sdncadapterworkflow:WorkflowException> <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage> <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode> - </sdncadapterworkflow:WorkflowException> + </sdncadapterworkflow:WorkflowException> </sdncadapterworkflow:FalloutHandlerRequest> """ content = utils.formatXml(content) @@ -351,10 +353,10 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 2000, 'Internal Error') + exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error') } } - + /** * Validates the request, request id and service instance id. If a problem is found, * a WorkflowException is generated and an MSOWorkflowException event is thrown. This @@ -373,7 +375,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { def prefix = execution.getVariable("prefix") if (prefix == null) { - createWorkflowException(execution, 1002, processKey + " prefix is null") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null") } try { @@ -381,34 +383,34 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { if (request == null) { request = execution.getVariable(processKey + 'Request') - + if (request == null) { request = execution.getVariable('bpmnRequest') } - + setVariable(execution, processKey + 'Request', null); setVariable(execution, 'bpmnRequest', null); setVariable(execution, prefix + 'Request', request); } if (request == null) { - createWorkflowException(execution, 1002, processKey + " request is null") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null") } - + /* def requestId = execution.getVariable("mso-request-id") - + if (requestId == null) { - createWorkflowException(execution, 1002, processKey + " request has no mso-request-id") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id") } - + setVariable(execution, prefix + 'requestId', requestId) def serviceInstanceId = execution.getVariable("mso-service-instance-id") if (serviceInstanceId == null) { - createWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id") } utils.logContext(requestId, serviceInstanceId) @@ -420,8 +422,8 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, "Invalid Message") + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message") } } - + } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy index 996fd56e0d..6d532527d0 100644 --- 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 @@ -1,24 +1,24 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; @@ -26,17 +26,20 @@ import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.runtime.Execution import org.apache.commons.lang3.* import org.springframework.web.util.UriUtils -import org.openecomp.mso.bpmn.common.scripts.AaiUtil -import org.openecomp.mso.bpmn.common.scripts.VfModuleBase -import org.openecomp.mso.bpmn.core.WorkflowException -import org.openecomp.mso.bpmn.core.json.JsonUtils; -import org.openecomp.mso.rest.APIResponse +import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
class UpdateVfModuleVolume extends VfModuleBase { - + + ExceptionUtil exceptionUtil = new ExceptionUtil() + /** * Initialize the flow's variables. - * + * * @param execution The flow's execution instance. */ private void initProcessVariables(Execution execution) { @@ -56,10 +59,10 @@ class UpdateVfModuleVolume extends VfModuleBase { 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 @@ -69,16 +72,16 @@ class UpdateVfModuleVolume extends VfModuleBase { ')' 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')) @@ -96,13 +99,13 @@ class UpdateVfModuleVolume extends VfModuleBase { throw bpmnError } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage()) } } /** * Prepare and send the synchronous response. - * + * * @param execution The flow's execution instance. */ public void sendSynchResponse(Execution execution) { @@ -111,7 +114,7 @@ class UpdateVfModuleVolume extends VfModuleBase { ')' def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') logDebug('Entered ' + method, isDebugLogEnabled) - + try { def requestInfo = execution.getVariable('UPDVfModVol_requestInfo') def requestId = execution.getVariable('UPDVfModVol_requestId') @@ -125,9 +128,9 @@ class UpdateVfModuleVolume extends VfModuleBase { startTime = System.currentTimeMillis() } def volumeInputs = execution.getVariable('UPDVfModVol_volumeInputs') - + String synchResponse = """ - <volume-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> + <volume-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-info> <request-id>${requestId}</request-id> <action>UPDATE_VF_MODULE_VOL</action> @@ -147,14 +150,14 @@ class UpdateVfModuleVolume extends VfModuleBase { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in sendSynchResponse(): ' + e.getMessage()) - } + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendSynchResponse(): ' + e.getMessage()) + } } - + /** * Prepare a Request for querying AAI for Volume Group information using the * Volume Group Id and Aic Cloud Region. - * + * * @param execution The flow's execution instance. */ public void queryAAIForVolumeGroup(Execution execution) { @@ -173,7 +176,7 @@ class UpdateVfModuleVolume extends VfModuleBase { 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() @@ -181,7 +184,7 @@ class UpdateVfModuleVolume extends VfModuleBase { 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) @@ -205,10 +208,10 @@ class UpdateVfModuleVolume extends VfModuleBase { throw e; } catch (Exception e) { logError('Caught exception in ' + method, e) - createWorkflowException(execution, 1002, 'Error in queryAAIForVolumeGroup(): ' + e.getMessage()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIForVolumeGroup(): ' + e.getMessage()) } } - + /** * Prepare a Request for invoking the VnfAdapterRest subflow to do * a Volume Group update. @@ -221,22 +224,22 @@ class UpdateVfModuleVolume extends VfModuleBase { ')' 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 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) @@ -266,17 +269,17 @@ class UpdateVfModuleVolume extends VfModuleBase { 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()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepVnfAdapterRest(): ' + e.getMessage()) } } - + /** * Prepare a Request for updating the DB for this Infra request. * @@ -291,10 +294,10 @@ class UpdateVfModuleVolume extends VfModuleBase { 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"> + xmlns:req="http://org.openecomp.mso/requestsdb">
<soapenv:Header/> <soapenv:Body> <req:updateInfraRequest> @@ -310,20 +313,20 @@ class UpdateVfModuleVolume extends VfModuleBase { 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()) + exceptionUtil.buildWorkflowException(execution, 1002, 'Error in prepDbInfraDbRequest(): ' + e.getMessage()) } } - + /** * Build a "CompletionHandler" request. - * + * * @param execution The flow's execution instance. */ public void prepCompletionHandlerRequest(Execution execution) { @@ -332,13 +335,13 @@ class UpdateVfModuleVolume extends VfModuleBase { ')' 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"> + <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> @@ -348,19 +351,19 @@ class UpdateVfModuleVolume extends VfModuleBase { 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()) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepCompletionHandlerRequest(): ' + e.getMessage()) } } - + /** * Build a "FalloutHandler" request. - * + * * @param execution The flow's execution instance. */ public void prepFalloutHandler(Execution execution) { @@ -372,7 +375,7 @@ class UpdateVfModuleVolume extends VfModuleBase { try { def requestInfo = execution.getVariable('UPDVfModVol_requestInfo') - + def WorkflowException workflowException = execution.getVariable("WorkflowException") def errorResponseCode = workflowException.getErrorCode() def errorResponseMsg = workflowException.getErrorMessage() @@ -382,35 +385,35 @@ class UpdateVfModuleVolume extends VfModuleBase { } 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"> + <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: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()) + exceptionUtil.buildWorkflowException(execution, 1002, 'Error in prepFalloutHandler(): ' + e.getMessage()) } } - + /** * Create a WorkflowException for the error case where the Tenant Id from * AAI did not match the Tenant Id in the incoming request. - * + * * @param execution The flow's execution instance. */ public void handleTenantIdMismatch(Execution execution) { @@ -419,21 +422,21 @@ class UpdateVfModuleVolume extends VfModuleBase { ')' 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 index 2f716f5668..ffe122aed6 100644 --- 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 @@ -1,549 +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("&", "&").replace("<", "<").replace(">", ">") - } - - 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) - } - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import groovy.json.JsonSlurper
+
+import java.util.concurrent.ExecutionException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.springframework.web.util.UriUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ private void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'UPDVfModVol_')
+ execution.setVariable('UPDVfModVol_Request', null)
+ execution.setVariable('UPDVfModVol_requestInfo', null)
+ execution.setVariable('UPDVfModVol_requestId', null)
+ execution.setVariable('UPDVfModVol_source', null)
+ execution.setVariable('UPDVfModVol_volumeInputs', null)
+ execution.setVariable('UPDVfModVol_volumeGroupId', null)
+ execution.setVariable('UPDVfModVol_vnfType', null)
+ execution.setVariable('UPDVfModVol_serviceId', null)
+ execution.setVariable('UPDVfModVol_aicCloudRegion', null)
+ execution.setVariable('UPDVfModVol_tenantId', null)
+ execution.setVariable('UPDVfModVol_volumeParams', null)
+ execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', null)
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', null)
+ execution.setVariable('UpdateVfModuleVolumeSuccessIndicator', false)
+ }
+
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ public void preProcessRequest(Execution execution, isDebugLogEnabled) {
+
+ initProcessVariables(execution)
+ String jsonRequest = validateRequest(execution)
+
+ def request = ""
+
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(jsonRequest)
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ //def vnfId = execution.getVariable('vnfId')
+
+ def vidUtils = new VidUtils(this)
+ request = vidUtils.createXmlVolumeRequest(reqMap, 'UPDATE_VF_MODULE_VOL', serviceInstanceId, volumeGroupId)
+
+ execution.setVariable('UPDVfModVol_Request', request)
+ execution.setVariable("UPDVfModVol_isVidRequest", true)
+
+ //need to get persona-model-id aka model-invariantId to use later to validate vf-module relation in AAI
+
+ def modelInvariantId = reqMap.requestDetails.modelInfo.modelInvariantId ?: ''
+ execution.setVariable('UPDVfModVol_modelInvariantId', modelInvariantId)
+
+ utils.log("DEBUG", "XML request:\n" + request, isDebugLogEnabled)
+ }
+ catch(groovy.json.JsonException je) {
+ utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
+ // assume request is in XML format - proceed as usual to process XML request
+ }
+
+ def requestId = execution.getVariable('mso-request-id')
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('UPDVfModVol_requestInfo', requestInfo)
+ execution.setVariable('UPDVfModVol_requestId', requestId)
+ //execution.setVariable('UPDVfModVol_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('UPDVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+ def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+ execution.setVariable('UPDVfModVol_volumeInputs', volumeInputs)
+ execution.setVariable('UPDVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+ execution.setVariable('UPDVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+ execution.setVariable('UPDVfModVol_vnfVersion', getRequiredNodeText(execution, volumeInputs, 'asdc-service-model-version'))
+ execution.setVariable('UPDVfModVol_serviceId', utils.getNodeText1(volumeInputs, 'service-id'))
+ execution.setVariable('UPDVfModVol_aicCloudRegion', getRequiredNodeText(execution, volumeInputs, 'aic-cloud-region'))
+ execution.setVariable('UPDVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+ //execution.setVariable('UPDVfModVol_modelCustomizationId', getRequiredNodeText(execution, volumeInputs, 'model-customization-id'))
+
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ def volumeParams = utils.getNodeXml(request, 'volume-params')
+ execution.setVariable('UPDVfModVol_volumeParams', volumeParams)
+ }
+
+ /**
+ * Prepare and send the synchronous response.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(Execution execution, isDebugLogEnabled) {
+
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def source = execution.getVariable('UPDVfModVol_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+ def volumeInputs = execution.getVariable('UPDVfModVol_volumeInputs')
+
+ String xmlSyncResponse = """
+ <volume-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>UPDATE_VF_MODULE_VOL</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${progress}</progress>
+ <start-time>${startTime}</start-time>
+ <source>${source}</source>
+ </request-info>
+ ${volumeInputs}
+ </volume-request>
+ """
+
+ def syncResponse = ''
+ def isVidRequest = execution.getVariable('UPDVfModVol_isVidRequest')
+
+ if(isVidRequest) {
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+ }
+ else {
+ syncResponse = utils.formatXml(xmlSyncResponse)
+ }
+
+ logDebug('Sync response: ' + syncResponse, isDebugLogEnabled)
+ execution.setVariable('UPDVfModVol_syncResponseSent', true)
+ sendWorkflowResponse(execution, 200, syncResponse)
+ }
+
+ /**
+ * Prepare a Request for querying AAI for Volume Group information using the
+ * Volume Group Id and Aic Cloud Region.
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIForVolumeGroup(Execution execution, isDebugLogEnabled) {
+
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(aicCloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+ logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query volume group by id return code: " + returnCode)
+ utils.logAudit("AAI query volume group by id response: " + aaiResponseAsString)
+
+ logDebug("AAI Volume Group return code: " + returnCode, isDebugLogEnabled)
+ logDebug("AAI Volume Group response: " + aaiResponseAsString, isDebugLogEnabled)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((returnCode == '200') || (returnCode == '204')) {
+
+ execution.setVariable('UPDVfModVol_aaiVolumeGroupResponse', aaiResponseAsString)
+ //def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+ //execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', heatStackId)
+
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+ if (volumeGroupTenantId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id " + volumeGroupId
+ + ", AIC Cloud Region " + aicCloudRegion)
+ }
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ logDebug("Received Tenant Id " + volumeGroupTenantId + " from AAI for Volume Group with Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion, isDebugLogEnabled)
+
+ def relatedVfModuleLink = getRelatedVfModuleRelatedLink(aaiResponseAsString)
+ logDebug("Related VF Module link: " + relatedVfModuleLink, isDebugLogEnabled)
+ execution.setVariable('UPDVfModVol_relatedVfModuleLink', relatedVfModuleLink)
+
+ }
+ else if (returnCode == '404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group " + volumeGroupId + " not found at AAI")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ /**
+ * Query AAI service instance
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void queryAAIForGenericVnf(Execution execution, isDebugEnabled) {
+
+ def vnfId = execution.getVariable('vnfId')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getNetworkGenericVnfEndpoint(execution)
+ def String queryAAIRequest = aaiEndpoint + "/" + UriUtils.encode(vnfId, "UTF-8")
+
+ utils.logAudit("AAI query generic vnf request: " + queryAAIRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query generic vnf return code: " + returnCode)
+ utils.logAudit("AAI query generic vnf response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode=='200') {
+ utils.log("DEBUG", 'Generic vnf ' + vnfId + ' found in AAI.', isDebugEnabled)
+ execution.setVariable('UPDVfModVol_AAIQueryGenericVfnResponse', aaiResponseAsString)
+ } else {
+ if (returnCode=='404') {
+ def message = 'Generic vnf ' + vnfId + ' was not found in AAI. Return code: 404.'
+ utils.log("DEBUG", message, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ /**
+ * Query AAI for VF Module using vf-module-id
+ * @param execution
+ * @param isDebugLogEnabled
+ */
+ public void queryAAIForVfModule(Execution execution, isDebugLogEnabled) {
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String queryAAIVfModuleRequest = execution.getVariable('UPDVfModVol_relatedVfModuleLink')
+ execution.setVariable('UPDVfModVol_personaModelId', '')
+
+ utils.logAudit('Query AAI VF Module: ' + queryAAIVfModuleRequest)
+ logDebug('Query AAI VF Module: ' + queryAAIVfModuleRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVfModuleRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query vf-module: " + returnCode)
+ utils.logAudit("AAI query vf-module response: " + aaiResponseAsString)
+
+ logDebug("AAI query vf-module:: " + returnCode, isDebugLogEnabled)
+ logDebug("AAI query vf-module response: " + aaiResponseAsString, isDebugLogEnabled)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((returnCode == '200') || (returnCode == '204')) {
+ def personaModelId = utils.getNodeText1(aaiResponseAsString, 'persona-model-id')
+ execution.setVariable('UPDVfModVol_personaModelId', personaModelId)
+ }
+ else if (returnCode == '404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "VF Module not found at AAI")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ /**
+ *
+ */
+ public String getRelatedVfModuleRelatedLink(xml) {
+ def list = new XmlSlurper().parseText(xml)
+ def vfModuleRelationship = list.'**'.find { node -> node.'related-to'.text() == 'vf-module' }
+ return vfModuleRelationship?.'related-link'?.text() ?: ''
+ }
+
+ /**
+ * Prepare a Request for invoking the VnfAdapterRest subflow to do
+ * a Volume Group update.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepVnfAdapterRest(Execution execution, isDebugLogEnabled) {
+
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+
+ def aaiVolumeGroupResponse = execution.getVariable('UPDVfModVol_aaiVolumeGroupResponse')
+ def volumeGroupHeatStackId = getNodeTextForce(aaiVolumeGroupResponse, 'heat-stack-id')
+ def volumeGroupName = getNodeTextForce(aaiVolumeGroupResponse, 'volume-group-name')
+ def modelCustomizationId = getNodeTextForce(aaiVolumeGroupResponse, 'vf-module-persona-model-customization-id')
+
+ def vnfType = execution.getVariable('UPDVfModVol_vnfType')
+ def vnfVersion = execution.getVariable('UPDVfModVol_vnfVersion')
+
+ def aaiGenericVnfResponse = execution.getVariable('UPDVfModVol_AAIQueryGenericVfnResponse')
+ def vnfId = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-id')
+ def vnfName = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-name')
+
+
+ def volumeParamsXml = execution.getVariable('UPDVfModVol_volumeParams')
+ def volumeGroupParams = transformVolumeParamsToEntries(volumeParamsXml)
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def serviceId = execution.getVariable('UPDVfModVol_serviceId')
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <updateVolumeGroupRequest>
+ <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vnfName>${vnfName}</vnfName>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupName>${volumeGroupName}</volumeGroupName>
+ <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion>${vnfVersion}</vnfVersion>
+ <vfModuleType></vfModuleType>
+ <modelCustomizationUuid>${modelCustomizationId}</modelCustomizationUuid>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>${vnfId}</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>${vnfName}</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>${volumeGroupId}</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>${volumeGroupName}</value>
+ </entry>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </updateVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+ }
+
+ /**
+ * Prepare a Request for updating the DB for this Infra request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDbInfraDbRequest(Execution execution, isDebugLogEnabled) {
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfModVol_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+ }
+
+ /**
+ * Build a "CompletionHandler" request.
+ * @param execution The flow's execution instance.
+ */
+ public void prepCompletionHandlerRequest(Execution execution, requestId, action, source, isDebugLogEnabled) {
+
+ String content = """
+ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: UPDATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ logDebug('Request for Completion Handler:\n' + content, isDebugLogEnabled)
+ execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
+ }
+
+
+ /**
+ * Build a "FalloutHandler" request.
+ * @param execution The flow's execution instance.
+ */
+ public void prepFalloutHandler(Execution execution, isDebugLogEnabled) {
+
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg.replace("&", "&").replace("<", "<").replace(">", ">")
+ }
+
+ 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 index 2f1ca17c0d..07ec8ff5dc 100644 --- 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 @@ -1,58 +1,58 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.mso.bpmn.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..."); - - } - -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 index 0a35f5220f..09454f0876 100644 --- 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 @@ -1,50 +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; - } - } -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 index 79eafbe5d8..84a9bae051 100644 --- 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 @@ -1,57 +1,57 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.mso.bpmn.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; - } -} +/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 index 62fcfadca7..8e87f47ddc 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml @@ -1,37 +1,37 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ============LICENSE_START======================================================= - ECOMP MSO - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============LICENSE_END========================================================= - --> - -<persistence version="2.0" - xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation=" - http://java.sun.com/xml/ns/persistence - http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> - - <persistence-unit name="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> +<?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 index 511ba0ae3d..4053de8e28 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml @@ -1,81 +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> +<?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 index 133fa54003..7c9e0282d4 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml @@ -1,159 +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{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" /> - <property name="debugPattern" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", 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> +<!--
+ ============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{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
+ <property name="debugPattern" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", 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 index 1f5318224b..7b9b8212e5 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn @@ -1,1203 +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 & 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 Network 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 ServiceInstance " 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 VNF and Modules " 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 VNF and Modules " 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 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 Service " 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 for Service (DB Catalog) " 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 Create Service " 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 Create Service " 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> +<?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 & 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 Network 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 ServiceInstance " 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 VNF and Modules " 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 VNF and Modules " 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 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 Service " 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 for Service (DB Catalog) " 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 Create Service " 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 Create Service " 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 index e86d287e27..52627a5e33 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn @@ -121,6 +121,7 @@ CreateNetworkInstance.prepareDBRequestError(execution)]]></bpmn2:script> <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> @@ -369,4 +370,4 @@ CreateNetworkInstance.sendSyncResponse(execution)]]></bpmn2:script> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions> +</bpmn2:definitions>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn index d8e8dfda30..fa114c5e76 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn @@ -8,7 +8,7 @@ <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.* + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.* ExceptionUtil ex = new ExceptionUtil() ex.processJavaException(execution)]]></bpmn2:script> </bpmn2:scriptTask> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn index 7e5a1cd497..7a8133ec7f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn @@ -1,22 +1,22 @@ <?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:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_pNTO8MRhEeWv36YLr7PC3Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn"> <bpmn2:process id="CreateVfModuleInfra" name="CreateVfModuleInfra" isExecutable="true"> <bpmn2:startEvent id="StartEvent_1" name="Start"> <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" /> + <bpmn2: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" /> + <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> @@ -28,17 +28,17 @@ def createVfModule = new CreateVfModuleInfra() createVfModule.sendResponse(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="SendResponse" targetRef="DoCreateVfModuleSubprocess" /> + <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:linkEventDefinition id="_LinkEventDefinition_34" name="FinishLine"/> </bpmn2:intermediateThrowEvent> - <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="DoCreateVfModuleSubprocess" targetRef="IntermediateThrowEvent_1" /> + <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:linkEventDefinition id="_LinkEventDefinition_35" name="FinishLine"/> </bpmn2:intermediateCatchEvent> - <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="IntermediateCatchEvent_1" targetRef="PrepareUpdateInfraRequest" /> + <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> @@ -49,12 +49,12 @@ createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script> <bpmn2:serviceTask id="ServiceTask_1" name="Update Infra Request"> <bpmn2:extensionElements> <camunda:connector> + <camunda:connectorId>http-connector</camunda:connectorId> <camunda:inputOutput> <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter> <camunda:inputParameter name="headers"> <camunda:map> <camunda:entry key="content-type">application/soap+xml</camunda:entry> - <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry> </camunda:map> </camunda:inputParameter> <camunda:inputParameter name="payload">${CVFMI_updateInfraRequest}</camunda:inputParameter> @@ -62,14 +62,13 @@ createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script> <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: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> @@ -77,15 +76,15 @@ createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script> def createVfModule = new CreateVfModuleInfra() createVfModule.postProcessResponse(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PrepareMSOCompletionHandler" targetRef="MSOCompletionHandler" /> + <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" /> + <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> @@ -95,13 +94,13 @@ createVfModule.postProcessResponse(execution)]]></bpmn2:script> <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="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: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"> @@ -111,37 +110,37 @@ createVfModule.postProcessResponse(execution)]]></bpmn2:script> def createVfModule = new CreateVfModuleInfra() createVfModule.validateRollbackResponse(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ValidateRollbackResponse" targetRef="InclusiveGateway_1" /> + <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" /> + <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: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:errorEventDefinition id="ErrorEventDefinition_1"/> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_2" targetRef="ExclusiveGateway_1" /> + <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" /> + <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: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:terminateEventDefinition id="_TerminateEventDefinition_11"/> </bpmn2:endEvent> <bpmn2:scriptTask id="PrepareFalloutHandler" name="Prepare Fallout Handler" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming> @@ -150,19 +149,19 @@ createVfModule.validateRollbackResponse(execution)]]></bpmn2:script> def cvfm = new CreateVfModuleInfra() cvfm.falloutHandlerPrep(execution, 'CVFMI_FalloutHandlerRequest')]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PrepareFalloutHandler" targetRef="FalloutHandler" /> + <bpmn2:sequenceFlow id="SequenceFlow_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: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: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> @@ -173,7 +172,7 @@ cvfm.logAndSaveOriginalException(execution)]]></bpmn2:script> <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: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> @@ -182,18 +181,18 @@ cvfm.logAndSaveOriginalException(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:endEvent id="EndEvent_1"> <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming> - <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_10" /> + <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: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:errorEventDefinition id="_ErrorEventDefinition_3"/> </bpmn2:boundaryEvent> - <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_4" /> + <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:terminateEventDefinition id="_TerminateEventDefinition_12"/> </bpmn2:endEvent> <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming> @@ -202,272 +201,272 @@ cvfm.logAndSaveOriginalException(execution)]]></bpmn2:script> def createVfModule = new CreateVfModuleInfra() createVfModule.preProcessRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PreProcessRequest" targetRef="SendResponse" /> + <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" /> + <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/> + <bpmn2:error id="Error_2" errorCode="RESTFault" name="REST Fault"/> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleInfra"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1"> - <dc:Bounds x="41" y="231" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="41.0" y="231.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124"> - <di:waypoint xsi:type="dc:Point" x="77" y="249" /> - <di:waypoint xsi:type="dc:Point" x="226" y="249" /> + <di:waypoint xsi:type="dc:Point" x="77.0" y="249.0"/> + <di:waypoint xsi:type="dc:Point" x="226.0" y="249.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="99" y="249" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="99.0" y="249.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest"> - <dc:Bounds x="226" y="209" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="226.0" y="209.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="SendResponse"> - <dc:Bounds x="432" y="209" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="432.0" y="209.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ServiceTask_86"> - <di:waypoint xsi:type="dc:Point" x="326" y="249" /> - <di:waypoint xsi:type="dc:Point" x="432" y="249" /> + <di:waypoint xsi:type="dc:Point" x="326.0" y="249.0"/> + <di:waypoint xsi:type="dc:Point" x="432.0" y="249.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="348" y="249" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="348.0" y="249.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="DoCreateVfModuleSubprocess"> - <dc:Bounds x="612" y="209" width="145" height="80" /> + <dc:Bounds height="80.0" width="145.0" x="612.0" y="209.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_178"> - <di:waypoint xsi:type="dc:Point" x="532" y="249" /> - <di:waypoint xsi:type="dc:Point" x="612" y="249" /> + <di:waypoint xsi:type="dc:Point" x="532.0" y="249.0"/> + <di:waypoint xsi:type="dc:Point" x="612.0" y="249.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_47" bpmnElement="IntermediateThrowEvent_1"> - <dc:Bounds x="823" y="231" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="823.0" y="231.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="841" y="272" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="841.0" y="272.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_IntermediateThrowEvent_47"> - <di:waypoint xsi:type="dc:Point" x="756" y="249" /> - <di:waypoint xsi:type="dc:Point" x="823" y="249" /> + <di:waypoint xsi:type="dc:Point" x="756.0" y="249.0"/> + <di:waypoint xsi:type="dc:Point" x="823.0" y="249.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_32" bpmnElement="IntermediateCatchEvent_1"> - <dc:Bounds x="39" y="349" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="39.0" y="349.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="25" y="390" width="65" height="22" /> + <dc:Bounds height="22.0" width="65.0" x="25.0" y="390.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="PrepareUpdateInfraRequest"> - <dc:Bounds x="127" y="327" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="127.0" y="327.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_1"> - <dc:Bounds x="277" y="327" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="277.0" y="327.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_179" bpmnElement="UpdateInfraRequestResponseCheck" isMarkerVisible="true"> - <dc:Bounds x="443" y="341" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="443.0" y="341.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="435" y="308" width="68" height="22" /> + <dc:Bounds height="22.0" width="68.0" x="435.0" y="308.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="PrepareMSOCompletionHandler"> - <dc:Bounds x="552" y="327" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="552.0" y="327.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="MSOCompletionHandler"> - <dc:Bounds x="708" y="327" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="708.0" y="327.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_1"> - <dc:Bounds x="1020" y="349" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="1020.0" y="349.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1038" y="390" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="1038.0" y="390.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_2"> - <dc:Bounds x="452" y="469" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="452.0" y="469.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="470" y="510" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="470.0" y="510.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_IntermediateCatchEvent_32" targetElement="_BPMNShape_ScriptTask_219"> - <di:waypoint xsi:type="dc:Point" x="75" y="367" /> - <di:waypoint xsi:type="dc:Point" x="127" y="367" /> + <di:waypoint xsi:type="dc:Point" x="75.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="127.0" y="367.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="105" y="367" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="105.0" y="367.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_219" targetElement="_BPMNShape_ServiceTask_103"> - <di:waypoint xsi:type="dc:Point" x="227" y="367" /> - <di:waypoint xsi:type="dc:Point" x="277" y="367" /> + <di:waypoint xsi:type="dc:Point" x="227.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="277.0" y="367.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ExclusiveGateway_179"> - <di:waypoint xsi:type="dc:Point" x="377" 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" /> + <di:waypoint xsi:type="dc:Point" x="377.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="410.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="410.0" y="366.0"/> + <di:waypoint xsi:type="dc:Point" x="443.0" y="366.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="407" y="366" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="407.0" y="366.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="updateInfraRequestResponseBad" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_EndEvent_178"> - <di:waypoint xsi:type="dc:Point" x="468" 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" /> + <di:waypoint xsi:type="dc:Point" x="468.0" y="391.0"/> + <di:waypoint xsi:type="dc:Point" x="469.0" y="421.0"/> + <di:waypoint xsi:type="dc:Point" x="470.0" y="421.0"/> + <di:waypoint xsi:type="dc:Point" x="470.0" y="469.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="459" y="419" width="20" height="22" /> + <dc:Bounds height="22.0" width="20.0" x="459.0" y="419.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="updateInfraRequestResponseGood" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_ScriptTask_220"> - <di:waypoint xsi:type="dc:Point" x="493" 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" /> + <di:waypoint xsi:type="dc:Point" x="493.0" y="366.0"/> + <di:waypoint xsi:type="dc:Point" x="523.0" y="366.0"/> + <di:waypoint xsi:type="dc:Point" x="523.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="552.0" y="367.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="510" y="367" width="27" height="22" /> + <dc:Bounds height="22.0" width="27.0" x="510.0" y="367.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_220" targetElement="_BPMNShape_ScriptTask_221"> - <di:waypoint xsi:type="dc:Point" x="652" y="367" /> - <di:waypoint xsi:type="dc:Point" x="708" y="367" /> + <di:waypoint xsi:type="dc:Point" x="652.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="708.0" y="367.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="678" y="367" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="678.0" y="367.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="ErrorHandler" isExpanded="true"> - <dc:Bounds x="48" y="540" width="925" height="385" /> + <dc:Bounds height="385.0" width="925.0" x="48.0" y="540.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2"> - <dc:Bounds x="72" y="844" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="72.0" y="844.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="60" y="886" width="98" height="22" /> + <dc:Bounds height="22.0" width="98.0" x="60.0" y="886.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_222" bpmnElement="PrepareFalloutHandler"> - <dc:Bounds x="564" y="672" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="564.0" y="672.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_223" bpmnElement="FalloutHandler"> - <dc:Bounds x="708" y="672" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="708.0" y="672.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_3"> - <dc:Bounds x="864" y="694" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="864.0" y="694.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="882" y="735" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="882.0" y="735.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_44" bpmnElement="BoundaryEvent_1"> - <dc:Bounds x="955" y="690" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="955.0" y="690.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="970" y="731" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="970.0" y="731.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_4"> - <dc:Bounds x="1049" y="690" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="1049.0" y="690.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1067" y="731" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="1067.0" y="731.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_222" targetElement="_BPMNShape_ScriptTask_223"> - <di:waypoint xsi:type="dc:Point" x="664" y="712" /> - <di:waypoint xsi:type="dc:Point" x="708" y="712" /> + <di:waypoint xsi:type="dc:Point" x="664.0" y="712.0"/> + <di:waypoint xsi:type="dc:Point" x="708.0" y="712.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="689" y="712" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="689.0" y="712.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_223" targetElement="_BPMNShape_EndEvent_179"> - <di:waypoint xsi:type="dc:Point" x="808" y="712" /> - <di:waypoint xsi:type="dc:Point" x="864" y="712" /> + <di:waypoint xsi:type="dc:Point" x="808.0" y="712.0"/> + <di:waypoint xsi:type="dc:Point" x="864.0" y="712.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="836" y="712" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="836.0" y="712.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_BoundaryEvent_44" targetElement="_BPMNShape_EndEvent_180"> - <di:waypoint xsi:type="dc:Point" x="991" y="708" /> - <di:waypoint xsi:type="dc:Point" x="1049" y="708" /> + <di:waypoint xsi:type="dc:Point" x="991.0" y="708.0"/> + <di:waypoint xsi:type="dc:Point" x="1049.0" y="708.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1015" y="708" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1015.0" y="708.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="SetSuccessIndicator"> - <dc:Bounds x="858" y="328" width="103" height="79" /> + <dc:Bounds height="79.0" width="103.0" x="858.0" y="328.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_241"> - <di:waypoint xsi:type="dc:Point" x="808" y="367" /> - <di:waypoint xsi:type="dc:Point" x="858" y="367" /> + <di:waypoint xsi:type="dc:Point" x="808.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="858.0" y="367.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_241" targetElement="_BPMNShape_EndEvent_177"> - <di:waypoint xsi:type="dc:Point" x="960" y="367" /> - <di:waypoint xsi:type="dc:Point" x="1020" y="367" /> + <di:waypoint xsi:type="dc:Point" x="960.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="1020.0" y="367.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true"> - <dc:Bounds x="205" y="836" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="205.0" y="836.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="193" y="901" width="102" height="22" /> + <dc:Bounds height="22.0" width="102.0" x="193.0" y="901.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ValidateRollbackResponse"> - <dc:Bounds x="312" y="554" width="103" height="79" /> + <dc:Bounds height="79.0" width="103.0" x="312.0" y="554.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_25" bpmnElement="InclusiveGateway_1"> - <dc:Bounds x="459" y="686" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="459.0" y="686.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="484" y="741" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="484.0" y="741.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ExclusiveGateway_223"> - <di:waypoint xsi:type="dc:Point" x="108" 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" /> + <di:waypoint xsi:type="dc:Point" x="108.0" y="862.0"/> + <di:waypoint xsi:type="dc:Point" x="156.0" y="862.0"/> + <di:waypoint xsi:type="dc:Point" x="156.0" y="861.0"/> + <di:waypoint xsi:type="dc:Point" x="205.0" y="861.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="153" y="862" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="153.0" y="862.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="isRollbackOnNoSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_InclusiveGateway_25"> - <di:waypoint xsi:type="dc:Point" x="255" 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" /> + <di:waypoint xsi:type="dc:Point" x="255.0" y="861.0"/> + <di:waypoint xsi:type="dc:Point" x="354.0" y="861.0"/> + <di:waypoint xsi:type="dc:Point" x="354.0" y="711.0"/> + <di:waypoint xsi:type="dc:Point" x="459.0" y="711.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="324" y="866" width="20" height="22" /> + <dc:Bounds height="22.0" width="20.0" x="324.0" y="866.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_266" targetElement="_BPMNShape_InclusiveGateway_25"> - <di:waypoint xsi:type="dc:Point" x="414" y="593" /> - <di:waypoint xsi:type="dc:Point" x="484" y="593" /> - <di:waypoint xsi:type="dc:Point" x="484" y="686" /> + <di:waypoint xsi:type="dc:Point" x="414.0" y="593.0"/> + <di:waypoint xsi:type="dc:Point" x="484.0" y="593.0"/> + <di:waypoint xsi:type="dc:Point" x="484.0" y="686.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="462" y="593" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="462.0" y="593.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_InclusiveGateway_25" targetElement="_BPMNShape_ScriptTask_222"> - <di:waypoint xsi:type="dc:Point" x="509" 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" /> + <di:waypoint xsi:type="dc:Point" x="509.0" y="711.0"/> + <di:waypoint xsi:type="dc:Point" x="527.0" y="711.0"/> + <di:waypoint xsi:type="dc:Point" x="527.0" y="712.0"/> + <di:waypoint xsi:type="dc:Point" x="564.0" y="712.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="533" y="712" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="533.0" y="712.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="ScriptTask_1"> - <dc:Bounds x="179" y="554" width="103" height="79" /> + <dc:Bounds height="79.0" width="103.0" x="179.0" y="554.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_267" targetElement="_BPMNShape_ScriptTask_266"> - <di:waypoint xsi:type="dc:Point" x="281" y="593" /> - <di:waypoint xsi:type="dc:Point" x="312" y="593" /> + <di:waypoint xsi:type="dc:Point" x="281.0" y="593.0"/> + <di:waypoint xsi:type="dc:Point" x="312.0" y="593.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="294" y="593" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="294.0" y="593.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_283" bpmnElement="LogAndSaveOriginalException"> - <dc:Bounds x="179" y="693" width="103" height="79" /> + <dc:Bounds height="79.0" width="103.0" x="179.0" y="693.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="IsRollbackOnYesSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_283"> - <di:waypoint xsi:type="dc:Point" x="230" y="836" /> - <di:waypoint xsi:type="dc:Point" x="230" y="771" /> + <di:waypoint xsi:type="dc:Point" x="230.0" y="836.0"/> + <di:waypoint xsi:type="dc:Point" x="230.0" y="771.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="240" y="804" width="27" height="22" /> + <dc:Bounds height="22.0" width="27.0" x="240.0" y="804.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_283" targetElement="_BPMNShape_ScriptTask_267"> - <di:waypoint xsi:type="dc:Point" x="230" y="693" /> - <di:waypoint xsi:type="dc:Point" x="230" y="632" /> + <di:waypoint xsi:type="dc:Point" x="230.0" y="693.0"/> + <di:waypoint xsi:type="dc:Point" x="230.0" y="632.0"/> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions> +</bpmn2:definitions>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn index 5c8074e01e..0fc889bfd6 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn @@ -1,16 +1,16 @@ <?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:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_CyftwG_HEeaKe-v4u9MasA" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn"> <bpmn2:process id="CreateVfModuleVolumeInfraV1" name="CreateVfModuleVolumeInfraV1" isExecutable="true"> <bpmn2:startEvent id="StartEvent_createVfModuleVolumeInfraV1"> <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_createVfModuleVolumeInfraV1" targetRef="ScriptTask_preProcessRequest" /> + <bpmn2: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:errorEventDefinition id="ErrorEventDefinition_2"/> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="StartEvent_catchErrors" targetRef="ExclusiveGateway_isSyncResponseSent" /> + <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> @@ -26,8 +26,8 @@ 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: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> @@ -37,24 +37,24 @@ 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: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" /> + <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: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:terminateEventDefinition id="TerminateEventDefinition_2"/> </bpmn2:endEvent> </bpmn2:subProcess> <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy"> @@ -64,7 +64,7 @@ createVfModuleVolumeInfraV1.executeMethod('prepareFalloutHandlerRequest', execut 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: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> @@ -72,7 +72,7 @@ createVfModuleVolumeInfraV1.executeMethod('preProcessRequest', execution, isDebu 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: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> @@ -81,7 +81,7 @@ createVfModuleVolumeInfraV1.executeMethod('sendSyncResponse', execution, isDebug <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: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> @@ -89,40 +89,40 @@ createVfModuleVolumeInfraV1.executeMethod('sendSyncResponse', execution, isDebug 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: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: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" /> + <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" /> + <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: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> @@ -130,20 +130,20 @@ createVfModuleVolumeInfraV1.executeMethod('buildWorkflowException', execution, 2 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: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" /> + <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: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> @@ -151,33 +151,32 @@ createVfModuleVolumeInfraV1.executeMethod('setSuccessIndicator', execution, true 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:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_postCompletionRequest" targetRef="CallActivity_completeMsoProcess"/> <bpmn2:serviceTask id="ServiceTask_callDbInfraUpdate" name="Call DB Infra Update"> <bpmn2:extensionElements> <camunda:connector> + <camunda:connectorId>http-connector</camunda:connectorId> <camunda:inputOutput> <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter> <camunda:inputParameter name="payload">${CVMVINFRAV1_createDBRequest}</camunda:inputParameter> <camunda:inputParameter name="headers"> <camunda:map> <camunda:entry key="content-type">application/soap+xml</camunda:entry> - <camunda: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: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:terminateEventDefinition id="TerminateEventDefinition_1"/> </bpmn2:endEvent> <bpmn2:scriptTask id="ScriptTask_prepareDbInfraRequest" name="Prepare DB Infra Request" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming> @@ -186,20 +185,20 @@ createVfModuleVolumeInfraV1.executeMethod('postProcessResponse', execution, isDe def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1() createVfModuleVolumeInfraV1.executeMethod('prepareDbInfraSuccessRequest', execution, isDebugLogEnabled)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="ServiceTask_callDbInfraUpdate" /> + <bpmn2:sequenceFlow id="SequenceFlow_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_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: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: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> @@ -208,274 +207,274 @@ createVfModuleVolumeInfraV1.executeMethod('prepareDbInfraSuccessRequest', execut 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:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ScriptTask_buildServiceInstanceNotFoundError" targetRef="EndEvent_serviceInstanceNotFound"/> </bpmn2:process> - <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleVolumeInfraV1"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_67" bpmnElement="StartEvent_createVfModuleVolumeInfraV1"> - <dc:Bounds x="144" y="156" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="144.0" y="156.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="162" y="197" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="162.0" y="197.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_67" targetElement="_BPMNShape_ScriptTask_300"> - <di:waypoint xsi:type="dc:Point" x="180" y="174" /> - <di:waypoint xsi:type="dc:Point" x="252" y="174" /> + <di:waypoint xsi:type="dc:Point" x="180.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="252.0" y="174.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="219" y="174" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="219.0" y="174.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="ScriptTask_preProcessRequest"> - <dc:Bounds x="252" y="134" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="252.0" y="134.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="ScriptTask_sendSyncAckResponse"> - <dc:Bounds x="408" y="134" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="408.0" y="134.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_249" bpmnElement="ExclusiveGateway_isVolGrpnamePresent" isMarkerVisible="true"> - <dc:Bounds x="589" y="148" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="589.0" y="148.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="521" y="203" width="186" height="22" /> + <dc:Bounds height="22.0" width="186.0" x="521.0" y="203.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="ScriptTask_buildError"> - <dc:Bounds x="565" y="264" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="565.0" y="264.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_36" bpmnElement="CallActivity_doCreateVfModuleVolumeV1"> - <dc:Bounds x="996" y="134" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="996.0" y="134.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_volGrpNamePresent" sourceElement="_BPMNShape_ExclusiveGateway_249" targetElement="_BPMNShape_CallActivity_51"> - <di:waypoint xsi:type="dc:Point" x="639" 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" /> + <di:waypoint xsi:type="dc:Point" x="639.0" y="173.0"/> + <di:waypoint xsi:type="dc:Point" x="685.0" y="173.0"/> + <di:waypoint xsi:type="dc:Point" x="685.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="720.0" y="174.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="680" y="173" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="680.0" y="173.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_249"> - <di:waypoint xsi:type="dc:Point" x="508" y="174" /> - <di:waypoint xsi:type="dc:Point" x="589" y="173" /> + <di:waypoint xsi:type="dc:Point" x="508.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="589.0" y="173.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="547" y="173" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="547.0" y="173.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_300" targetElement="_BPMNShape_ScriptTask_301"> - <di:waypoint xsi:type="dc:Point" x="352" y="174" /> - <di:waypoint xsi:type="dc:Point" x="408" y="174" /> + <di:waypoint xsi:type="dc:Point" x="352.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="408.0" y="174.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="371" y="174" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="371.0" y="174.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_volGrpNameMissing" sourceElement="_BPMNShape_ExclusiveGateway_249" targetElement="_BPMNShape_ScriptTask_302"> - <di:waypoint xsi:type="dc:Point" x="614" y="198" /> - <di:waypoint xsi:type="dc:Point" x="615" y="264" /> + <di:waypoint xsi:type="dc:Point" x="614.0" y="198.0"/> + <di:waypoint xsi:type="dc:Point" x="615.0" y="264.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="612" y="234" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="612.0" y="234.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_233" bpmnElement="EndEvent_2"> - <dc:Bounds x="598" y="389" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="598.0" y="389.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="616" y="430" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="616.0" y="430.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_302" targetElement="_BPMNShape_EndEvent_233"> - <di:waypoint xsi:type="dc:Point" x="615" y="344" /> - <di:waypoint xsi:type="dc:Point" x="616" y="389" /> + <di:waypoint xsi:type="dc:Point" x="615.0" y="344.0"/> + <di:waypoint xsi:type="dc:Point" x="616.0" y="389.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="613" y="370" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="613.0" y="370.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_3"> - <dc:Bounds x="1898" y="156" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="1898.0" y="156.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1916" y="197" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="1916.0" y="197.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_exceptionHandler" isExpanded="true"> - <dc:Bounds x="133" y="471" width="856" height="337" /> + <dc:Bounds height="337.0" width="856.0" x="133.0" y="471.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_catchErrors"> - <dc:Bounds x="204" y="555" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="204.0" y="555.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="168" y="596" width="109" height="22" /> + <dc:Bounds height="22.0" width="109.0" x="168.0" y="596.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_4"> - <dc:Bounds x="876" y="555" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="876.0" y="555.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="924" y="562" width="29" height="22" /> + <dc:Bounds height="22.0" width="29.0" x="924.0" y="562.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_304" bpmnElement="ScriptTask_prepareDbInfraRequest"> - <dc:Bounds x="1160" y="134" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1160.0" y="134.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_callDbInfraUpdate"> - <dc:Bounds x="1298" y="135" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1298.0" y="135.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="ScriptTask_postCompletionRequest"> - <dc:Bounds x="1442" y="136" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1442.0" y="136.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_37" bpmnElement="CallActivity_completeMsoProcess"> - <dc:Bounds x="1598" y="135" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1598.0" y="135.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_36" targetElement="_BPMNShape_ScriptTask_304"> - <di:waypoint xsi:type="dc:Point" x="1096" y="174" /> - <di:waypoint xsi:type="dc:Point" x="1160" y="174" /> + <di:waypoint xsi:type="dc:Point" x="1096.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="1160.0" y="174.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1115" y="174" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1115.0" y="174.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_304" targetElement="_BPMNShape_ServiceTask_103"> - <di:waypoint xsi:type="dc:Point" x="1260" y="174" /> - <di:waypoint xsi:type="dc:Point" x="1298" y="175" /> + <di:waypoint xsi:type="dc:Point" x="1260.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="1298.0" y="175.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1374" y="175" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1374.0" y="175.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ScriptTask_305"> - <di:waypoint xsi:type="dc:Point" x="1398" y="175" /> - <di:waypoint xsi:type="dc:Point" x="1442" y="176" /> + <di:waypoint xsi:type="dc:Point" x="1398.0" y="175.0"/> + <di:waypoint xsi:type="dc:Point" x="1442.0" y="176.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1417" y="176" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1417.0" y="176.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_305" targetElement="_BPMNShape_CallActivity_37"> - <di:waypoint xsi:type="dc:Point" x="1542" y="176" /> - <di:waypoint xsi:type="dc:Point" x="1598" y="175" /> + <di:waypoint xsi:type="dc:Point" x="1542.0" y="176.0"/> + <di:waypoint xsi:type="dc:Point" x="1598.0" y="175.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1653" y="176" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1653.0" y="176.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="ScriptTask_setSuccessIndicator"> - <dc:Bounds x="1742" y="134" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1742.0" y="134.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_37" targetElement="_BPMNShape_ScriptTask_306"> - <di:waypoint xsi:type="dc:Point" x="1698" y="175" /> - <di:waypoint xsi:type="dc:Point" x="1742" y="174" /> + <di:waypoint xsi:type="dc:Point" x="1698.0" y="175.0"/> + <di:waypoint xsi:type="dc:Point" x="1742.0" y="174.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1767" y="174" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1767.0" y="174.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_306" targetElement="_BPMNShape_EndEvent_234"> - <di:waypoint xsi:type="dc:Point" x="1842" 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" /> + <di:waypoint xsi:type="dc:Point" x="1842.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="1866.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="1866.0" y="175.0"/> + <di:waypoint xsi:type="dc:Point" x="1898.0" y="174.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1963" y="175" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1963.0" y="175.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ExclusiveGateway_251"> - <di:waypoint xsi:type="dc:Point" x="240" 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" /> + <di:waypoint xsi:type="dc:Point" x="240.0" y="573.0"/> + <di:waypoint xsi:type="dc:Point" x="286.0" y="573.0"/> + <di:waypoint xsi:type="dc:Point" x="286.0" y="572.0"/> + <di:waypoint xsi:type="dc:Point" x="348.0" y="572.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="286" y="572" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="286.0" y="572.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_307" bpmnElement="ScriptTask_prefalloutHandlerRequest"> - <dc:Bounds x="576" y="533" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="576.0" y="533.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_50" bpmnElement="CallActivity_callFalloutHandler"> - <dc:Bounds x="720" y="533" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="720.0" y="533.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_307" targetElement="_BPMNShape_CallActivity_50"> - <di:waypoint xsi:type="dc:Point" x="676" y="573" /> - <di:waypoint xsi:type="dc:Point" x="720" y="573" /> + <di:waypoint xsi:type="dc:Point" x="676.0" y="573.0"/> + <di:waypoint xsi:type="dc:Point" x="720.0" y="573.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="694" y="573" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="694.0" y="573.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_50" targetElement="_BPMNShape_EndEvent_235"> - <di:waypoint xsi:type="dc:Point" x="820" y="573" /> - <di:waypoint xsi:type="dc:Point" x="876" y="573" /> + <di:waypoint xsi:type="dc:Point" x="820.0" y="573.0"/> + <di:waypoint xsi:type="dc:Point" x="876.0" y="573.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="842" y="573" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="842.0" y="573.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_251" bpmnElement="ExclusiveGateway_isSyncResponseSent" isMarkerVisible="true"> - <dc:Bounds x="348" y="547" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="348.0" y="547.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="309" y="602" width="129" height="22" /> + <dc:Bounds height="22.0" width="129.0" x="309.0" y="602.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_syncResponseSent" sourceElement="_BPMNShape_ExclusiveGateway_251" targetElement="_BPMNShape_ScriptTask_307"> - <di:waypoint xsi:type="dc:Point" x="398" 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" /> + <di:waypoint xsi:type="dc:Point" x="398.0" y="572.0"/> + <di:waypoint xsi:type="dc:Point" x="493.0" y="572.0"/> + <di:waypoint xsi:type="dc:Point" x="493.0" y="573.0"/> + <di:waypoint xsi:type="dc:Point" x="576.0" y="573.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="450" y="572" width="29" height="22" /> + <dc:Bounds height="22.0" width="29.0" x="450.0" y="572.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="ScriptTask_sendSyncErrorResp"> - <dc:Bounds x="324" y="672" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="324.0" y="672.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_syncResponseNotSent" sourceElement="_BPMNShape_ExclusiveGateway_251" targetElement="_BPMNShape_ScriptTask_308"> - <di:waypoint xsi:type="dc:Point" x="373" 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" /> + <di:waypoint xsi:type="dc:Point" x="373.0" y="597.0"/> + <di:waypoint xsi:type="dc:Point" x="373.0" y="634.0"/> + <di:waypoint xsi:type="dc:Point" x="374.0" y="634.0"/> + <di:waypoint xsi:type="dc:Point" x="374.0" y="672.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="363" y="634" width="22" height="22" /> + <dc:Bounds height="22.0" width="22.0" x="363.0" y="634.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_ScriptTask_307"> - <di:waypoint xsi:type="dc:Point" x="424" 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" /> + <di:waypoint xsi:type="dc:Point" x="424.0" y="712.0"/> + <di:waypoint xsi:type="dc:Point" x="608.0" y="712.0"/> + <di:waypoint xsi:type="dc:Point" x="626.0" y="712.0"/> + <di:waypoint xsi:type="dc:Point" x="626.0" y="613.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="530" y="712" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="530.0" y="712.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_51" bpmnElement="CallActivity_callGenericGetSI"> - <dc:Bounds x="720" y="134" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="720.0" y="134.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true"> - <dc:Bounds x="887" y="148" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="887.0" y="148.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="912" y="203" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="912.0" y="203.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_51" targetElement="_BPMNShape_ExclusiveGateway_254"> - <di:waypoint xsi:type="dc:Point" x="820" 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" /> + <di:waypoint xsi:type="dc:Point" x="820.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="853.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="853.0" y="173.0"/> + <di:waypoint xsi:type="dc:Point" x="887.0" y="173.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_serviceInstanceFound" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_CallActivity_36"> - <di:waypoint xsi:type="dc:Point" x="937" 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" /> + <di:waypoint xsi:type="dc:Point" x="937.0" y="173.0"/> + <di:waypoint xsi:type="dc:Point" x="966.0" y="173.0"/> + <di:waypoint xsi:type="dc:Point" x="966.0" y="174.0"/> + <di:waypoint xsi:type="dc:Point" x="996.0" y="174.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_serviceInstanceNotFound"> - <dc:Bounds x="895" y="389" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="895.0" y="389.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="913" y="430" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="913.0" y="430.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_serviceInstanceNotFound" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ScriptTask_312"> - <di:waypoint xsi:type="dc:Point" x="912" y="198" /> - <di:waypoint xsi:type="dc:Point" x="912" y="264" /> + <di:waypoint xsi:type="dc:Point" x="912.0" y="198.0"/> + <di:waypoint xsi:type="dc:Point" x="912.0" y="264.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="919" y="226" width="22" height="22" /> + <dc:Bounds height="22.0" width="22.0" x="919.0" y="226.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="ScriptTask_buildServiceInstanceNotFoundError"> - <dc:Bounds x="862" y="264" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="862.0" y="264.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_312" targetElement="_BPMNShape_EndEvent_237"> - <di:waypoint xsi:type="dc:Point" x="912" y="344" /> - <di:waypoint xsi:type="dc:Point" x="913" y="389" /> + <di:waypoint xsi:type="dc:Point" x="912.0" y="344.0"/> + <di:waypoint xsi:type="dc:Point" x="913.0" y="389.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="910" y="370" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="910.0" y="370.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions> +</bpmn2:definitions>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn index f98f8eda03..e8d27b6014 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn @@ -45,7 +45,7 @@ createVnf.sendSyncResponse(execution)]]></bpmn2:script> <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.* + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.* ExceptionUtil exceptionUtil = new ExceptionUtil() exceptionUtil.processJavaException(execution)]]></bpmn2:script> </bpmn2:scriptTask> @@ -60,7 +60,7 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script> <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
FalloutHandler" calledElement="FalloutHandler"> + <bpmn2:callActivity id="callFalloutHandler" name="Call
FalloutHandler" calledElement="FalloutHandler"> <bpmn2:extensionElements> <camunda:in source="CREVI_falloutRequest" target="FalloutHandlerRequest" /> <camunda:in source="CREVI_requestId" target="requestId" /> @@ -109,7 +109,7 @@ createVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script> <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming> <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" /> </bpmn2:endEvent> - <bpmn2:callActivity id="callCompletionHandler" name="Completion
Handler" calledElement="CompleteMsoProcess"> + <bpmn2:callActivity id="callCompletionHandler" name="Completion
Handler" calledElement="CompleteMsoProcess"> <bpmn2:extensionElements> <camunda:in source="CREVI_completionHandlerRequest" target="CompleteMsoProcessRequest" /> <camunda:in source="CREVI_requestId" target="mso-request-id" /> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn index 6d47b1a9ba..4488e8de1c 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn @@ -8,7 +8,7 @@ <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.* + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.* ExceptionUtil ex = new ExceptionUtil() ex.processJavaException(execution)]]></bpmn2:script> </bpmn2:scriptTask> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn index 3bd8b91abd..eeb32599d3 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn @@ -1,771 +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 & 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 Network 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 ServiceInstance " 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 VNF and Modules " 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 Service Instance" calledElement="GenericGetService"> - <bpmn2:extensionElements> - <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:in source="GENGS_type" target="GENGS_type" /> - <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" /> - <camunda:out source="GENGS_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 & 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> +<?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 & 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 Network 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 ServiceInstance " 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 VNF and Modules " 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 Service Instance" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="GENGS_type" target="GENGS_type" />
+ <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
+ <camunda:out source="GENGS_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 & 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 index 8c37d212c3..951ae3c0b5 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn @@ -1,370 +1,371 @@ -<?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> - <bpmn2:process id="DeleteNetworkInstance" name="DeleteNetworkInstance" isExecutable="true"> - <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow"> - <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing> - </bpmn2:startEvent> - <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> - <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def networkMod = new DeleteNetworkInstance() -networkMod.processJavaException(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" /> - <bpmn2:startEvent id="StartEvent_1"> - <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing> - <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" /> - </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" /> - <bpmn2:endEvent id="EndEvent_1"> - <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming> - </bpmn2:endEvent> - </bpmn2:subProcess> - <bpmn2:callActivity id="doDeleteNetworkInstance_CallActivity" name="DoDelete Network Instance " 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 " 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 " 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> +<?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 " 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 " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x3znm5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doDeleteNetworkInstance_CallActivity" targetRef="ScriptTask_0cihgpv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0x3znm5" sourceRef="ScriptTask_09qt0pi" targetRef="EndEvent_0o440av" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ablr60</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def preProcess = new DeleteNetworkInstance()
+preProcess.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ablr60" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_19xbdbu" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.prepareCompletion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1akfe0b" name="Prepare DB Infra Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s5niqb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.prepareDBRequestError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_0sztuly" name="Call DB Infra Error Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${DELNI_deleteDBRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="DELNI_deleteDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELNI_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1s5niqb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06s5eu4</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_06s5eu4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.buildErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s5niqb" sourceRef="ScriptTask_1akfe0b" targetRef="ServiceTask_0sztuly" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06s5eu4" sourceRef="ServiceTask_0sztuly" targetRef="ScriptTask_1hql91g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_1akfe0b" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="ScriptTask_09qt0pi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0rt8wax" sourceRef="Task_19xbdbu" targetRef="Task_1nko5zz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doDeleteNetworkInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_19xbdbu" name="Get Network Model Info " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ablr60</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0rt8wax</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.getNetworkModelInfo(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0rt8wax</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
+ <dc:Bounds x="3" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="-8" y="786" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="25" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="43" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="140" y="841" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="301" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="319" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
+ <di:waypoint xsi:type="dc:Point" x="61" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="881" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
+ <di:waypoint xsi:type="dc:Point" x="240" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="301" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="275" y="881" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doDeleteNetworkInstance_CallActivity">
+ <dc:Bounds x="673" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1408" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="115" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09qt0pi_di" bpmnElement="ScriptTask_09qt0pi">
+ <dc:Bounds x="1253" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="773" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="920" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="847" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x3znm5_di" bpmnElement="SequenceFlow_0x3znm5">
+ <di:waypoint xsi:type="dc:Point" x="1353" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1381" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="139" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="39" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="104" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ablr60_di" bpmnElement="SequenceFlow_1ablr60">
+ <di:waypoint xsi:type="dc:Point" x="239" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="342" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="291" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="920" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="1086" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1akfe0b_di" bpmnElement="ScriptTask_1akfe0b">
+ <dc:Bounds x="189" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0sztuly_di" bpmnElement="ServiceTask_0sztuly">
+ <dc:Bounds x="384" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="1020" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1086" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1053" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="563" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="738" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="-13" y="353" width="1021" height="404" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="83" y="547" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="101" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="913" y="547" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="931" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s5niqb_di" bpmnElement="SequenceFlow_1s5niqb">
+ <di:waypoint xsi:type="dc:Point" x="289" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="337" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06s5eu4_di" bpmnElement="SequenceFlow_06s5eu4">
+ <di:waypoint xsi:type="dc:Point" x="484" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="524" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="663" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="838" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="913" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="876" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1186" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1253" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1220" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="119" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="154" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rt8wax_di" bpmnElement="SequenceFlow_0rt8wax">
+ <di:waypoint xsi:type="dc:Point" x="442" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="515" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="479" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="615" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="673" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gpvlh8_di" bpmnElement="Task_19xbdbu">
+ <dc:Bounds x="342" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="515" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn index b974bd01aa..04369acba0 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn @@ -83,7 +83,6 @@ dvfm.completionHandlerPrep(execution, 'DELVfModI_CompletionHandlerRequest') <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> @@ -327,4 +326,4 @@ dvfm.falloutHandlerPrep(execution, 'DELVfModI_FalloutHandlerRequest') </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions>
\ No newline at end of file +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn index 163e50be23..d0051de976 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn @@ -203,7 +203,6 @@ execution.setVariable("DELVfModVol_TransactionSuccessIndicator", true)]]></bpmn2 <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> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn index 765bb1ffa6..b5b10a0fda 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn @@ -33,7 +33,7 @@ String falloutHandlerRequest = ex.processMainflowsBPMNException(execution, reque 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
Handler" calledElement="FalloutHandler"> + <bpmn2:callActivity id="callFalloutHandler" name="Fallout
Handler" calledElement="FalloutHandler"> <bpmn2:extensionElements> <camunda:in source="DELVI_falloutHandlerRequest" target="FalloutHandlerRequest" /> <camunda:in source="DELVI_requestId" target="requestId" /> @@ -87,7 +87,7 @@ 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
Handler" calledElement="CompleteMsoProcess"> + <bpmn2:callActivity id="callCompletionHandler" name="Completion
Handler" calledElement="CompleteMsoProcess"> <bpmn2:extensionElements> <camunda:in source="DELVI_completionHandlerRequest" target="CompleteMsoProcessRequest" /> <camunda:in source="DELVI_requestId" target="mso-request-id" /> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn new file mode 100644 index 0000000000..a19e0c632b --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn @@ -0,0 +1,372 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="UpdateNetworkInstance" name="UpdateNetworkInstance" isExecutable="true"> + <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> + <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def networkMod = new UpdateNetworkInstance() +networkMod.processJavaException(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" /> + <bpmn2:startEvent id="StartEvent_1"> + <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" /> + </bpmn2:startEvent> + <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" /> + <bpmn2:endEvent id="EndEvent_1"> + <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming> + </bpmn2:endEvent> + </bpmn2:subProcess> + <bpmn2:callActivity id="doUpdateNetworkInstance_CallActivity" name="DoUpdate Network Instance " calledElement="DoUpdateNetworkInstance"> + <bpmn2:extensionElements> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:out source="rollbackData" target="rollbackData" /> + <camunda:in source="networkId" target="networkId" /> + <camunda:in source="networkName" target="networkName" /> + <camunda:in source="networkModelInfo" target="networkModelInfo" /> + <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" /> + <camunda:in source="tenantId" target="tenantId" /> + <camunda:in source="productFamilyId" target="productFamilyId" /> + <camunda:in source="disableRollback" target="disableRollback" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:in source="networkInputParams" target="networkInputParams" /> + <camunda:out source="rolledBack" target="rolledBack" /> + <camunda:out source="networkId" target="networkId" /> + <camunda:out source="networkName" target="networkName" /> + <camunda:out source="networkOutputParams" target="networkOutputParams" /> + <camunda:in source="bpmnRequest" target="bpmnRequest" /> + <camunda:in source="failIfExists" target="failIfExists" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:in source="requestId" target="requestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="requestAction" target="requestAction" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> + <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:endEvent id="EndEvent_0o440av" name="End"> + <bpmn2:incoming>SequenceFlow_0x3znm5</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:scriptTask id="ScriptTask_09qt0pi" name="CreateNetwork PostProcess Success " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0x3znm5</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def UpdateNetworkInstance = new UpdateNetworkInstance() +UpdateNetworkInstance.postProcessResponse(execution) +]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doUpdateNetworkInstance_CallActivity" targetRef="ScriptTask_0cihgpv" /> + <bpmn2:sequenceFlow id="SequenceFlow_0x3znm5" sourceRef="ScriptTask_09qt0pi" targetRef="EndEvent_0o440av" /> + <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="PreProcess Incoming Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1ablr60</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def preProcess = new UpdateNetworkInstance() +preProcess.preProcessRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_0pvcr6j" /> + <bpmn2:sequenceFlow id="SequenceFlow_1ablr60" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_19xbdbu" /> + <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def UpdateNetworkInstance = new UpdateNetworkInstance() +UpdateNetworkInstance.prepareCompletion(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess"> + <bpmn2:extensionElements> + <camunda:in source="UPDNI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" /> + <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" /> + <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" /> + <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true"> + <bpmn2:startEvent id="StartEvent_110xxgx"> + <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing> + <bpmn2:errorEventDefinition errorRef="Error_2" /> + </bpmn2:startEvent> + <bpmn2:endEvent id="EndEvent_1rqikib"> + <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:scriptTask id="ScriptTask_1akfe0b" name="Prepare DB Infra Error" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1s5niqb</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def UpdateNetworkInstance = new UpdateNetworkInstance() +UpdateNetworkInstance.prepareDBRequestError(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:serviceTask id="ServiceTask_0sztuly" name="Call DB Infra Error Update"> + <bpmn2:extensionElements> + <camunda:connector> + <camunda:inputOutput> + <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter> + <camunda:inputParameter name="payload">${UPDNI_createDBRequest}</camunda:inputParameter> + <camunda:inputParameter name="headers"> + <camunda:map> + <camunda:entry key="content-type">application/soap+xml</camunda:entry> + </camunda:map> + </camunda:inputParameter> + <camunda:inputParameter name="method">POST</camunda:inputParameter> + <camunda:outputParameter name="UPDNI_createDBResponse">${response}</camunda:outputParameter> + <camunda:outputParameter name="UPDNI_dbReturnCode">${statusCode}</camunda:outputParameter> + </camunda:inputOutput> + <camunda:connectorId>http-connector</camunda:connectorId> + </camunda:connector> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1s5niqb</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_06s5eu4</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare FalloutHandler" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_06s5eu4</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def UpdateNetworkInstance = new UpdateNetworkInstance() +UpdateNetworkInstance.buildErrorResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandlerV1" calledElement="FalloutHandler"> + <bpmn2:extensionElements> + <camunda:in source="UPDNI_FalloutHandlerRequest" target="FalloutHandlerRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" /> + <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" /> + <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_1s5niqb" sourceRef="ScriptTask_1akfe0b" targetRef="ServiceTask_0sztuly" /> + <bpmn2:sequenceFlow id="SequenceFlow_06s5eu4" sourceRef="ServiceTask_0sztuly" targetRef="ScriptTask_1hql91g" /> + <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" /> + <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" /> + <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_1akfe0b" /> + </bpmn2:subProcess> + <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="ScriptTask_09qt0pi" /> + <bpmn2:sequenceFlow id="SequenceFlow_0rt8wax" sourceRef="Task_19xbdbu" targetRef="Task_1nko5zz" /> + <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doUpdateNetworkInstance_CallActivity" /> + <bpmn2:scriptTask id="Task_19xbdbu" name="Get Network Model Info " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1ablr60</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0rt8wax</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def UpdateNetworkInstance = new UpdateNetworkInstance() +UpdateNetworkInstance.getNetworkModelInfo(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0rt8wax</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def UpdateNetworkInstance = new UpdateNetworkInstance() +UpdateNetworkInstance.sendSyncResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkInstance"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent"> + <dc:Bounds x="3" y="79" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-3" y="120" width="48" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true"> + <dc:Bounds x="-8" y="786" width="394" height="188" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1"> + <dc:Bounds x="25" y="863" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="43" y="904" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1"> + <dc:Bounds x="140" y="841" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1"> + <dc:Bounds x="301" y="863" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="319" y="904" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270"> + <di:waypoint xsi:type="dc:Point" x="61" y="881" /> + <di:waypoint xsi:type="dc:Point" x="140" y="881" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="103" y="881" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220"> + <di:waypoint xsi:type="dc:Point" x="240" y="881" /> + <di:waypoint xsi:type="dc:Point" x="301" y="881" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="275" y="881" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doUpdateNetworkInstance_CallActivity"> + <dc:Bounds x="692" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av"> + <dc:Bounds x="1408" y="79" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1419" y="115" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_09qt0pi_di" bpmnElement="ScriptTask_09qt0pi"> + <dc:Bounds x="1253" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp"> + <di:waypoint xsi:type="dc:Point" x="792" y="97" /> + <di:waypoint xsi:type="dc:Point" x="907" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="850" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0x3znm5_di" bpmnElement="SequenceFlow_0x3znm5"> + <di:waypoint xsi:type="dc:Point" x="1353" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1408" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1381" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j"> + <dc:Bounds x="139" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l"> + <di:waypoint xsi:type="dc:Point" x="39" y="97" /> + <di:waypoint xsi:type="dc:Point" x="89" y="97" /> + <di:waypoint xsi:type="dc:Point" x="89" y="97" /> + <di:waypoint xsi:type="dc:Point" x="139" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="104" y="97" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ablr60_di" bpmnElement="SequenceFlow_1ablr60"> + <di:waypoint xsi:type="dc:Point" x="239" y="97" /> + <di:waypoint xsi:type="dc:Point" x="306" y="97" /> + <di:waypoint xsi:type="dc:Point" x="306" y="97" /> + <di:waypoint xsi:type="dc:Point" x="372" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="321" y="97" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv"> + <dc:Bounds x="907" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre"> + <dc:Bounds x="1071" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1akfe0b_di" bpmnElement="ScriptTask_1akfe0b"> + <dc:Bounds x="189" y="525" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0sztuly_di" bpmnElement="ServiceTask_0sztuly"> + <dc:Bounds x="384" y="525" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq"> + <di:waypoint xsi:type="dc:Point" x="1007" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1071" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1039" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g"> + <dc:Bounds x="563" y="525" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz"> + <dc:Bounds x="738" y="525" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true"> + <dc:Bounds x="-13" y="353" width="1021" height="404" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx"> + <dc:Bounds x="83" y="547" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="101" y="588" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib"> + <dc:Bounds x="913" y="547" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="931" y="588" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1s5niqb_di" bpmnElement="SequenceFlow_1s5niqb"> + <di:waypoint xsi:type="dc:Point" x="289" y="565" /> + <di:waypoint xsi:type="dc:Point" x="384" y="565" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="337" y="550" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_06s5eu4_di" bpmnElement="SequenceFlow_06s5eu4"> + <di:waypoint xsi:type="dc:Point" x="484" y="565" /> + <di:waypoint xsi:type="dc:Point" x="563" y="565" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="524" y="550" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f"> + <di:waypoint xsi:type="dc:Point" x="663" y="565" /> + <di:waypoint xsi:type="dc:Point" x="738" y="565" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="701" y="550" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv"> + <di:waypoint xsi:type="dc:Point" x="838" y="565" /> + <di:waypoint xsi:type="dc:Point" x="913" y="565" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="876" y="550" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd"> + <di:waypoint xsi:type="dc:Point" x="1171" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1253" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1212" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf"> + <di:waypoint xsi:type="dc:Point" x="119" y="565" /> + <di:waypoint xsi:type="dc:Point" x="189" y="565" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="154" y="550" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0rt8wax_di" bpmnElement="SequenceFlow_0rt8wax"> + <di:waypoint xsi:type="dc:Point" x="472" y="97" /> + <di:waypoint xsi:type="dc:Point" x="558" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="515" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn"> + <di:waypoint xsi:type="dc:Point" x="658" y="97" /> + <di:waypoint xsi:type="dc:Point" x="692" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="675" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1gpvlh8_di" bpmnElement="Task_19xbdbu"> + <dc:Bounds x="372" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz"> + <dc:Bounds x="558" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn index bba8b6f7a7..f49149b709 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn"> <bpmn2:process id="UpdateNetworkInstanceInfra" name="UpdateNetworkInstanceInfra" isExecutable="true"> <bpmn2:startEvent id="updateNetwork_startEvent" name="Start Flow"> <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="updateNetwork_startEvent" targetRef="preProcessRequest_ScriptTask" /> + <bpmn2: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> @@ -13,7 +13,7 @@ def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.prepareSDNCRequest(execution) ]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity" /> + <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> @@ -26,56 +26,56 @@ UpdateNetworkInstanceInfra.validateSDNCResponse(execution)]]></bpmn2:script> <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="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: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:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2"/> </bpmn2:boundaryEvent> - <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent" /> + <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: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" /> + <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: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" /> + <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 & Completion Request" scriptFormat="groovy"> + <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask"/> + <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process & 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: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> @@ -85,12 +85,12 @@ UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script> <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: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:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2"/> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="isRollbackOn_Network_ExclusiveGateway" /> + <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> @@ -99,13 +99,13 @@ UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script> <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: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_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> @@ -118,7 +118,7 @@ UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script> <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: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> @@ -126,13 +126,13 @@ UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script> def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="sdncTopoRollback_IntermediateThrowEvent" /> + <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:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/> </bpmn2:intermediateThrowEvent> - <bpmn2:sequenceFlow id="SequenceFlow_55" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="validateRollbacksResponse_ScriptTask_2" /> + <bpmn2: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> @@ -140,16 +140,16 @@ UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:scrip 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:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/> <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update"> <bpmn2:extensionElements> <camunda:connector> + <camunda:connectorId>http-connector</camunda:connectorId> <camunda:inputOutput> <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter> <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter> <camunda:inputParameter name="headers"> <camunda:map> - <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry> <camunda:entry key="content-type">application/soap+xml</camunda:entry> </camunda:map> </camunda:inputParameter> @@ -157,28 +157,27 @@ UpdateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script> <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: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" /> + <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:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/> <bpmn2:endEvent id="EndEvent_4"> <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming> </bpmn2:endEvent> @@ -190,14 +189,14 @@ UpdateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script> 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: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: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> @@ -206,7 +205,7 @@ def buildErrorResponse = new UpdateNetworkInstanceInfra() buildErrorResponse.buildErrorResponse(execution) ]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity" /> + <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> @@ -215,7 +214,7 @@ buildErrorResponse.buildErrorResponse(execution) def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQuery2NetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_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> @@ -223,7 +222,7 @@ UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:scri 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: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> @@ -233,16 +232,16 @@ UpdateNetworkInstanceInfra.prepareDBRequest(execution) ]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/> <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update"> <bpmn2:extensionElements> <camunda:connector> + <camunda:connectorId>http-connector</camunda:connectorId> <camunda:inputOutput> <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter> <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter> <camunda:inputParameter name="headers"> <camunda:map> - <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry> <camunda:entry key="content-type">application/soap+xml</camunda:entry> </camunda:map> </camunda:inputParameter> @@ -250,28 +249,27 @@ UpdateNetworkInstanceInfra.prepareDBRequest(execution) <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: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" /> + <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:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/> <bpmn2:endEvent id="EndEvent_3"> <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming> </bpmn2:endEvent> @@ -283,12 +281,12 @@ UpdateNetworkInstanceInfra.prepareDBRequest(execution) def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.processJavaException(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" /> + <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/> <bpmn2:startEvent id="StartEvent_1"> <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing> - <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" /> + <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1"/> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" /> + <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> @@ -301,7 +299,7 @@ def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.preProcessRequest(execution) ]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_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> @@ -309,7 +307,7 @@ UpdateNetworkInstanceInfra.preProcessRequest(execution) def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_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> @@ -317,19 +315,19 @@ UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(execution)]]></bpmn2:scri def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_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: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.* + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.* ExceptionUtil exceptionUtil = new ExceptionUtil() exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2" /> + <bpmn2: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> @@ -338,21 +336,21 @@ exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found <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
Service
Instance" calledElement="GenericGetService"> + <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound"/> + <bpmn2:callActivity id="callGetServiceInstance" name="Get
Service
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" /> + <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: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> @@ -360,7 +358,7 @@ exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance" /> + <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> @@ -368,10 +366,11 @@ UpdateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script> def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateUpdatePONetwork_ScriptTask" targetRef="callRESTReQuery2NetworkID_ScriptTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateUpdatePONetwork_ScriptTask" targetRef="callRESTReQuery2NetworkID_ScriptTask"/> <bpmn2:serviceTask id="callUpdateNetwork_ServiceTask" name="Call Update Network"> <bpmn2:extensionElements> <camunda:connector> + <camunda:connectorId>http-connector</camunda:connectorId> <camunda:inputOutput> <camunda:inputParameter name="payload">${UPDNETI_updateNetworkRequest}</camunda:inputParameter> <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}/${UPDNETI_networkId}</camunda:inputParameter> @@ -385,13 +384,12 @@ UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(execution)]]></bpmn2:sc <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: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> @@ -400,7 +398,7 @@ def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(execution) ]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callUpdateNetwork_ServiceTask" /> + <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> @@ -408,7 +406,7 @@ UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(execution) def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_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> @@ -416,7 +414,7 @@ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2: def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callRESTReQuery1NetworkID_ScriptTask" targetRef="callRESTQueryVpnBinding_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> @@ -424,7 +422,7 @@ UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:scri def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_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> @@ -432,585 +430,585 @@ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn 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: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" /> + <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/> + <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkInstanceInfra"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="updateNetwork_startEvent"> - <dc:Bounds x="192" y="185" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="192.0" y="185.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="193" y="226" width="34" height="22" /> + <dc:Bounds height="22.0" width="34.0" x="193.0" y="226.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask"> - <dc:Bounds x="350" y="163" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="350.0" y="163.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61"> - <di:waypoint xsi:type="dc:Point" x="228" y="203" /> - <di:waypoint xsi:type="dc:Point" x="350" y="203" /> + <di:waypoint xsi:type="dc:Point" x="228.0" y="203.0"/> + <di:waypoint xsi:type="dc:Point" x="350.0" y="203.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="249" y="203" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="249.0" y="203.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateUpdatePONetwork_ScriptTask"> - <dc:Bounds x="1343" y="1311" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1343.0" y="1311.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity"> - <dc:Bounds x="996" y="806" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="996.0" y="806.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callUpdateNetwork_ServiceTask"> - <dc:Bounds x="1342" y="1176" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1176.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask"> - <dc:Bounds x="1343" y="276" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1343.0" y="276.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity"> - <dc:Bounds x="137" y="1395" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="137.0" y="1395.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true"> - <dc:Bounds x="17" y="585" width="1122" height="567" /> + <dc:Bounds height="567.0" width="1122.0" x="17.0" y="585.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent"> - <dc:Bounds x="48" y="1040" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="48.0" y="1040.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="33" y="1081" width="67" height="22" /> + <dc:Bounds height="22.0" width="67.0" x="33.0" y="1081.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask"> - <dc:Bounds x="756" y="806" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="756.0" y="806.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="1523" y="520" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="1523.0" y="520.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1487" y="569" width="125" height="22" /> + <dc:Bounds height="22.0" width="125.0" x="1487.0" y="569.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124"> - <di:waypoint xsi:type="dc:Point" x="1573" y="545" /> - <di:waypoint xsi:type="dc:Point" x="1682" y="546" /> + <di:waypoint xsi:type="dc:Point" x="1573.0" y="545.0"/> + <di:waypoint xsi:type="dc:Point" x="1682.0" y="546.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1577" y="546" width="22" height="22" /> + <dc:Bounds height="22.0" width="22.0" x="1577.0" y="546.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_336"> - <di:waypoint xsi:type="dc:Point" x="1523" y="545" /> - <di:waypoint xsi:type="dc:Point" x="1393" y="545" /> - <di:waypoint xsi:type="dc:Point" x="1393" y="576" /> + <di:waypoint xsi:type="dc:Point" x="1523.0" y="545.0"/> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="545.0"/> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="576.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1500" y="545" width="29" height="22" /> + <dc:Bounds height="22.0" width="29.0" x="1500.0" y="545.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask"> - <dc:Bounds x="347" y="1392" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="347.0" y="1392.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask"> - <dc:Bounds x="792" y="1390" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="792.0" y="1390.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask"> - <dc:Bounds x="564" y="1392" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="564.0" y="1392.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent"> - <dc:Bounds x="1682" y="528" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="1682.0" y="528.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1663" y="569" width="74" height="22" /> + <dc:Bounds height="22.0" width="74.0" x="1663.0" y="569.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity"> - <dc:Bounds x="1341" y="395" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1341.0" y="395.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent"> - <dc:Bounds x="1323" y="434" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="1323.0" y="434.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1280" y="474" width="82" height="22" /> + <dc:Bounds height="22.0" width="82.0" x="1280.0" y="474.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19"> - <di:waypoint xsi:type="dc:Point" x="1393" 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" /> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="356.0"/> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="374.0"/> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="374.0"/> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="395.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1389" y="374" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1389.0" y="374.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131"> - <di:waypoint xsi:type="dc:Point" x="1441" y="435" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="435" /> + <di:waypoint xsi:type="dc:Point" x="1441.0" y="435.0"/> + <di:waypoint xsi:type="dc:Point" x="1499.0" y="435.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1473" y="435" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1473.0" y="435.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21"> - <di:waypoint xsi:type="dc:Point" x="1323" y="447" /> - <di:waypoint xsi:type="dc:Point" x="1290" y="438" /> + <di:waypoint xsi:type="dc:Point" x="1323.0" y="447.0"/> + <di:waypoint xsi:type="dc:Point" x="1290.0" y="438.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127"> - <di:waypoint xsi:type="dc:Point" x="450" y="203" /> - <di:waypoint xsi:type="dc:Point" x="516" y="203" /> + <di:waypoint xsi:type="dc:Point" x="450.0" y="203.0"/> + <di:waypoint xsi:type="dc:Point" x="516.0" y="203.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="481" y="203" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="481.0" y="203.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask"> - <dc:Bounds x="516" y="163" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="516.0" y="163.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90"> - <di:waypoint xsi:type="dc:Point" x="84" 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" /> + <di:waypoint xsi:type="dc:Point" x="84.0" y="1058.0"/> + <di:waypoint xsi:type="dc:Point" x="131.0" y="1058.0"/> + <di:waypoint xsi:type="dc:Point" x="131.0" y="1057.0"/> + <di:waypoint xsi:type="dc:Point" x="161.0" y="1057.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="96" y="1058" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="96.0" y="1058.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent"> - <dc:Bounds x="470" y="867" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="470.0" y="867.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="440" y="906" width="96" height="22" /> + <dc:Bounds height="22.0" width="96.0" x="440.0" y="906.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3"> - <di:waypoint xsi:type="dc:Point" x="856" y="846" /> - <di:waypoint xsi:type="dc:Point" x="996" y="846" /> + <di:waypoint xsi:type="dc:Point" x="856.0" y="846.0"/> + <di:waypoint xsi:type="dc:Point" x="996.0" y="846.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="881" y="846" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="881.0" y="846.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask"> - <dc:Bounds x="1499" y="395" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1499.0" y="395.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67"> - <di:waypoint xsi:type="dc:Point" x="1549" 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" /> + <di:waypoint xsi:type="dc:Point" x="1549.0" y="475.0"/> + <di:waypoint xsi:type="dc:Point" x="1549.0" y="492.0"/> + <di:waypoint xsi:type="dc:Point" x="1548.0" y="492.0"/> + <di:waypoint xsi:type="dc:Point" x="1548.0" y="520.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1545" y="503" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1545.0" y="503.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80"> - <di:waypoint xsi:type="dc:Point" x="564" 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" /> + <di:waypoint xsi:type="dc:Point" x="564.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="447.0" y="1432.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="528" y="1432" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="528.0" y="1432.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4"> - <di:waypoint xsi:type="dc:Point" x="347" 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" /> + <di:waypoint xsi:type="dc:Point" x="347.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="292.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="292.0" y="1435.0"/> + <di:waypoint xsi:type="dc:Point" x="237.0" y="1435.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="290" y="1512" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="290.0" y="1512.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity"> - <dc:Bounds x="1190" y="384" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1190.0" y="384.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask"> - <dc:Bounds x="984" y="100" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="984.0" y="100.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQuery2NetworkID_ScriptTask"> - <dc:Bounds x="1176" y="1390" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1176.0" y="1390.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask"> - <dc:Bounds x="984" y="1392" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="984.0" y="1392.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135"> - <di:waypoint xsi:type="dc:Point" x="1176" 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" /> + <di:waypoint xsi:type="dc:Point" x="1176.0" y="1430.0"/> + <di:waypoint xsi:type="dc:Point" x="1118.0" y="1430.0"/> + <di:waypoint xsi:type="dc:Point" x="1118.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="1084.0" y="1432.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1143" y="1657" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1143.0" y="1657.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86"> - <di:waypoint xsi:type="dc:Point" x="792" 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" /> + <di:waypoint xsi:type="dc:Point" x="792.0" y="1430.0"/> + <di:waypoint xsi:type="dc:Point" x="691.0" y="1430.0"/> + <di:waypoint xsi:type="dc:Point" x="691.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="664.0" y="1432.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="773" y="1430" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="773.0" y="1430.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ScriptTask_83"> - <di:waypoint xsi:type="dc:Point" x="984" 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" /> + <di:waypoint xsi:type="dc:Point" x="984.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="926.0" y="1432.0"/> + <di:waypoint xsi:type="dc:Point" x="926.0" y="1430.0"/> + <di:waypoint xsi:type="dc:Point" x="892.0" y="1430.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="947" y="1432" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="947.0" y="1432.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask"> - <dc:Bounds x="1341" y="688" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1341.0" y="688.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215"> - <di:waypoint xsi:type="dc:Point" x="1391" y="768" /> - <di:waypoint xsi:type="dc:Point" x="1391" y="810" /> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="768.0"/> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="810.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1388" y="781" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1388.0" y="781.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63"> - <di:waypoint xsi:type="dc:Point" x="1392" y="1256" /> - <di:waypoint xsi:type="dc:Point" x="1393" y="1311" /> + <di:waypoint xsi:type="dc:Point" x="1392.0" y="1256.0"/> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="1311.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1390" y="1284" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1284.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask"> - <dc:Bounds x="1342" y="1052" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1052.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83"> - <di:waypoint xsi:type="dc:Point" x="1392" y="1132" /> - <di:waypoint xsi:type="dc:Point" x="1392" y="1176" /> + <di:waypoint xsi:type="dc:Point" x="1392.0" y="1132.0"/> + <di:waypoint xsi:type="dc:Point" x="1392.0" y="1176.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1389" y="1159" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1389.0" y="1159.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="161" y="1032" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="161.0" y="1032.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="138" y="1092" width="98" height="22" /> + <dc:Bounds height="22.0" width="98.0" x="138.0" y="1092.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="isRollbackOn_YesNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_215"> - <di:waypoint xsi:type="dc:Point" x="186" y="1032" /> - <di:waypoint xsi:type="dc:Point" x="186" y="1004" /> + <di:waypoint xsi:type="dc:Point" x="186.0" y="1032.0"/> + <di:waypoint xsi:type="dc:Point" x="186.0" y="1004.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="186" y="1020" width="29" height="22" /> + <dc:Bounds height="22.0" width="29.0" x="186.0" y="1020.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="isRollbackOn_NoNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_InclusiveGateway_24"> - <di:waypoint xsi:type="dc:Point" x="211" y="1057" /> - <di:waypoint xsi:type="dc:Point" x="361" y="1057" /> - <di:waypoint xsi:type="dc:Point" x="361" y="1004" /> + <di:waypoint xsi:type="dc:Point" x="211.0" y="1057.0"/> + <di:waypoint xsi:type="dc:Point" x="361.0" y="1057.0"/> + <di:waypoint xsi:type="dc:Point" x="361.0" y="1004.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="211" y="1062" width="22" height="22" /> + <dc:Bounds height="22.0" width="22.0" x="211.0" y="1062.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask"> - <dc:Bounds x="1341" y="810" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1341.0" y="810.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_335"> - <di:waypoint xsi:type="dc:Point" x="1391" y="890" /> - <di:waypoint xsi:type="dc:Point" x="1391" y="926" /> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="890.0"/> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="926.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1388" y="900" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1388.0" y="900.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6"> - <dc:Bounds x="336" y="954" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="336.0" y="954.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="361" y="1009" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="361.0" y="1009.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="161" y="954" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="161.0" y="954.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="88" y="969" width="60" height="22" /> + <dc:Bounds height="22.0" width="60.0" x="88.0" y="969.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_InclusiveGateway_24"> - <di:waypoint xsi:type="dc:Point" x="211" y="979" /> - <di:waypoint xsi:type="dc:Point" x="336" y="979" /> + <di:waypoint xsi:type="dc:Point" x="211.0" y="979.0"/> + <di:waypoint xsi:type="dc:Point" x="336.0" y="979.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="204" y="983" width="29" height="22" /> + <dc:Bounds height="22.0" width="29.0" x="204.0" y="983.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_216"> - <di:waypoint xsi:type="dc:Point" x="186" y="954" /> - <di:waypoint xsi:type="dc:Point" x="186" y="884" /> + <di:waypoint xsi:type="dc:Point" x="186.0" y="954.0"/> + <di:waypoint xsi:type="dc:Point" x="186.0" y="884.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="191" y="933" width="22" height="22" /> + <dc:Bounds height="22.0" width="22.0" x="191.0" y="933.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_216" bpmnElement="isNetworkOk_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="161" y="834" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="161.0" y="834.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="68" y="849" width="95" height="22" /> + <dc:Bounds height="22.0" width="95.0" x="68.0" y="849.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_86" bpmnElement="isNetworkOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217"> - <di:waypoint xsi:type="dc:Point" x="211" 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" /> + <di:waypoint xsi:type="dc:Point" x="211.0" y="859.0"/> + <di:waypoint xsi:type="dc:Point" x="273.0" y="859.0"/> + <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/> + <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="211" y="863" width="22" height="22" /> + <dc:Bounds height="22.0" width="22.0" x="211.0" y="863.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_90" bpmnElement="isNetworkOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217"> - <di:waypoint xsi:type="dc:Point" x="186" 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" /> + <di:waypoint xsi:type="dc:Point" x="186.0" y="834.0"/> + <di:waypoint xsi:type="dc:Point" x="186.0" y="781.0"/> + <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/> + <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="192" y="814" width="29" height="22" /> + <dc:Bounds height="22.0" width="29.0" x="192.0" y="814.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="336" y="756" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="336.0" y="756.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="323" y="722" width="78" height="22" /> + <dc:Bounds height="22.0" width="78.0" x="323.0" y="722.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261"> - <di:waypoint xsi:type="dc:Point" x="386" y="781" /> - <di:waypoint xsi:type="dc:Point" x="438" y="781" /> + <di:waypoint xsi:type="dc:Point" x="386.0" y="781.0"/> + <di:waypoint xsi:type="dc:Point" x="438.0" y="781.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="386" y="779" width="29" height="22" /> + <dc:Bounds height="22.0" width="29.0" x="386.0" y="779.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_262"> - <di:waypoint xsi:type="dc:Point" x="361" y="806" /> - <di:waypoint xsi:type="dc:Point" x="362" y="845" /> + <di:waypoint xsi:type="dc:Point" x="361.0" y="806.0"/> + <di:waypoint xsi:type="dc:Point" x="362.0" y="845.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="366" y="806" width="22" height="22" /> + <dc:Bounds height="22.0" width="22.0" x="366.0" y="806.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3"> - <dc:Bounds x="169" y="1536" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="169.0" y="1536.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="187" y="1577" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="187.0" y="1577.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177"> - <di:waypoint xsi:type="dc:Point" x="187" y="1475" /> - <di:waypoint xsi:type="dc:Point" x="187" y="1536" /> + <di:waypoint xsi:type="dc:Point" x="187.0" y="1475.0"/> + <di:waypoint xsi:type="dc:Point" x="187.0" y="1536.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="184" y="1475" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="184.0" y="1475.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4"> - <dc:Bounds x="1028" y="924" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="1028.0" y="924.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1046" y="965" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="1046.0" y="965.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178"> - <di:waypoint xsi:type="dc:Point" x="1046" y="886" /> - <di:waypoint xsi:type="dc:Point" x="1046" y="924" /> + <di:waypoint xsi:type="dc:Point" x="1046.0" y="886.0"/> + <di:waypoint xsi:type="dc:Point" x="1046.0" y="924.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1043" y="888" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1043.0" y="888.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79"> - <di:waypoint xsi:type="dc:Point" x="676" y="846" /> - <di:waypoint xsi:type="dc:Point" x="756" y="846" /> + <di:waypoint xsi:type="dc:Point" x="676.0" y="846.0"/> + <di:waypoint xsi:type="dc:Point" x="756.0" y="846.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="686" y="846" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="686.0" y="846.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1"> - <dc:Bounds x="576" y="806" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="576.0" y="806.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask"> - <dc:Bounds x="576" y="940" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="576.0" y="940.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97"> - <di:waypoint xsi:type="dc:Point" x="626" y="940" /> - <di:waypoint xsi:type="dc:Point" x="626" y="886" /> + <di:waypoint xsi:type="dc:Point" x="626.0" y="940.0"/> + <di:waypoint xsi:type="dc:Point" x="626.0" y="886.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="623" y="927" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="623.0" y="927.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask"> - <dc:Bounds x="1200" y="100" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1200.0" y="100.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67"> - <di:waypoint xsi:type="dc:Point" x="1300" 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" /> + <di:waypoint xsi:type="dc:Point" x="1300.0" y="140.0"/> + <di:waypoint xsi:type="dc:Point" x="1394.0" y="140.0"/> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="259.0"/> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="276.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1314" y="140" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1314.0" y="140.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4"> - <dc:Bounds x="1581" y="377" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="1581.0" y="377.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124"> - <di:waypoint xsi:type="dc:Point" x="1617" y="395" /> - <di:waypoint xsi:type="dc:Point" x="1700" y="394" /> - <di:waypoint xsi:type="dc:Point" x="1700" y="528" /> + <di:waypoint xsi:type="dc:Point" x="1617.0" y="395.0"/> + <di:waypoint xsi:type="dc:Point" x="1700.0" y="394.0"/> + <di:waypoint xsi:type="dc:Point" x="1700.0" y="528.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1697" y="467" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1697.0" y="467.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask"> - <dc:Bounds x="438" y="742" width="100" height="79" /> + <dc:Bounds height="79.0" width="100.0" x="438.0" y="742.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_262" bpmnElement="validateRollbacksResponse_ScriptTask_2"> - <dc:Bounds x="312" y="845" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="312.0" y="845.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24" targetElement="_BPMNShape_ScriptTask_218"> - <di:waypoint xsi:type="dc:Point" x="386" 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" /> + <di:waypoint xsi:type="dc:Point" x="386.0" y="979.0"/> + <di:waypoint xsi:type="dc:Point" x="548.0" y="979.0"/> + <di:waypoint xsi:type="dc:Point" x="548.0" y="980.0"/> + <di:waypoint xsi:type="dc:Point" x="576.0" y="980.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="393" y="979" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="393.0" y="979.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261" targetElement="_BPMNShape_IntermediateThrowEvent_24"> - <di:waypoint xsi:type="dc:Point" x="488" y="820" /> - <di:waypoint xsi:type="dc:Point" x="488" y="867" /> + <di:waypoint xsi:type="dc:Point" x="488.0" y="820.0"/> + <di:waypoint xsi:type="dc:Point" x="488.0" y="867.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="485" y="847" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="485.0" y="847.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_ScriptTask_262"> - <di:waypoint xsi:type="dc:Point" x="470" 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" /> + <di:waypoint xsi:type="dc:Point" x="470.0" y="885.0"/> + <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/> + <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/> + <di:waypoint xsi:type="dc:Point" x="412.0" y="885.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="448" y="885" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="448.0" y="885.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_262" targetElement="_BPMNShape_InclusiveGateway_24"> - <di:waypoint xsi:type="dc:Point" x="362" y="925" /> - <di:waypoint xsi:type="dc:Point" x="361" y="954" /> + <di:waypoint xsi:type="dc:Point" x="362.0" y="925.0"/> + <di:waypoint xsi:type="dc:Point" x="361.0" y="954.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="358" y="948" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="358.0" y="948.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134"> - <di:waypoint xsi:type="dc:Point" x="1393" 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" /> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="1391.0"/> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="1430.0"/> + <di:waypoint xsi:type="dc:Point" x="1310.0" y="1430.0"/> + <di:waypoint xsi:type="dc:Point" x="1276.0" y="1430.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1390" y="1425" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1425.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true"> - <dc:Bounds x="21" y="381" width="394" height="188" /> + <dc:Bounds height="188.0" width="394.0" x="21.0" y="381.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1"> - <dc:Bounds x="54" y="458" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="54.0" y="458.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="72" y="499" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="72.0" y="499.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1"> - <dc:Bounds x="169" y="436" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="169.0" y="436.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1"> - <dc:Bounds x="330" y="458" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="330.0" y="458.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="348" y="499" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="348.0" y="499.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270"> - <di:waypoint xsi:type="dc:Point" x="90" y="476" /> - <di:waypoint xsi:type="dc:Point" x="169" y="476" /> + <di:waypoint xsi:type="dc:Point" x="90.0" y="476.0"/> + <di:waypoint xsi:type="dc:Point" x="169.0" y="476.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="129" y="476" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="129.0" y="476.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220"> - <di:waypoint xsi:type="dc:Point" x="269" y="476" /> - <di:waypoint xsi:type="dc:Point" x="330" y="476" /> + <di:waypoint xsi:type="dc:Point" x="269.0" y="476.0"/> + <di:waypoint xsi:type="dc:Point" x="330.0" y="476.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="301" y="476" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="301.0" y="476.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance"> - <dc:Bounds x="686" y="163" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="686.0" y="163.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true"> - <dc:Bounds x="836" y="177" width="50" height="50" /> + <dc:Bounds height="50.0" width="50.0" x="836.0" y="177.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="891" y="195" width="79" height="22" /> + <dc:Bounds height="22.0" width="79.0" x="891.0" y="195.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244"> - <di:waypoint xsi:type="dc:Point" x="786" 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" /> + <di:waypoint xsi:type="dc:Point" x="786.0" y="203.0"/> + <di:waypoint xsi:type="dc:Point" x="805.0" y="203.0"/> + <di:waypoint xsi:type="dc:Point" x="805.0" y="202.0"/> + <di:waypoint xsi:type="dc:Point" x="836.0" y="202.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="799" y="203" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="799.0" y="203.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_133"> - <di:waypoint xsi:type="dc:Point" x="861" 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" /> + <di:waypoint xsi:type="dc:Point" x="861.0" y="177.0"/> + <di:waypoint xsi:type="dc:Point" x="861.0" y="140.0"/> + <di:waypoint xsi:type="dc:Point" x="910.0" y="140.0"/> + <di:waypoint xsi:type="dc:Point" x="984.0" y="140.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="868" y="157" width="29" height="22" /> + <dc:Bounds height="22.0" width="29.0" x="868.0" y="157.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2"> - <dc:Bounds x="1155" y="278" width="36" height="36" /> + <dc:Bounds height="36.0" width="36.0" x="1155.0" y="278.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1173" y="319" width="0" height="0" /> + <dc:Bounds height="0.0" width="0.0" x="1173.0" y="319.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound"> - <dc:Bounds x="984" y="256" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="984.0" y="256.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331"> - <di:waypoint xsi:type="dc:Point" x="861" y="227" /> - <di:waypoint xsi:type="dc:Point" x="861" y="296" /> - <di:waypoint xsi:type="dc:Point" x="984" y="296" /> + <di:waypoint xsi:type="dc:Point" x="861.0" y="227.0"/> + <di:waypoint xsi:type="dc:Point" x="861.0" y="296.0"/> + <di:waypoint xsi:type="dc:Point" x="984.0" y="296.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="871" y="233" width="22" height="22" /> + <dc:Bounds height="22.0" width="22.0" x="871.0" y="233.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247"> - <di:waypoint xsi:type="dc:Point" x="1084" y="296" /> - <di:waypoint xsi:type="dc:Point" x="1155" y="296" /> + <di:waypoint xsi:type="dc:Point" x="1084.0" y="296.0"/> + <di:waypoint xsi:type="dc:Point" x="1155.0" y="296.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1103" y="296" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1103.0" y="296.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_245"> - <di:waypoint xsi:type="dc:Point" x="1084" y="140" /> - <di:waypoint xsi:type="dc:Point" x="1200" y="140" /> + <di:waypoint xsi:type="dc:Point" x="1084.0" y="140.0"/> + <di:waypoint xsi:type="dc:Point" x="1200.0" y="140.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1127" y="140" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1127.0" y="140.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_72"> - <di:waypoint xsi:type="dc:Point" x="616" y="203" /> - <di:waypoint xsi:type="dc:Point" x="686" y="203" /> + <di:waypoint xsi:type="dc:Point" x="616.0" y="203.0"/> + <di:waypoint xsi:type="dc:Point" x="686.0" y="203.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="632" y="203" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="632.0" y="203.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask"> - <dc:Bounds x="1341" y="926" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1341.0" y="926.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_335" targetElement="_BPMNShape_ScriptTask_157"> - <di:waypoint xsi:type="dc:Point" x="1391" y="1006" /> - <di:waypoint xsi:type="dc:Point" x="1392" y="1052" /> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="1006.0"/> + <di:waypoint xsi:type="dc:Point" x="1392.0" y="1052.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1388" y="1028" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1388.0" y="1028.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_336" bpmnElement="callRESTReQuery1NetworkID_ScriptTask"> - <dc:Bounds x="1343" y="576" width="100" height="80" /> + <dc:Bounds height="80.0" width="100.0" x="1343.0" y="576.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_336" targetElement="_BPMNShape_ScriptTask_156"> - <di:waypoint xsi:type="dc:Point" x="1393" 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" /> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="656.0"/> + <di:waypoint xsi:type="dc:Point" x="1393.0" y="672.0"/> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="672.0"/> + <di:waypoint xsi:type="dc:Point" x="1391.0" y="688.0"/> <bpmndi:BPMNLabel> - <dc:Bounds x="1390" y="666" width="6" height="6" /> + <dc:Bounds height="6.0" width="6.0" x="1390.0" y="666.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions> +</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 index 75b88b2e8d..96c0681c48 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn @@ -26,7 +26,6 @@ <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> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn index 59f82013b1..ecd23f0ca9 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn @@ -297,10 +297,9 @@ WorkflowException <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:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateCreatePONetwork_ScriptTask" targetRef="callRESTReQueryNetworkID_ScriptTask" /> <bpmn2:scriptTask id="callRESTReQueryNetworkID_ScriptTask" name="Call REST ReQuery Network Id in AAI" scriptFormat="groovy"> - <bpmn2:incoming>isSdncRpc2No_SequenceFlow2</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_1jia57e</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* def DoCreateNetworkInstance = new DoCreateNetworkInstance() @@ -366,7 +365,7 @@ DoCreateNetworkInstance.callRESTQueryAAINetworkName(execution)]]></bpmn2:script> <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.* + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.* ExceptionUtil exceptionUtil = new ExceptionUtil() exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script> </bpmn2:scriptTask> @@ -454,7 +453,7 @@ DoCreateNetworkInstance.prepareRpcSDNCActivateRequest(execution)]]></bpmn2:scrip <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:sequenceFlow id="SequenceFlow_1jia57e" name="Yes" sourceRef="ExclusiveGateway_0n0ptg6" targetRef="Task_0zzobg6"> <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> <bpmn2:sequenceFlow id="SequenceFlow_18ybfu5" name="No" sourceRef="ExclusiveGateway_0n0ptg6" targetRef="EndEvent_13v46cq" /> @@ -500,14 +499,14 @@ DoCreateNetworkInstance.validateRpcSDNCActivateResponse(execution)]]></bpmn2:scr <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 '1702' SNDC Call?" default="isSdncRpc2No_SequenceFlow2"> - <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1ipz2ze</bpmn2:incoming> <bpmn2:outgoing>isSdncRpc2Yes_SequenceFlow2</bpmn2:outgoing> <bpmn2:outgoing>isSdncRpc2No_SequenceFlow2</bpmn2:outgoing> </bpmn2:exclusiveGateway> <bpmn2:sequenceFlow id="isSdncRpc2Yes_SequenceFlow2" name="Yes" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="Task_1rd6dg6"> <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="isSdncRpc2No_SequenceFlow2" name="No" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="callRESTReQueryNetworkID_ScriptTask" /> + <bpmn2:sequenceFlow id="isSdncRpc2No_SequenceFlow2" name="No" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="Task_0zzobg6" /> <bpmn2:scriptTask id="Task_10lubzj" name="Prepare Assign SDNC RPC Request" scriptFormat="groovy"> <bpmn2:incoming>isSdncRpc1Yes_SequenceFlow1</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0j8bxnb</bpmn2:outgoing> @@ -524,13 +523,14 @@ DoCreateNetworkInstance.prepareRpcSDNCRequest(execution) </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:incoming>SequenceFlow_1jia57e</bpmn2:incoming> + <bpmn2:incoming>isSdncRpc2No_SequenceFlow2</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1s8b1m1</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* def DoCreateNetworkInstance = new DoCreateNetworkInstance() DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_1ipz2ze" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="Task_0zzobg6" /> + <bpmn2:sequenceFlow id="SequenceFlow_1ipz2ze" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="isSdncRpc2_ExclusiveGateway2" /> <bpmn2:scriptTask id="ScriptTask_0p3v749" name="Post Process Response" scriptFormat="groovy"> <bpmn2:incoming>isNetworkActiveYes_SequenceFlow</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_18ylufb</bpmn2:outgoing> @@ -730,16 +730,16 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> <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" /> + <dc:Bounds x="1454" 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" /> + <dc:Bounds x="1454" y="1538" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135"> - <di:waypoint xsi:type="dc:Point" x="909" y="1432" /> - <di:waypoint xsi:type="dc:Point" x="835" y="1432" /> + <di:waypoint xsi:type="dc:Point" x="1504" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="1504" y="1538" /> <bpmndi:BPMNLabel> - <dc:Bounds x="872" y="1417" width="0" height="0" /> + <dc:Bounds x="1519" y="1505" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask"> @@ -865,11 +865,9 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </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" /> + <di:waypoint xsi:type="dc:Point" x="1505" y="1392" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1522" y="1373" width="0" height="0" /> + <dc:Bounds x="1506" y="1350" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true"> @@ -1006,77 +1004,73 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_1uxa4p9_di" bpmnElement="Task_1ipbwbj"> - <dc:Bounds x="1267" y="1538" width="100" height="80" /> + <dc:Bounds x="1014" 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" /> + <dc:Bounds x="1183" y="1538" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0n0ptg6_di" bpmnElement="ExclusiveGateway_0n0ptg6" isMarkerVisible="true"> - <dc:Bounds x="934" y="1553" width="50" height="50" /> + <dc:Bounds x="724" y="1553" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="857" y="1566" width="68" height="24" /> + <dc:Bounds x="644" y="1566" width="68" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_13deudk_di" bpmnElement="SequenceFlow_13deudk"> - <di:waypoint xsi:type="dc:Point" x="1457" y="1578" /> - <di:waypoint xsi:type="dc:Point" x="1367" y="1578" /> + <di:waypoint xsi:type="dc:Point" x="1183" y="1578" /> + <di:waypoint xsi:type="dc:Point" x="1114" y="1578" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1412" y="1563" width="0" height="0" /> + <dc:Bounds x="1149" y="1563" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_08qibb9_di" bpmnElement="SequenceFlow_08qibb9"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="1014" y="1578" /> + <di:waypoint xsi:type="dc:Point" x="953" y="1578" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1244" y="1578" width="0" height="0" /> + <dc:Bounds x="984" y="1563" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1t03rs2_di" bpmnElement="SequenceFlow_1t03rs2"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="853" y="1578" /> + <di:waypoint xsi:type="dc:Point" x="774" y="1578" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1053" y="1578" width="0" height="0" /> + <dc:Bounds x="814" y="1563" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1jia57e_di" bpmnElement="SequenceFlow_1jia57e"> - <di:waypoint xsi:type="dc:Point" x="959" y="1553" /> - <di:waypoint xsi:type="dc:Point" x="959" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="749" y="1553" /> + <di:waypoint xsi:type="dc:Point" x="749" y="1484" /> <bpmndi:BPMNLabel> - <dc:Bounds x="972" y="1542.77440535676" width="18" height="12" /> + <dc:Bounds x="757" y="1537.7047949008065" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_18ybfu5_di" bpmnElement="SequenceFlow_18ybfu5"> - <di:waypoint xsi:type="dc:Point" x="959" y="1603" /> - <di:waypoint xsi:type="dc:Point" x="959" y="1662" /> + <di:waypoint xsi:type="dc:Point" x="749" y="1603" /> + <di:waypoint xsi:type="dc:Point" x="749" y="1669" /> <bpmndi:BPMNLabel> - <dc:Bounds x="968" y="1601.171717171717" width="14" height="12" /> + <dc:Bounds x="758" y="1603.7606668519034" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_1v458g5_di" bpmnElement="validateSDNCActivate_Task"> - <dc:Bounds x="1091" y="1538" width="100" height="80" /> + <dc:Bounds x="853" 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" /> + <dc:Bounds x="859" y="1600" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1115" y="1636" width="0" height="0" /> + <dc:Bounds x="877" y="1636" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0s51ns0_di" bpmnElement="SequenceFlow_0s51ns0"> - <di:waypoint xsi:type="dc:Point" x="1115" y="1636" /> - <di:waypoint xsi:type="dc:Point" x="1115" y="1680" /> - <di:waypoint xsi:type="dc:Point" x="977" y="1680" /> + <di:waypoint xsi:type="dc:Point" x="877" y="1636" /> + <di:waypoint xsi:type="dc:Point" x="877" y="1687" /> + <di:waypoint xsi:type="dc:Point" x="767" y="1687" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1130" y="1658" width="0" height="0" /> + <dc:Bounds x="892" y="1661.5" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0h7h49p_di" bpmnElement="EndEvent_13v46cq"> - <dc:Bounds x="941" y="1662" width="36" height="36" /> + <dc:Bounds x="731" y="1669" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="921" y="1708" width="76" height="24" /> + <dc:Bounds x="711" y="1715" width="76" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0f9d94i_di" bpmnElement="isSDNCActivate_ExclusiveGateway" isMarkerVisible="true"> @@ -1160,25 +1154,24 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </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" /> + <dc:Bounds x="1360" y="1553" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1540" y="1420" width="76" height="24" /> + <dc:Bounds x="1347" y="1619" width="76" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1lphs99_di" bpmnElement="isSdncRpc2Yes_SequenceFlow2"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="1360" y="1578" /> + <di:waypoint xsi:type="dc:Point" x="1283" y="1578" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1511" y="1459.0987654320988" width="18" height="12" /> + <dc:Bounds x="1337" y="1580.0388981849903" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0lk1uut_di" bpmnElement="isSdncRpc2No_SequenceFlow2"> - <di:waypoint xsi:type="dc:Point" x="1482" y="1432" /> - <di:waypoint xsi:type="dc:Point" x="1009" y="1432" /> + <di:waypoint xsi:type="dc:Point" x="1385" y="1553" /> + <di:waypoint xsi:type="dc:Point" x="1385" y="1444" /> + <di:waypoint xsi:type="dc:Point" x="799" y="1444" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1460" y="1410" width="14" height="12" /> + <dc:Bounds x="1362" y="1543.660178848007" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_1lkq0a3_di" bpmnElement="Task_10lubzj"> @@ -1188,9 +1181,9 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> <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" /> + <dc:Bounds x="467" y="1426" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="478" y="1450" width="0" height="0" /> + <dc:Bounds x="486" y="1462" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1kpt4kc_di" bpmnElement="EndEvent_1kpt4kc"> @@ -1206,16 +1199,16 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </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" /> + <di:waypoint xsi:type="dc:Point" x="699" y="1444" /> + <di:waypoint xsi:type="dc:Point" x="597" y="1444" /> + <di:waypoint xsi:type="dc:Point" x="597" y="1444" /> + <di:waypoint xsi:type="dc:Point" x="503" y="1444" /> <bpmndi:BPMNLabel> - <dc:Bounds x="540" y="1432" width="0" height="0" /> + <dc:Bounds x="612" y="1444" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_1feo4ms_di" bpmnElement="Task_0zzobg6"> - <dc:Bounds x="576" y="1392" width="100" height="80" /> + <dc:Bounds x="699" y="1404" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_0myjg9k_di" bpmnElement="ScriptTask_0myjg9k"> <dc:Bounds x="682" y="1055" width="100" height="80" /> @@ -1231,10 +1224,12 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> <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" /> + <di:waypoint xsi:type="dc:Point" x="1454" y="1578" /> + <di:waypoint xsi:type="dc:Point" x="1432" y="1578" /> + <di:waypoint xsi:type="dc:Point" x="1432" y="1578" /> + <di:waypoint xsi:type="dc:Point" x="1410" y="1578" /> <bpmndi:BPMNLabel> - <dc:Bounds x="706" y="1417" width="0" height="0" /> + <dc:Bounds x="1447" y="1578" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_1u07hp7_di" bpmnElement="CallActivity_1u07hp7"> @@ -1382,4 +1377,4 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions>
\ No newline at end of file +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn index 302620fdaf..a770c8c11a 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn @@ -1,390 +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> +<?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 index e73c79d953..80ace28ae7 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn @@ -1,338 +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="""" 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> +<?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="""" 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 index 62eb91810f..fecb720666 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn @@ -1,1006 +1,1167 @@ -<?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_pNTO8MRhEeWv36YLr7PC3Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> - <bpmn2:process id="DoCreateVfModule" name="DoCreateVfModule" isExecutable="true"> - <bpmn2:startEvent id="StartEvent_1" name="Start"> - <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> - </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" /> - <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="DoCreateVfModule"> - <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing> - <bpmn2:linkEventDefinition id="_LinkEventDefinition_26" name="DoCreateVfModule" /> - </bpmn2:intermediateCatchEvent> - <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateCatchEvent_1" targetRef="IsVolumeGroupIdSpecified" /> - <bpmn2:exclusiveGateway id="IsVolumeGroupIdSpecified" name="Is volume_group_id specified?" default="SequenceFlow_11"> - <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing> - <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="SequenceFlow_11" name="no" sourceRef="IsVolumeGroupIdSpecified" targetRef="ExclusiveGateway_4" /> - <bpmn2:callActivity id="ConfirmVolumeGroupTenant" name="Confirm Volume Group Tenant" calledElement="ConfirmVolumeGroupTenant"> - <bpmn2:extensionElements> - <camunda:in source="DCVFM_volumeGroupId" target="volumeGroupId" /> - <camunda:in source="DCVFM_tenantId" target="tenantId" /> - <camunda:in source="DCVFM_cloudRegionForVolume" target="aicCloudRegion" /> - <camunda:in source="mso-request-id" target="mso-request-id" /> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:out source="ConfirmVolumeGroupTenantResponse" target="DCVFM_volumeGroupStackId" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_43</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing> - </bpmn2:callActivity> - <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ConfirmVolumeGroupTenant" targetRef="IsVolumeGroupNameSpecified" /> - <bpmn2:exclusiveGateway id="IsVolumeGroupNameSpecified" name="Is volume_group_name specified?" default="SequenceFlow_21"> - <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing> - <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="IsVolumeGroupNameSpecified" targetRef="ConfirmVolumeName"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def doCreateVfModule = new DoCreateVfModule() -return doCreateVfModule.isVolumeGroupNamePresent(execution)]]></bpmn2:conditionExpression> - </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="IsVolumeGroupNameSpecified" targetRef="ExclusiveGateway_4" /> - <bpmn2:callActivity id="ConfirmVolumeName" name="Confirm Volume Group Name" calledElement="ConfirmVolumeGroupName"> - <bpmn2:extensionElements> - <camunda:in source="DCVFM_volumeGroupId" target="ConfirmVolumeGroupName_volumeGroupId" /> - <camunda:in source="DCVFM_volumeGroupName" target="ConfirmVolumeGroupName_volumeGroupName" /> - <camunda:in source="DCVFM_cloudRegionForVolume" target="ConfirmVolumeGroupName_aicCloudRegion" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - <camunda:out source="WorkflowResponse" target="DCVM_confirmResponse" /> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing> - </bpmn2:callActivity> - <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ConfirmVolumeName" targetRef="ExclusiveGateway_4" /> - <bpmn2:exclusiveGateway id="ExclusiveGateway_4"> - <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_4" targetRef="CreateAAIVfModule" /> - <bpmn2:callActivity id="CallSDNCAdapterVDModuleTopologyAssign" name="Call SDNC Adapter: VF Module Topology Assign" calledElement="sdncAdapter"> - <bpmn2:extensionElements> - <camunda:in source="DCVFM_assignSDNCRequest" target="sdncAdapterWorkflowRequest" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:in source="mso-request-id" target="mso-request-id" /> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - <camunda:out source="sdncAdapterResponse" target="DCVFM_assignSDNCAdapterResponse" /> - <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing> - </bpmn2:callActivity> - <bpmn2:scriptTask id="PostProcessSDNCAssignRequest" name="PostProcess SDNC Assign Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* - -String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse") - -def doCreateVfModule = new DoCreateVfModule() -doCreateVfModule.validateSDNCResponse(execution, response, "assign")]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:scriptTask id="PreProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def doCreateVfModule = new DoCreateVfModule() -doCreateVfModule.preProcessSDNCAssignRequest(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterVDModuleTopologyAssign" /> - <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="CallSDNCAdapterVDModuleTopologyAssign" targetRef="PostProcessSDNCAssignRequest" /> - <bpmn2:scriptTask id="PreProcessSDNCGetRequest" name="PreProcess SDNC GET Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def doCreateVfModule = new DoCreateVfModule() -doCreateVfModule.preProcessSDNCGetRequest(execution)]]></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> +<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_pNTO8MRhEeWv36YLr7PC3Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateVfModule" name="DoCreateVfModule" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="DoCreateVfModule">
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_26" name="DoCreateVfModule" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateCatchEvent_1" targetRef="IsVolumeGroupIdSpecified" />
+ <bpmn2:exclusiveGateway id="IsVolumeGroupIdSpecified" name="Is volume_group_id specified?" default="SequenceFlow_11">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="no" sourceRef="IsVolumeGroupIdSpecified" targetRef="ExclusiveGateway_4" />
+ <bpmn2:callActivity id="ConfirmVolumeGroupTenant" name="Confirm Volume Group Tenant" calledElement="ConfirmVolumeGroupTenant">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="DCVFM_tenantId" target="tenantId" />
+ <camunda:in source="DCVFM_cloudRegionForVolume" target="aicCloudRegion" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="ConfirmVolumeGroupTenantResponse" target="DCVFM_volumeGroupStackId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_43</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ConfirmVolumeGroupTenant" targetRef="IsVolumeGroupNameSpecified" />
+ <bpmn2:exclusiveGateway id="IsVolumeGroupNameSpecified" name="Is volume_group_name specified?" default="SequenceFlow_21">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="IsVolumeGroupNameSpecified" targetRef="ConfirmVolumeName">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupNamePresent(execution)]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="IsVolumeGroupNameSpecified" targetRef="ExclusiveGateway_4" />
+ <bpmn2:callActivity id="ConfirmVolumeName" name="Confirm Volume Group Name" calledElement="ConfirmVolumeGroupName">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_volumeGroupId" target="ConfirmVolumeGroupName_volumeGroupId" />
+ <camunda:in source="DCVFM_volumeGroupName" target="ConfirmVolumeGroupName_volumeGroupName" />
+ <camunda:in source="DCVFM_cloudRegionForVolume" target="ConfirmVolumeGroupName_aicCloudRegion" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_confirmResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ConfirmVolumeName" targetRef="ExclusiveGateway_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_4">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_4" targetRef="CreateAAIVfModule" />
+ <bpmn2:callActivity id="CallSDNCAdapterVDModuleTopologyAssign" name="Call SDNC Adapter: VF Module Topology Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_assignSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCAssignRequest" name="PostProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "assign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCAssignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterVDModuleTopologyAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="CallSDNCAdapterVDModuleTopologyAssign" targetRef="PostProcessSDNCAssignRequest" />
+ <bpmn2:scriptTask id="PreProcessSDNCGetRequest" name="PreProcess SDNC GET Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCGetRequest(execution, "vfmodule")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVFModuleTopologyGET" name="Call SDNC Adapter: VF Module Topology GET" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_getSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_getSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="PreProcessSDNCGetRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="PreProcessSDNCGetRequest" targetRef="CallSDNCAdapterVFModuleTopologyGET" />
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="CallSDNCAdapterVFModuleTopologyGET" targetRef="PostProcessSDNCGetRequest" />
+ <bpmn2:scriptTask id="PostProcessSDNCGetRequest" name="PostProcess SDNC GET Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DCVFM_getSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "get")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="UpdateAAIVfModule_1" name="UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_updateAAIVfModuleResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PreProcessUpdateAAIVfModule_1" name="PreProcess Update AAIVfModule" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1avfxsz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessUpdateAAIVfModuleRequestOrch(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCActivateRequest" name="PreProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCActivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVFModuleTopologyActivate" name="Call SDNC Adapter: VF Module Topology Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_activateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCActivateRequest" name="PostProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+ String response = execution.getVariable("DCVFM_activateSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "activate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Is volume_group_id specified?" default="SequenceFlow_30">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="ExclusiveGateway_5" targetRef="PrepareCreateAAIVfModuleVolumeGroupRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="no" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="PreProcessUpdateAAIVfModule_1" targetRef="UpdateAAIVfModule_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="UpdateAAIVfModule_1" targetRef="PreProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PreProcessSDNCActivateRequest" targetRef="CallSDNCAdapterVFModuleTopologyActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="CallSDNCAdapterVFModuleTopologyActivate" targetRef="PostProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PostProcessSDNCActivateRequest" targetRef="ExclusiveGateway_5" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="UpdateAndActivate">
+ <bpmn2:outgoing>SequenceFlow_0363dz7</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_30" name="UpdateAndActivate" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_2" name="Provision">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_29" name="Provision" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="IntermediateCatchEvent_2" targetRef="PreProcessSDNCAssignRequest" />
+ <bpmn2:scriptTask id="PrepareCreateAAIVfModuleVolumeGroupRequest" name="Prepare CreateAAIVfModuleVolumeGroup Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.prepareCreateAAIVfModuleVolumeGroupRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CreateAAIVfModuleVolumeGroup" name="CreateAAIVfModuleVolumeGroup" calledElement="CreateAAIVfModuleVolumeGroup">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_createAAIVfModuleVolumeGroupRequest" target="CreateAAIVfModuleVolumeGroupRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_updateAAIVfModuleResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="CreateAAIVfModuleVolumeGroup" targetRef="ExclusiveGateway_6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PrepareCreateAAIVfModuleVolumeGroupRequest" targetRef="CreateAAIVfModuleVolumeGroup" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_6">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ExclusiveGateway_6" targetRef="ScriptTask_setSuccess" />
+ <bpmn2:scriptTask id="PreProcessVNFAdapterRequest" name="PreProcess VNF Adapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallVNFAdapterVFModuleCreate" name="Call VNF Adapter to create VF Module" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_createVnfARequest" target="vnfAdapterRestV1Request" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DCVFM_createVnfAResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in variables="all" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessVNFAdapterRequest" name="PostProcess VNF Adapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ushk1d</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="To UpdateAndActivate">
+ <bpmn2:incoming>SequenceFlow_0xfanpi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0abffyj</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_31" name="UpdateAndActivate" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="PostProcessSDNCGetRequest" targetRef="PreProcessVNFAdapterRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="PreProcessVNFAdapterRequest" targetRef="CallVNFAdapterVFModuleCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="CallVNFAdapterVFModuleCreate" targetRef="PostProcessVNFAdapterRequest" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_3" name="To Provision">
+ <bpmn2:incoming>SequenceFlow_0zcfn2x</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_170kw7h</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_28" name="Provision" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Need to query SDNC for VNF Topology?" default="SequenceFlow_0zcfn2x">
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zcfn2x</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0m382su</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="PostProcessCreateAAIVfModule" name="PostProcess CreateAAIVfModule" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessCreateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="PostProcessCreateAAIVfModule" targetRef="IsBaseVfModule" />
+ <bpmn2:exclusiveGateway id="IsBaseVfModule" name="Is Base VF Module?" default="SequenceFlow_36">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_36" name="no" sourceRef="IsBaseVfModule" targetRef="QueryAAIVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="yes" sourceRef="IsBaseVfModule" targetRef="ExclusiveGateway_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_isBaseVfModule") == "true"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="QueryAAIVfModule" name="Query AAI Vf Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="QueryAAIVfModule" targetRef="ExclusiveGateway_2" />
+ <bpmn2:scriptTask id="ScriptTask_setSuccess" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.setSuccessIndicator(execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_setSuccess" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_8" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="QueryCloudRegion" name="Query Cloud Region" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.queryCloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_40" name="yes" sourceRef="IsVolumeGroupIdSpecified" targetRef="QueryCloudRegion">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_43" name="" sourceRef="QueryCloudRegion" targetRef="ConfirmVolumeGroupTenant" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.processBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_2" />
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="PreProcessRequest" targetRef="ExclusiveGateway_0ffvqla" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="To DoCreateVfModule">
+ <bpmn2:incoming>SequenceFlow_1f53tby</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0270n5c</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_25" name="DoCreateVfModule" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:callActivity id="CreateAAIVfModule" name="CreateAAIVfModule" calledElement="CreateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="newVfModuleId" target="newVfModuleId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="CreateAAIVfModuleResponse" target="DCVFM_createVfModuleResponse" />
+ <camunda:in source="DCVFM_vnfId" target="vnfId" />
+ <camunda:in source="DCVFM_vnfName" target="vnfName" />
+ <camunda:in source="DCVFM_vnfType" target="vnfType" />
+ <camunda:in source="DCVFM_serviceId" target="serviceId" />
+ <camunda:in source="DCVFM_personaModelId" target="personaModelId" />
+ <camunda:in source="DCVFM_isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="DCVFM_vfModuleName" target="vfModuleName" />
+ <camunda:in source="DCVFM_vfModuleModelName" target="vfModuleModelName" />
+ <camunda:in source="DCVFM_personaModelVersion" target="personaModelVersion" />
+ <camunda:in source="DCVFM_modelCustomizationUuid" target="modelCustomizationId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="CreateAAIVfModule" targetRef="PostProcessCreateAAIVfModule" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_183x8vk" name="need to create network policies in AAI?" default="SequenceFlow_0xfanpi">
+ <bpmn2:incoming>SequenceFlow_1ushk1d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ery1pk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0xfanpi</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ushk1d" sourceRef="PostProcessVNFAdapterRequest" targetRef="ExclusiveGateway_183x8vk" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ery1pk" name="yes" sourceRef="ExclusiveGateway_183x8vk" targetRef="CreateNetworkPoliciesInAAI">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList") != null && !execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList").isEmpty()]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xfanpi" name="no" sourceRef="ExclusiveGateway_183x8vk" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0abffyj" sourceRef="CreateNetworkPoliciesInAAI" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:scriptTask id="CreateNetworkPoliciesInAAI" name="Create Network Policies In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ery1pk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0abffyj</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.createNetworkPoliciesInAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0f54imv" name="need to update VNF in AAI?" default="SequenceFlow_1k5uku2">
+ <bpmn2:incoming>SequenceFlow_0363dz7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bi38s7</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1k5uku2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1edqxlf">
+ <bpmn2:incoming>SequenceFlow_112los9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1k5uku2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1avfxsz</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bi38s7" name="yes" sourceRef="ExclusiveGateway_0f54imv" targetRef="PreProcessUpdateAAIGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[!execution.getVariable("DCVFM_oamManagementV4Address").isEmpty() || !execution.getVariable("DCVFM_oamManagementV6Address").isEmpty()]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qm81ym" sourceRef="PreProcessUpdateAAIGenericVnf" targetRef="UpdateAAIGenericVNFTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_112los9" sourceRef="UpdateAAIGenericVNFTask" targetRef="ExclusiveGateway_1edqxlf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1k5uku2" name="no" sourceRef="ExclusiveGateway_0f54imv" targetRef="ExclusiveGateway_1edqxlf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1avfxsz" sourceRef="ExclusiveGateway_1edqxlf" targetRef="PreProcessUpdateAAIVfModule_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0363dz7" sourceRef="IntermediateCatchEvent_3" targetRef="ExclusiveGateway_0f54imv" />
+ <bpmn2:scriptTask id="PreProcessUpdateAAIGenericVnf" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bi38s7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qm81ym</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="UpdateAAIGenericVNFTask" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVM_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1qm81ym</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_112los9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zcfn2x" name="no" sourceRef="ExclusiveGateway_2" targetRef="IntermediateThrowEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0m382su" name="yes" sourceRef="ExclusiveGateway_2" targetRef="QueryVNF">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFM_sdncVersion" ) == '1707'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0g270u0" sourceRef="PreProcessSDNCVnfGetRequest" targetRef="CallSDNCAdapterVNFTopologyGET" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yrlvgb" sourceRef="CallSDNCAdapterVNFTopologyGET" targetRef="PostProcessSDNCVnfGetRequest" />
+ <bpmn2:scriptTask id="PreProcessSDNCVnfGetRequest" name="PreProcess SDNC VNF Topology GET Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0d00zqi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0g270u0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCGetRequest(execution, 'vnf')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVNFTopologyGET" name="Call SDNC Adapter: VNF Topology GET" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_getSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_getVnfSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0g270u0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1yrlvgb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCVnfGetRequest" name="PostProcess SDNC VNF Toplogy GET request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1yrlvgb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_170kw7h</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DCVFM_getVnfSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "get")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0d00zqi" sourceRef="QueryVNF" targetRef="PreProcessSDNCVnfGetRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_170kw7h" sourceRef="PostProcessSDNCVnfGetRequest" targetRef="IntermediateThrowEvent_3" />
+ <bpmn2:callActivity id="QueryVNF" name="Query VNF" calledElement="GenericGetVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_vnfId" target="GENGV_vnfId" />
+ <camunda:in source="DCVFM_vnfTypeToQuery" target="GENGV_type" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="GENGV_vnf" target="DCVFM_vnfQueryResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0m382su</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0d00zqi</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f53tby" sourceRef="Task_0kuj2a1" targetRef="IntermediateThrowEvent_1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ffvqla" name="Is vf_module_name specified?" default="SequenceFlow_0270n5c">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0270n5c</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05og7iw</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0270n5c" name="yes" sourceRef="ExclusiveGateway_0ffvqla" targetRef="IntermediateThrowEvent_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_05og7iw" name="no" sourceRef="ExclusiveGateway_0ffvqla" targetRef="Task_0kuj2a1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFM_vfModuleName") == null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_0kuj2a1" name="Generate VF Module Name" calledElement="GenerateVfModuleName">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_vnfId" target="vnfId" />
+ <camunda:in source="DCVFM_vnfName" target="vnfName" />
+ <camunda:in source="DCVFM_vfModuleLabel" target="vfModuleLabel" />
+ <camunda:in source="DCVFM_pesonaModelId" target="personaModelId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="vfModuleName" target="DCVFM_vfModuleName" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_05og7iw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1f53tby</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ </bpmn2:process>
+ <bpmn2:message id="Message_1" name="DoCreateVfModuleRequest" />
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="38" y="153" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="44" y="189" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="74" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="147" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="99" y="171" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="147" y="131" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_24" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds x="36" y="376" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="0" y="417" width="114" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_22" bpmnElement="IntermediateThrowEvent_1">
+ <dc:Bounds x="530" y="153" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="571" y="173" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="CallSDNCAdapterVDModuleTopologyAssign">
+ <dc:Bounds x="266" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="CallSDNCAdapterVFModuleTopologyGET">
+ <dc:Bounds x="744" y="670" width="133" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="IsVolumeGroupIdSpecified" isMarkerVisible="true">
+ <dc:Bounds x="144" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="89" y="347" width="178" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ConfirmVolumeGroupTenant">
+ <dc:Bounds x="209" y="528" width="118" height="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_91" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
+ <dc:Bounds x="559" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="423" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="194" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="559" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="393" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="CallVNFAdapterVFModuleCreate">
+ <dc:Bounds x="1236" y="672" width="121" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="UpdateAAIVfModule_1">
+ <dc:Bounds x="768" y="830" width="117" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="CallSDNCAdapterVFModuleTopologyActivate">
+ <dc:Bounds x="1090" y="828" width="119" height="99" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_92" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="1435" y="853" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1432" y="825" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="CreateAAIVfModuleVolumeGroup">
+ <dc:Bounds x="1693" y="986" width="121" height="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_92" targetElement="_BPMNShape_Task_7">
+ <di:waypoint xsi:type="dc:Point" x="1460" y="903" />
+ <di:waypoint xsi:type="dc:Point" x="1460" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1520" y="1042" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1452" y="928" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_93" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
+ <dc:Bounds x="1818" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1843" y="909" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_176" targetElement="_BPMNShape_ExclusiveGateway_93">
+ <di:waypoint xsi:type="dc:Point" x="1813" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="944" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="904" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1839" y="1042" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_92" targetElement="_BPMNShape_ExclusiveGateway_93">
+ <di:waypoint xsi:type="dc:Point" x="1485" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1651" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1651" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="1818" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="878" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_IntermediateCatchEvent_24" targetElement="_BPMNShape_ExclusiveGateway_90">
+ <di:waypoint xsi:type="dc:Point" x="72" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="120" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="120" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="117" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_101" bpmnElement="IsVolumeGroupNameSpecified" isMarkerVisible="true">
+ <dc:Bounds x="360" y="547" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309" y="496" width="200" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_ExclusiveGateway_101">
+ <di:waypoint xsi:type="dc:Point" x="327" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="572" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="338" y="572" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_3" bpmnElement="ConfirmVolumeName">
+ <dc:Bounds x="453" y="528" width="109" height="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_101" targetElement="_BPMNShape_Task_3">
+ <di:waypoint xsi:type="dc:Point" x="410" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="453" y="572" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="410" y="576" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_101" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="385" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="385" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="559" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="392" y="450" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_Task_3" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="561" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="584" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="584" y="418" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="492" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_IntermediateThrowEvent_22">
+ <di:waypoint xsi:type="dc:Point" x="247" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="294" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="156" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_91" targetElement="_BPMNShape_ScriptTask_156">
+ <di:waypoint xsi:type="dc:Point" x="609" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="628" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="628" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="696" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="636" y="394" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="PreProcessSDNCAssignRequest">
+ <dc:Bounds x="109" y="674" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="PostProcessSDNCAssignRequest">
+ <dc:Bounds x="435" y="674" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_44" bpmnElement="IntermediateThrowEvent_3">
+ <dc:Bounds x="2193" y="376" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2181" y="417" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_29" bpmnElement="IntermediateCatchEvent_2">
+ <dc:Bounds x="24" y="706" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="13" y="747" width="58" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_IntermediateCatchEvent_29" targetElement="_BPMNShape_ScriptTask_178">
+ <di:waypoint xsi:type="dc:Point" x="60" y="724" />
+ <di:waypoint xsi:type="dc:Point" x="81" y="724" />
+ <di:waypoint xsi:type="dc:Point" x="81" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="109" y="721" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="78" y="722" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_ScriptTask_157">
+ <di:waypoint xsi:type="dc:Point" x="229" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="266" y="719" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ScriptTask_179">
+ <di:waypoint xsi:type="dc:Point" x="386" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="411" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="411" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="435" y="721" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_213" bpmnElement="PreProcessSDNCGetRequest">
+ <dc:Bounds x="588" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_214" bpmnElement="PostProcessSDNCGetRequest">
+ <dc:Bounds x="924" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_ScriptTask_213">
+ <di:waypoint xsi:type="dc:Point" x="555" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="588" y="719" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_213" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="708" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="718" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_ScriptTask_214">
+ <di:waypoint xsi:type="dc:Point" x="876" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="899" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="899" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="719" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="PreProcessUpdateAAIVfModule_1">
+ <dc:Bounds x="609" y="830" width="118" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_33" bpmnElement="PreProcessSDNCActivateRequest">
+ <dc:Bounds x="935" y="829" width="118" height="98" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_4" bpmnElement="PostProcessSDNCActivateRequest">
+ <dc:Bounds x="1252" y="830" width="121" height="95" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ScriptTask_174">
+ <di:waypoint xsi:type="dc:Point" x="727" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="748" y="853" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_174" targetElement="_BPMNShape_Task_33">
+ <di:waypoint xsi:type="dc:Point" x="884" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="935" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="910" y="853" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_Task_33" targetElement="_BPMNShape_ScriptTask_175">
+ <di:waypoint xsi:type="dc:Point" x="1053" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1090" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1086" y="868" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_175" targetElement="_BPMNShape_Task_4">
+ <di:waypoint xsi:type="dc:Point" x="1208" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1252" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1230" y="852" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_4" targetElement="_BPMNShape_ExclusiveGateway_92">
+ <di:waypoint xsi:type="dc:Point" x="1372" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1404" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1404" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1435" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="868" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_175" bpmnElement="EndEvent_1">
+ <dc:Bounds x="2112" y="861" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2130" y="902" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_93" targetElement="_BPMNShape_ScriptTask_218">
+ <di:waypoint xsi:type="dc:Point" x="1868" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="1934" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1901" y="863.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_45" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="1771" y="701" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1747" y="742" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_30" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="24" y="860" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="16" y="901" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_7" bpmnElement="PrepareCreateAAIVfModuleVolumeGroupRequest">
+ <dc:Bounds x="1520" y="986" width="121" height="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_Task_7" targetElement="_BPMNShape_ScriptTask_176">
+ <di:waypoint xsi:type="dc:Point" x="1640" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1693" y="1042" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1667" y="1017" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_25" bpmnElement="PreProcessVNFAdapterRequest">
+ <dc:Bounds x="1073" y="672" width="121" height="96" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_35" bpmnElement="PostProcessVNFAdapterRequest">
+ <dc:Bounds x="1397" y="674" width="116" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_214" targetElement="_BPMNShape_Task_25">
+ <di:waypoint xsi:type="dc:Point" x="1044" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1073" y="720" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_Task_25" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="1193" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1236" y="720" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_Task_35">
+ <di:waypoint xsi:type="dc:Point" x="1356" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1397" y="720" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="QueryAAIVfModule">
+ <dc:Bounds x="1224" y="516" width="125" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_211" bpmnElement="IsBaseVfModule" isMarkerVisible="true">
+ <dc:Bounds x="1128" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1092" y="336" width="124" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_212" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="1408" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1395" y="329" width="75" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ExclusiveGateway_211" targetElement="_BPMNShape_ScriptTask_215">
+ <di:waypoint xsi:type="dc:Point" x="1153" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="1153" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1224" y="562" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1122" y="450" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ExclusiveGateway_211" targetElement="_BPMNShape_ExclusiveGateway_212">
+ <di:waypoint xsi:type="dc:Point" x="1178" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1285" y="393" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_216" bpmnElement="PostProcessCreateAAIVfModule">
+ <dc:Bounds x="897" y="348" width="125" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_216" targetElement="_BPMNShape_ExclusiveGateway_211">
+ <di:waypoint xsi:type="dc:Point" x="1021" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1075" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1075" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1128" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1072" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ExclusiveGateway_212">
+ <di:waypoint xsi:type="dc:Point" x="1348" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1378" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1378" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1393" y="468" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="ScriptTask_setSuccess">
+ <dc:Bounds x="1934" y="831" width="128" height="95" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_EndEvent_175">
+ <di:waypoint xsi:type="dc:Point" x="2062" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="2112" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2087" y="863.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_254" bpmnElement="QueryCloudRegion">
+ <dc:Bounds x="101" y="440" width="134" height="81" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ScriptTask_254">
+ <di:waypoint xsi:type="dc:Point" x="169" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="429" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="429" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="440" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="180" y="417" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_43" sourceElement="_BPMNShape_ScriptTask_254" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="168" y="520" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="524" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="208" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="574" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="29" y="1197" width="405" height="203" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_55" bpmnElement="StartEvent_2">
+ <dc:Bounds x="58" y="1281" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="76" y="1322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_2">
+ <dc:Bounds x="370" y="1281" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="1322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_284" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="165" y="1258" width="134" height="81" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_55" targetElement="_BPMNShape_ScriptTask_284">
+ <di:waypoint xsi:type="dc:Point" x="94" y="1299" />
+ <di:waypoint xsi:type="dc:Point" x="165" y="1298" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="118" y="1299" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_284" targetElement="_BPMNShape_EndEvent_181">
+ <di:waypoint xsi:type="dc:Point" x="299" y="1298" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="1299" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="329" y="1298" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="CreateAAIVfModule">
+ <dc:Bounds x="696" y="348" width="121" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_216">
+ <di:waypoint xsi:type="dc:Point" x="816" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="897" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="857" y="369" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_183x8vk_di" bpmnElement="ExclusiveGateway_183x8vk" isMarkerVisible="true">
+ <dc:Bounds x="1565.9780439121755" y="696" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1546" y="746" width="89" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ushk1d_di" bpmnElement="SequenceFlow_1ushk1d">
+ <di:waypoint xsi:type="dc:Point" x="1513" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1566" y="721" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1540" y="705.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ery1pk_di" bpmnElement="SequenceFlow_0ery1pk">
+ <di:waypoint xsi:type="dc:Point" x="1591" y="696" />
+ <di:waypoint xsi:type="dc:Point" x="1591" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1621" y="616" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1558" y="658" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xfanpi_di" bpmnElement="SequenceFlow_0xfanpi">
+ <di:waypoint xsi:type="dc:Point" x="1616" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="1771" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1688" y="695" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0abffyj_di" bpmnElement="SequenceFlow_0abffyj">
+ <di:waypoint xsi:type="dc:Point" x="1721" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1746" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1746" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1771" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1761" y="667.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1dv7amn_di" bpmnElement="CreateNetworkPoliciesInAAI">
+ <dc:Bounds x="1621" y="576" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0f54imv_di" bpmnElement="ExclusiveGateway_0f54imv" isMarkerVisible="true">
+ <dc:Bounds x="114.59500000000003" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="101" y="819" width="77" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1edqxlf_di" bpmnElement="ExclusiveGateway_1edqxlf" isMarkerVisible="true">
+ <dc:Bounds x="482.595" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bi38s7_di" bpmnElement="SequenceFlow_0bi38s7">
+ <di:waypoint xsi:type="dc:Point" x="140" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="193" y="1057" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="980.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qm81ym_di" bpmnElement="SequenceFlow_1qm81ym">
+ <di:waypoint xsi:type="dc:Point" x="293" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="365" y="1057" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="1057" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_112los9_di" bpmnElement="SequenceFlow_112los9">
+ <di:waypoint xsi:type="dc:Point" x="465" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="904" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="487" y="1042" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1k5uku2_di" bpmnElement="SequenceFlow_1k5uku2">
+ <di:waypoint xsi:type="dc:Point" x="165" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="483" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="318" y="864" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1avfxsz_di" bpmnElement="SequenceFlow_1avfxsz">
+ <di:waypoint xsi:type="dc:Point" x="533" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="609" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="586" y="879" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0363dz7_di" bpmnElement="SequenceFlow_0363dz7">
+ <di:waypoint xsi:type="dc:Point" x="60" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="115" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="853.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o3bcyq_di" bpmnElement="PreProcessUpdateAAIGenericVnf">
+ <dc:Bounds x="193" y="1018" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0j45ic9_di" bpmnElement="UpdateAAIGenericVNFTask">
+ <dc:Bounds x="365" y="1017" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zcfn2x_di" bpmnElement="SequenceFlow_0zcfn2x">
+ <di:waypoint xsi:type="dc:Point" x="1458" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="2193" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1822" y="368.5010168687388" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0m382su_di" bpmnElement="SequenceFlow_0m382su">
+ <di:waypoint xsi:type="dc:Point" x="1433" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="1433" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1513" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1439" y="459.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g270u0_di" bpmnElement="SequenceFlow_0g270u0">
+ <di:waypoint xsi:type="dc:Point" x="1766" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1816" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1791" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yrlvgb_di" bpmnElement="SequenceFlow_1yrlvgb">
+ <di:waypoint xsi:type="dc:Point" x="1916" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1969" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1943" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1j22oyj_di" bpmnElement="PreProcessSDNCVnfGetRequest">
+ <dc:Bounds x="1666" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_10t4tix_di" bpmnElement="CallSDNCAdapterVNFTopologyGET">
+ <dc:Bounds x="1816" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09wgk9p_di" bpmnElement="PostProcessSDNCVnfGetRequest">
+ <dc:Bounds x="1969" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0d00zqi_di" bpmnElement="SequenceFlow_0d00zqi">
+ <di:waypoint xsi:type="dc:Point" x="1613" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1666" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1640" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_170kw7h_di" bpmnElement="SequenceFlow_170kw7h">
+ <di:waypoint xsi:type="dc:Point" x="2069" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="2131" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="2131" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="2193" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2146" y="447.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0xev9kl_di" bpmnElement="QueryVNF">
+ <dc:Bounds x="1513" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f53tby_di" bpmnElement="SequenceFlow_1f53tby">
+ <di:waypoint xsi:type="dc:Point" x="478" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="548" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="548" y="189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="513" y="267" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ffvqla_di" bpmnElement="ExclusiveGateway_0ffvqla" isMarkerVisible="true">
+ <dc:Bounds x="294" y="145.86" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="276" y="97.86000000000001" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0270n5c_di" bpmnElement="SequenceFlow_0270n5c">
+ <di:waypoint xsi:type="dc:Point" x="344" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="401" y="145" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05og7iw_di" bpmnElement="SequenceFlow_05og7iw">
+ <di:waypoint xsi:type="dc:Point" x="319" y="196" />
+ <di:waypoint xsi:type="dc:Point" x="319" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="378" y="282" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="328" y="239" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_14nvmgk_di" bpmnElement="Task_0kuj2a1">
+ <dc:Bounds x="378" y="242" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn index 0444b69633..7a7f369e42 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn @@ -17,8 +17,7 @@ def dcvfmr = new DoCreateVfModuleRollback() dcvfmr.preProcessRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke - PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule"> + <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke
PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule"> <bpmn2:extensionElements> <camunda:in source="PrepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest" /> <camunda:out source="WorkflowException" target="WorkflowException" /> @@ -40,8 +39,7 @@ dcvfmr.preProcessRequest(execution)]]></bpmn2:script> <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing> <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing> </bpmn2:exclusiveGateway> - <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter - Prep" scriptFormat="groovy"> + <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter
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.* @@ -49,8 +47,7 @@ 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 - VNFAdapterRestV1" calledElement="vnfAdapterRestV1"> + <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke
VNFAdapterRestV1" calledElement="vnfAdapterRestV1"> <bpmn2:extensionElements> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="vnfAdapterRestV1Request" target="vnfAdapterRestV1Request" /> @@ -67,8 +64,7 @@ dcvfmr.prepVNFAdapterRequest(execution)]]></bpmn2:script> </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 - Prep" scriptFormat="groovy"> + <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule
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.* @@ -76,8 +72,7 @@ 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 - UpdateAAIVfModule" calledElement="UpdateAAIVfModule"> + <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke
UpdateAAIVfModule" calledElement="UpdateAAIVfModule"> <bpmn2:extensionElements> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" /> @@ -107,8 +102,7 @@ dcvfmr.prepUpdateAAIVfModule(execution)]]></bpmn2:script> <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 - Prep" scriptFormat="groovy"> + <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter
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.* @@ -116,8 +110,7 @@ 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 - SDNCAdapterV1" calledElement="sdncAdapter"> + <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke
SDNCAdapterV1" calledElement="sdncAdapter"> <bpmn2:extensionElements> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" /> @@ -140,8 +133,7 @@ dcvfmr.prepSDNCAdapterRequest(execution)]]></bpmn2:script> <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 - DeleteAAIVfModule" calledElement="DeleteAAIVfModule"> + <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke
DeleteAAIVfModule" calledElement="DeleteAAIVfModule"> <bpmn2:extensionElements> <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest" /> <camunda:in source="isVidRequest" target="isVidRequest" /> @@ -156,8 +148,7 @@ dcvfmr.prepSDNCAdapterRequest(execution)]]></bpmn2:script> <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming> <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule - Prep" scriptFormat="groovy"> + <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule
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.* @@ -671,4 +662,4 @@ dcvfmr.preProcessUpdateAAIGenericVnf(execution)]]></bpmn2:script> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions>
\ No newline at end of file +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn index 91fca3d213..5e88527676 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="DoCreateVnf" name="DoCreateVnf" isExecutable="true"> <bpmn2:startEvent id="StartEvent_1"> <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> @@ -8,8 +8,8 @@ <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() + <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" /> @@ -87,8 +87,8 @@ exceptionUtil.buildWorkflowException(execution, 5000, "Generic Vnf Already Exist <bpmn2:scriptTask id="prepareCreateGenericVnf" name="Prepare 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() + <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" /> @@ -102,7 +102,7 @@ createVnf.prepareCreateGenericVnf(execution)]]></bpmn2:script> <camunda:in source="DoCVNF_type" target="GENPV_type" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1acnwwu</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0seif8n</bpmn2:outgoing> </bpmn2:callActivity> <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true"> <bpmn2:scriptTask id="processJavaError" name="Process Error" scriptFormat="groovy"> @@ -133,12 +133,11 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script> <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() + <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"> @@ -157,18 +156,18 @@ createVnf.preProcessSDNCAssignRequest(execution)]]></bpmn2:script> <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() + <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() + <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"> @@ -187,22 +186,31 @@ createVnf.preProcessSDNCActivateRequest(execution)]]></bpmn2:script> <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() + <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:incoming>SequenceFlow_1gc18ih</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0ttqcwx</bpmn2:outgoing> <bpmn2:outgoing>SequenceFlow_0ay5l4b</bpmn2:outgoing> </bpmn2:exclusiveGateway> <bpmn2:sequenceFlow id="SequenceFlow_0ttqcwx" name="yes" sourceRef="ExclusiveGateway_045rm8i" targetRef="preProcessSDNCAssignRequest"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("SDNCInteractionEnabled" ) == true}]]></bpmn2:conditionExpression> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion" ) == '1707'}]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> <bpmn2:sequenceFlow id="SequenceFlow_0ay5l4b" name="no" sourceRef="ExclusiveGateway_045rm8i" targetRef="EndEvent_3" /> + <bpmn2:sequenceFlow id="SequenceFlow_0seif8n" sourceRef="callPutVnf" targetRef="postProcessCreateGenericVnf" /> + <bpmn2:sequenceFlow id="SequenceFlow_1gc18ih" sourceRef="postProcessCreateGenericVnf" targetRef="ExclusiveGateway_045rm8i" /> + <bpmn2:scriptTask id="postProcessCreateGenericVnf" name="PostProcess Create Generic Vnf" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0seif8n</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1gc18ih</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script> + </bpmn2:scriptTask> </bpmn2:process> <bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" /> <bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> @@ -420,13 +428,6 @@ createVnfInfra.validateSDNCResponse(execution, response, "activate")]]></bpmn2:s <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> @@ -446,30 +447,46 @@ createVnfInfra.validateSDNCResponse(execution, response, "activate")]]></bpmn2:s <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" /> + <dc:Bounds x="1336" y="215" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1286" y="163" width="54" height="36" /> + <dc:Bounds x="1334" y="163" width="54" height="36" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0ttqcwx_di" bpmnElement="SequenceFlow_0ttqcwx"> - <di:waypoint xsi:type="dc:Point" x="1313" y="265" /> - <di:waypoint xsi:type="dc:Point" x="1313" y="475" /> + <di:waypoint xsi:type="dc:Point" x="1361" y="265" /> + <di:waypoint xsi:type="dc:Point" x="1361" y="475" /> <di:waypoint xsi:type="dc:Point" x="106" y="475" /> <di:waypoint xsi:type="dc:Point" x="106" y="555" /> <di:waypoint xsi:type="dc:Point" x="206" y="555" /> <bpmndi:BPMNLabel> - <dc:Bounds x="701" y="460" width="18" height="12" /> + <dc:Bounds x="726" y="460" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0ay5l4b_di" bpmnElement="SequenceFlow_0ay5l4b"> - <di:waypoint xsi:type="dc:Point" x="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="1361" y="265" /> + <di:waypoint xsi:type="dc:Point" x="1361" y="555" /> <di:waypoint xsi:type="dc:Point" x="1162" y="555" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1400" y="397.5" width="12" height="12" /> + <dc:Bounds x="1400" y="398" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0seif8n_di" bpmnElement="SequenceFlow_0seif8n"> + <di:waypoint xsi:type="dc:Point" x="1180" y="240" /> + <di:waypoint xsi:type="dc:Point" x="1213" y="240" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1197" y="225" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1gc18ih_di" bpmnElement="SequenceFlow_1gc18ih"> + <di:waypoint xsi:type="dc:Point" x="1313" y="240" /> + <di:waypoint xsi:type="dc:Point" x="1336" y="240" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1325" y="225" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0y55cyz_di" bpmnElement="postProcessCreateGenericVnf"> + <dc:Bounds x="1213" y="200" width="100" height="80" /> + </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn index 58a88c2b56..433957572d 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn @@ -29,12 +29,16 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script> <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="RollbackData" target="DCVAM_baseRollbackData" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="vnfModelInfo" target="vnfModelInfo" /> + <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1hf7k7q</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_02oe9wx</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1ixcnb6</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_0o4vuzt" sourceRef="StartEvent_1" targetRef="PreProcessRequest" /> <bpmn:sequenceFlow id="SequenceFlow_1xd3ri5" sourceRef="PreProcessRequest" targetRef="CreateVNF" /> @@ -56,9 +60,13 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script> <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="RollbackData" target="DCVAM_addOnRollbackData" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="vnfModelInfo" target="vnfModelInfo" /> + <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1lh21yl</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1llbx0k</bpmn:outgoing> @@ -81,8 +89,8 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script> <camunda:property /> </camunda:properties> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_02oe9wx</bpmn:incoming> <bpmn:incoming>SequenceFlow_07gl6gw</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1a6wyuu</bpmn:incoming> <bpmn:outgoing>SequenceFlow_132bohl</bpmn:outgoing> <bpmn:outgoing>SequenceFlow_0jz6bqn</bpmn:outgoing> </bpmn:exclusiveGateway> @@ -104,6 +112,9 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script> <camunda:out source="vnfOutputParams" target="vnfOutputParams" /> <camunda:out source="RollbackData" target="RollbackData" /> <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1xd3ri5</bpmn:incoming> <bpmn:outgoing>SequenceFlow_08i3uo6</bpmn:outgoing> @@ -165,7 +176,6 @@ doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script> <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> @@ -174,6 +184,15 @@ doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script> def doCreateVnfAndModules = new DoCreateVnfAndModules() doCreateVnfAndModules.finisthProcessingInitialCountDeployment(execution)]]></bpmn:script> </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1ixcnb6" sourceRef="CreateBaseVfModule" targetRef="Task_054rz9i" /> + <bpmn:sequenceFlow id="SequenceFlow_1a6wyuu" sourceRef="Task_054rz9i" targetRef="ExclusiveGateway_1vyqr5o" /> + <bpmn:scriptTask id="Task_054rz9i" name="Validate Create Base VF Module Response" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1ixcnb6</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1a6wyuu</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def doCreateVnfAndModules = new DoCreateVnfAndModules() +doCreateVnfAndModules.validateBaseModule(execution)]]></bpmn:script> + </bpmn:scriptTask> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModules"> @@ -204,44 +223,44 @@ doCreateVnfAndModules.finisthProcessingInitialCountDeployment(execution)]]></bpm </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_0auiwq0_di" bpmnElement="CreateAddOnVfModule"> - <dc:Bounds x="1626" y="57" width="100" height="80" /> + <dc:Bounds x="1749" 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" /> + <dc:Bounds x="1888" 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" /> + <dc:Bounds x="2011" y="147" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1906" y="183" width="0" height="0" /> + <dc:Bounds x="2029" y="183" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1llbx0k_di" bpmnElement="SequenceFlow_1llbx0k"> - <di:waypoint xsi:type="dc:Point" x="1726" y="97" /> - <di:waypoint xsi:type="dc:Point" x="1765" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1849" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1888" y="97" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1746" y="82" width="0" height="0" /> + <dc:Bounds x="1869" y="82" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_1vyqr5o_di" bpmnElement="ExclusiveGateway_1vyqr5o" isMarkerVisible="true"> - <dc:Bounds x="1043" y="140" width="50" height="50" /> + <dc:Bounds x="1166" y="140" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1027" y="190" width="84" height="24" /> + <dc:Bounds x="1150" y="190" width="84" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_132bohl_di" bpmnElement="SequenceFlow_132bohl"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="1191" y="140" /> + <di:waypoint xsi:type="dc:Point" x="1191" y="36" /> + <di:waypoint xsi:type="dc:Point" x="2029" y="36" /> + <di:waypoint xsi:type="dc:Point" x="2029" y="147" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1488" y="21" width="14" height="12" /> + <dc:Bounds x="1612" y="21" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_0zr4ioh_di" bpmnElement="CreateVNF"> <dc:Bounds x="430" y="125" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_0tknqn1_di" bpmnElement="PreProcessAddOnModule"> - <dc:Bounds x="1177" y="125" width="100" height="80" /> + <dc:Bounds x="1300" y="125" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1u6qcio_di" bpmnElement="QueryCatalogDB"> <dc:Bounds x="590" y="125" width="100" height="80" /> @@ -254,51 +273,51 @@ doCreateVnfAndModules.finisthProcessingInitialCountDeployment(execution)]]></bpm </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" /> + <dc:Bounds x="1493" y="140" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1366" y="190" width="58" height="24" /> + <dc:Bounds x="1489" y="190" width="58" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0jz6bqn_di" bpmnElement="SequenceFlow_0jz6bqn"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="1216" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1258" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1258" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1298" y="165" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1095" y="147.2226828816689" width="18" height="12" /> + <dc:Bounds x="1219" y="147" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0kld3qt_di" bpmnElement="SequenceFlow_0kld3qt"> - <di:waypoint xsi:type="dc:Point" x="1395" y="140" /> - <di:waypoint xsi:type="dc:Point" x="1395" y="89" /> - <di:waypoint xsi:type="dc:Point" x="1478" y="89" /> + <di:waypoint xsi:type="dc:Point" x="1518" y="140" /> + <di:waypoint xsi:type="dc:Point" x="1518" y="89" /> + <di:waypoint xsi:type="dc:Point" x="1601" y="89" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1411" y="96" width="18" height="12" /> + <dc:Bounds x="1534" y="96" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1mguf2m_di" bpmnElement="SequenceFlow_1mguf2m"> - <di:waypoint xsi:type="dc:Point" x="1815" y="137" /> - <di:waypoint xsi:type="dc:Point" x="1815" y="165" /> - <di:waypoint xsi:type="dc:Point" x="1420" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1938" y="137" /> + <di:waypoint xsi:type="dc:Point" x="1938" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1543" y="165" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1830" y="151" width="0" height="0" /> + <dc:Bounds x="1953" y="151" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1vrogpr_di" bpmnElement="SequenceFlow_1vrogpr"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="1518" y="190" /> + <di:waypoint xsi:type="dc:Point" x="1518" y="221" /> + <di:waypoint xsi:type="dc:Point" x="1518" y="221" /> + <di:waypoint xsi:type="dc:Point" x="1518" y="258" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1404" y="221" width="12" height="12" /> + <dc:Bounds x="1527" y="221" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_07gl6gw_di" bpmnElement="SequenceFlow_07gl6gw"> - <di:waypoint xsi:type="dc:Point" x="1345" y="298" /> - <di:waypoint xsi:type="dc:Point" x="1069" y="298" /> - <di:waypoint xsi:type="dc:Point" x="1068" y="190" /> + <di:waypoint xsi:type="dc:Point" x="1468" y="298" /> + <di:waypoint xsi:type="dc:Point" x="1192" y="298" /> + <di:waypoint xsi:type="dc:Point" x="1191" y="190" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1207" y="283" width="0" height="0" /> + <dc:Bounds x="1330" y="283" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1ifw9tw_di" bpmnElement="SequenceFlow_1ifw9tw"> @@ -319,33 +338,41 @@ doCreateVnfAndModules.finisthProcessingInitialCountDeployment(execution)]]></bpm <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" /> + <dc:Bounds x="1601" y="57" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1lh21yl_di" bpmnElement="SequenceFlow_1lh21yl"> - <di:waypoint xsi:type="dc:Point" x="1578" y="97" /> - <di:waypoint xsi:type="dc:Point" x="1626" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1701" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1749" y="97" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1602" y="82" width="0" height="0" /> + <dc:Bounds x="1725" y="82" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_02oe9wx_di" bpmnElement="SequenceFlow_02oe9wx"> + <bpmndi:BPMNEdge id="SequenceFlow_12x4dvf_di" bpmnElement="SequenceFlow_12x4dvf"> + <di:waypoint xsi:type="dc:Point" x="1400" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1493" y="165" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1447" y="140" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_144n0mg_di" bpmnElement="FinishProcessingInitialCountDeployment"> + <dc:Bounds x="1468" y="258" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ixcnb6_di" bpmnElement="SequenceFlow_1ixcnb6"> <di:waypoint xsi:type="dc:Point" x="988" y="165" /> - <di:waypoint xsi:type="dc:Point" x="1015" y="165" /> - <di:waypoint xsi:type="dc:Point" x="1015" y="165" /> - <di:waypoint xsi:type="dc:Point" x="1043" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1030" y="165" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1030" y="165" width="0" height="0" /> + <dc:Bounds x="1009" y="150" 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:BPMNEdge id="SequenceFlow_1a6wyuu_di" bpmnElement="SequenceFlow_1a6wyuu"> + <di:waypoint xsi:type="dc:Point" x="1130" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1166" y="165" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1324" y="140" width="0" height="0" /> + <dc:Bounds x="1148" y="150" 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 id="ScriptTask_1obevnp_di" bpmnElement="Task_054rz9i"> + <dc:Bounds x="1030" y="125" width="100" height="80" /> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn new file mode 100644 index 0000000000..2fba166dc4 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn @@ -0,0 +1,282 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_Wblj8GyfEeWUWLTvug7ZOg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="DoCreateVnfAndModulesRollback" name="DoCreateVnfAndModulesRollback" isExecutable="true"> + <bpmn2:subProcess id="SubProcess_1" name="Rollback Error Handling" triggeredByEvent="true"> + <bpmn2:startEvent id="CatchExceptions" name="Catch Exceptions"> + <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" /> + </bpmn2:startEvent> + <bpmn2:endEvent id="EndEvent_1"> + <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CatchExceptions" targetRef="LogSaveWorkflowException" /> + <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcvfmr = new DoCreateVfModuleRollback() +dcvfmr.logWorkflowException(execution, 'DoCreateVfModuleRollback caught an event') +dcvfmr.saveWorkflowException(execution, 'DCVFMR_CaughtWorkflowException1')]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="LogSaveWorkflowException" targetRef="EndEvent_1" /> + </bpmn2:subProcess> + <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1"> + <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="_ErrorEventDefinition_86" /> + </bpmn2:boundaryEvent> + <bpmn2:endEvent id="EndEvent_2"> + <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_2" /> + <bpmn2:startEvent id="StartEvent_1gai4qr"> + <bpmn2:outgoing>SequenceFlow_1537b7m</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:exclusiveGateway id="ExclusiveGateway_12v8g91" name="Are there VF Modules to roll back?" default="SequenceFlow_1r6wyy6"> + <bpmn2:incoming>SequenceFlow_0bmsi5h</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1srw52v</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1r6wyy6</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0v85t87</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:exclusiveGateway id="ExclusiveGateway_09ajxqr" name="Delete VNF?" default="SequenceFlow_1yas9ol"> + <bpmn2:incoming>SequenceFlow_1r6wyy6</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1kr0r4a</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1yas9ol</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:endEvent id="EndEvent_1seag7u"> + <bpmn2:incoming>SequenceFlow_04yd2yr</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1yas9ol</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1537b7m" sourceRef="StartEvent_1gai4qr" targetRef="PreProcessRequest" /> + <bpmn2:scriptTask id="PreProcessRequest" name="PreProcess Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1537b7m</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0bmsi5h</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcvamr = new DoCreateVnfAndModulesRollback() +dcvamr.preProcessRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0bmsi5h" sourceRef="PreProcessRequest" targetRef="ExclusiveGateway_12v8g91" /> + <bpmn2:sequenceFlow id="SequenceFlow_1ycq005" sourceRef="Task_1sbxjc8" targetRef="Task_0ifyxgt" /> + <bpmn2:scriptTask id="Task_1sbxjc8" name="Prepare Rollback Create VF Module Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0v85t87</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1ycq005</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcvamr = new DoCreateVnfAndModulesRollback() +dcvamr.preProcessCreateVfModuleRollback(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="Task_0ifyxgt" name="Rollback Create VF Module " calledElement="DoCreateVfModuleRollback"> + <bpmn2:extensionElements> + <camunda:in source="DCVAMR_RollbackData" target="RollbackData" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source=""true"" target="isVidRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1ycq005</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_181hb2a</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_1r6wyy6" name="no" sourceRef="ExclusiveGateway_12v8g91" targetRef="ExclusiveGateway_09ajxqr" /> + <bpmn2:sequenceFlow id="SequenceFlow_0v85t87" name="yes" sourceRef="ExclusiveGateway_12v8g91" targetRef="Task_1sbxjc8"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAMR_numOfModulesToDelete") > 0}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_1kr0r4a" name="yes" sourceRef="ExclusiveGateway_09ajxqr" targetRef="Task_0p8fmrm"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAMR_vnfId") != null}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_04yd2yr" sourceRef="Task_0p8fmrm" targetRef="EndEvent_1seag7u" /> + <bpmn2:sequenceFlow id="SequenceFlow_1yas9ol" name="no" sourceRef="ExclusiveGateway_09ajxqr" targetRef="EndEvent_1seag7u" /> + <bpmn2:callActivity id="Task_0p8fmrm" name="Delete VNF" calledElement="DoDeleteVnf"> + <bpmn2:extensionElements> + <camunda:in source="DCVAMR_vnfId" target="vnfId" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1kr0r4a</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_04yd2yr</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_181hb2a" sourceRef="Task_0ifyxgt" targetRef="Task_0kf9oby" /> + <bpmn2:scriptTask id="Task_0kf9oby" name="PostProcess Rollback Create VF Module" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_181hb2a</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1srw52v</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcvamr = new DoCreateVnfAndModulesRollback() +dcvamr.postProcessCreateVfModuleRollback(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1srw52v" sourceRef="Task_0kf9oby" targetRef="ExclusiveGateway_12v8g91" /> + </bpmn2:process> + <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> + <bpmn2:message id="Message_1" name="DoCreateVfModuleRollbackRequest" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModulesRollback"> + <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_1" isExpanded="true"> + <dc:Bounds x="18" y="1012" width="469" height="150" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_59" bpmnElement="CatchExceptions"> + <dc:Bounds x="36" y="1063" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="42" y="1108" width="85" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_281" bpmnElement="LogSaveWorkflowException"> + <dc:Bounds x="174" y="1041" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1"> + <dc:Bounds x="349" y="1062" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="367" y="1098" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1"> + <dc:Bounds x="469" y="1058" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="487" y="1094" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2"> + <dc:Bounds x="593" y="1058" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="611" y="1099" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_59" targetElement="_BPMNShape_ScriptTask_281"> + <di:waypoint xsi:type="dc:Point" x="72" y="1081" /> + <di:waypoint xsi:type="dc:Point" x="174" y="1081" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="120" y="1081" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_281" targetElement="_BPMNShape_EndEvent_188"> + <di:waypoint xsi:type="dc:Point" x="274" y="1081" /> + <di:waypoint xsi:type="dc:Point" x="311" y="1081" /> + <di:waypoint xsi:type="dc:Point" x="311" y="1080" /> + <di:waypoint xsi:type="dc:Point" x="349" y="1080" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="326" y="1071" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_BoundaryEvent_55" targetElement="_BPMNShape_EndEvent_189"> + <di:waypoint xsi:type="dc:Point" x="505" y="1076" /> + <di:waypoint xsi:type="dc:Point" x="593" y="1076" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="550" y="1051" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="StartEvent_1gai4qr_di" bpmnElement="StartEvent_1gai4qr"> + <dc:Bounds x="7.752742616033771" y="654.7502109704641" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="26" y="690.7502109704641" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_12v8g91_di" bpmnElement="ExclusiveGateway_12v8g91" isMarkerVisible="true"> + <dc:Bounds x="284.2253164556962" y="648.1721518987342" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="273" y="698" width="73" height="36" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_09ajxqr_di" bpmnElement="ExclusiveGateway_09ajxqr" isMarkerVisible="true"> + <dc:Bounds x="833.4869198312236" y="648" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="828" y="698" width="62" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1seag7u_di" bpmnElement="EndEvent_1seag7u"> + <dc:Bounds x="1101.651476793249" y="655" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1120" y="691" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1537b7m_di" bpmnElement="SequenceFlow_1537b7m"> + <di:waypoint xsi:type="dc:Point" x="44" y="673" /> + <di:waypoint xsi:type="dc:Point" x="131" y="673" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="88" y="658" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0fckboe_di" bpmnElement="PreProcessRequest"> + <dc:Bounds x="131" y="633" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0bmsi5h_di" bpmnElement="SequenceFlow_0bmsi5h"> + <di:waypoint xsi:type="dc:Point" x="231" y="673" /> + <di:waypoint xsi:type="dc:Point" x="257" y="673" /> + <di:waypoint xsi:type="dc:Point" x="257" y="673" /> + <di:waypoint xsi:type="dc:Point" x="284" y="673" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="272" y="673" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ycq005_di" bpmnElement="SequenceFlow_1ycq005"> + <di:waypoint xsi:type="dc:Point" x="469" y="509" /> + <di:waypoint xsi:type="dc:Point" x="502" y="510" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="486" y="494.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1sc2oye_di" bpmnElement="Task_1sbxjc8"> + <dc:Bounds x="369" y="470" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1lj1iud_di" bpmnElement="Task_0ifyxgt"> + <dc:Bounds x="502" y="470" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1r6wyy6_di" bpmnElement="SequenceFlow_1r6wyy6"> + <di:waypoint xsi:type="dc:Point" x="309" y="698" /> + <di:waypoint xsi:type="dc:Point" x="309" y="755" /> + <di:waypoint xsi:type="dc:Point" x="769" y="755" /> + <di:waypoint xsi:type="dc:Point" x="769" y="673" /> + <di:waypoint xsi:type="dc:Point" x="833" y="673" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="533" y="740" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0v85t87_di" bpmnElement="SequenceFlow_0v85t87"> + <di:waypoint xsi:type="dc:Point" x="309" y="648" /> + <di:waypoint xsi:type="dc:Point" x="309" y="510" /> + <di:waypoint xsi:type="dc:Point" x="369" y="510" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="315" y="579" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1kr0r4a_di" bpmnElement="SequenceFlow_1kr0r4a"> + <di:waypoint xsi:type="dc:Point" x="858" y="648" /> + <di:waypoint xsi:type="dc:Point" x="858" y="589" /> + <di:waypoint xsi:type="dc:Point" x="945" y="589" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="864" y="619" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_04yd2yr_di" bpmnElement="SequenceFlow_04yd2yr"> + <di:waypoint xsi:type="dc:Point" x="1045" y="589" /> + <di:waypoint xsi:type="dc:Point" x="1120" y="589" /> + <di:waypoint xsi:type="dc:Point" x="1120" y="655" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1083" y="574" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1yas9ol_di" bpmnElement="SequenceFlow_1yas9ol"> + <di:waypoint xsi:type="dc:Point" x="883" y="673" /> + <di:waypoint xsi:type="dc:Point" x="1102" y="673" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="987" y="658" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_01fs058_di" bpmnElement="Task_0p8fmrm"> + <dc:Bounds x="945" y="549" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_181hb2a_di" bpmnElement="SequenceFlow_181hb2a"> + <di:waypoint xsi:type="dc:Point" x="602" y="510" /> + <di:waypoint xsi:type="dc:Point" x="641" y="510" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="622" y="495" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_196e1px_di" bpmnElement="Task_0kf9oby"> + <dc:Bounds x="641" y="470" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1srw52v_di" bpmnElement="SequenceFlow_1srw52v"> + <di:waypoint xsi:type="dc:Point" x="691" y="550" /> + <di:waypoint xsi:type="dc:Point" x="691" y="673" /> + <di:waypoint xsi:type="dc:Point" x="334" y="673" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="706" y="611.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn index 84b6d68149..3c581865cc 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn @@ -65,7 +65,6 @@ validateSDNCResponse.validateSDNCResponse(execution) <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.* @@ -76,7 +75,6 @@ DoDeleteNetworkInstance.postProcessResponse(execution) <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() @@ -107,20 +105,19 @@ DoDeleteNetworkInstance.prepareRpcSDNCDeactivateRollback(execution)]]></bpmn2:sc <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:sequenceFlow id="SequenceFlow_0jb7rws" name="Yes" sourceRef="ExclusiveGateway_1x7o5bo" targetRef="ExclusiveGateway_01xin16"> <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isSdncDeactivateRollbackNeeded") == true}]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> <bpmn2:inclusiveGateway id="ExclusiveGateway_01xin16"> <bpmn2:incoming>SequenceFlow_1suj1nc</bpmn2:incoming> <bpmn2:incoming>SequenceFlow_1raa09h</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0jb7rws</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1nl99y6</bpmn2:outgoing> </bpmn2:inclusiveGateway> <bpmn2:sequenceFlow id="SequenceFlow_1raa09h" sourceRef="ExclusiveGateway_1x7o5bo" targetRef="ExclusiveGateway_01xin16" /> @@ -142,6 +139,9 @@ DoDeleteNetworkInstance.prepareRollbackData(execution)]]></bpmn2:script> def DoDeleteNetworkInstance = new DoDeleteNetworkInstance() DoDeleteNetworkInstance.setExceptionFlag(execution)]]></bpmn2:script> </bpmn2:scriptTask> + <bpmn2:textAnnotation id="TextAnnotation_0i06ryl"> <bpmn2:text>Rollback Not Needed for Delete.</bpmn2:text> +</bpmn2:textAnnotation> + <bpmn2:association id="Association_0gzsxad" sourceRef="CallActivity_0lku52d" targetRef="TextAnnotation_0i06ryl" /> </bpmn2:subProcess> <bpmn2:exclusiveGateway id="isAAIQueryOk_ExclusiveGateway_2" name="Is AAI Query Ok?" default="querySuccessNo_SequenceFlow"> <bpmn2:incoming>isRelationshipExistNo_SequenceFlow</bpmn2:incoming> @@ -858,13 +858,6 @@ DoDeleteNetworkInstance.validateRpcSDNCDeactivateResponse(execution)]]></bpmn2:s <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> @@ -874,10 +867,10 @@ DoDeleteNetworkInstance.validateRpcSDNCDeactivateResponse(execution)]]></bpmn2:s <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" /> + <di:waypoint xsi:type="dc:Point" x="437" y="772" /> + <di:waypoint xsi:type="dc:Point" x="437" y="799" /> <bpmndi:BPMNLabel> - <dc:Bounds x="300" y="755.74" width="19" height="13" /> + <dc:Bounds x="312" y="776.0384854424079" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="InclusiveGateway_17qke2s_di" bpmnElement="ExclusiveGateway_01xin16"> @@ -928,6 +921,13 @@ DoDeleteNetworkInstance.validateRpcSDNCDeactivateResponse(execution)]]></bpmn2:s <bpmndi:BPMNShape id="ScriptTask_1gtl61j_di" bpmnElement="Task_0026x4v"> <dc:Bounds x="124" y="874" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="TextAnnotation_0i06ryl_di" bpmnElement="TextAnnotation_0i06ryl"> + <dc:Bounds x="592" y="596" width="106" height="45" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="Association_0gzsxad_di" bpmnElement="Association_0gzsxad"> + <di:waypoint xsi:type="dc:Point" x="606" y="665" /> + <di:waypoint xsi:type="dc:Point" x="627" y="641" /> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn index 17f5ce4a40..2c5fa5ae4b 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn @@ -84,7 +84,7 @@ DoDeleteNetworkInstanceRollback.processJavaException(execution)]]></bpmn:script> <camunda:connector> <camunda:inputOutput> <camunda:inputParameter name="payload">${DELNWKIR_rollbackNetworkRequest}</camunda:inputParameter> - <camunda:inputParameter name="url">CRENWKIR_urlRollbackPoNetwork</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> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn index c40f73d059..9d21cc8301 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn @@ -1,332 +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="""" 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> +<?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="""" 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/DoDeleteVnfAndModules.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn new file mode 100644 index 0000000000..127030d789 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn @@ -0,0 +1,263 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_9MhrcHqVEea26OhQB97uCQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="DoDeleteVnfAndModules" name="DoDeleteVnfAndModules" isExecutable="true"> + <bpmn2:startEvent id="StartEvent_1"> + <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" /> + <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_08nd69s</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +DoDeleteVnfAndModules deleteVnfAndModules = new DoDeleteVnfAndModules() +deleteVnfAndModules.preProcessRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true"> + <bpmn2:endEvent id="EndEvent_4"> + <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:startEvent id="StartEvent_3"> + <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" /> + </bpmn2:startEvent> + <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" /> + <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* +ExceptionUtil exceptionUtil = new ExceptionUtil() +exceptionUtil.processJavaException(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" /> + </bpmn2:subProcess> + <bpmn2:endEvent id="EndEvent_2"> + <bpmn2:incoming>SequenceFlow_1uqlr6b</bpmn2:incoming> + <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" /> + </bpmn2:endEvent> + <bpmn2:exclusiveGateway id="ExclusiveGateway_1amun4k" name="Are there VF modules to delete?" default="SequenceFlow_1936oc0"> + <bpmn2:incoming>SequenceFlow_0t4yszi</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0lu7b1v</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1qrkdn3</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1936oc0</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:callActivity id="DeleteVNF" name="Delete VNF" calledElement="DoDeleteVnf"> + <bpmn2:extensionElements> + <camunda:in source="IsDebugLogEnabled" target="IsDebugLogEnabled" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="vnfId" target="vnfId" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_05ujwz8</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1uqlr6b</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_08nd69s" sourceRef="intialization" targetRef="QueryVnf" /> + <bpmn2:sequenceFlow id="SequenceFlow_1qrkdn3" name="yes" sourceRef="ExclusiveGateway_1amun4k" targetRef="PrepareModuleList"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DDVAM_nextModule") < execution.getVariable("DDVAM_modulesSize")]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:callActivity id="DeleteVFModule" name="Delete VF Module" calledElement="DoDeleteVfModule"> + <bpmn2:extensionElements> + <camunda:in source="requestId" target="requestId" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:in source="vnfId" target="vnfId" /> + <camunda:in source="DDVAM_vfModuleId" target="vfModuleId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="DDVAM_vfModuleName" target="vfModuleName" /> + <camunda:in source="DDVAM_vfModuleModelInfo" target="vfModuleModelInfo" /> + <camunda:in source="cloudConfiguration" target="cloudConfiguration" /> + <camunda:in source=""1610"" target="sdncVersion" /> + <camunda:in source=""true"" target="isVidRequest" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1qoor0l</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1p4ycii</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0189gqf"> + <bpmn2:incoming>SequenceFlow_1936oc0</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_05ujwz8</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1p4ycii" sourceRef="DeleteVFModule" targetRef="PostProcessDeleteVfModule" /> + <bpmn2:sequenceFlow id="SequenceFlow_0t4yszi" sourceRef="PostProcessDeleteVfModule" targetRef="ExclusiveGateway_1amun4k" /> + <bpmn2:sequenceFlow id="SequenceFlow_1936oc0" name="no" sourceRef="ExclusiveGateway_1amun4k" targetRef="ExclusiveGateway_0189gqf" /> + <bpmn2:sequenceFlow id="SequenceFlow_05ujwz8" sourceRef="ExclusiveGateway_0189gqf" targetRef="DeleteVNF" /> + <bpmn2:sequenceFlow id="SequenceFlow_1uqlr6b" sourceRef="DeleteVNF" targetRef="EndEvent_2" /> + <bpmn2:scriptTask id="QueryVnf" name="Query VNF" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_08nd69s</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0lu7b1v</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddvam = new DoDeleteVnfAndModules() +ddvam.queryAAIVfModule(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:scriptTask id="PrepareModuleList" name="Prepare Next Module To Delete" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1qrkdn3</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1qoor0l</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddvam = new DoDeleteVnfAndModules() +ddvam.prepareNextModuleToDelete(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0lu7b1v" sourceRef="QueryVnf" targetRef="ExclusiveGateway_1amun4k" /> + <bpmn2:sequenceFlow id="SequenceFlow_1qoor0l" sourceRef="PrepareModuleList" targetRef="DeleteVFModule" /> + <bpmn2:scriptTask id="PostProcessDeleteVfModule" name="PostProcess Delete VF Module"> + <bpmn2:incoming>SequenceFlow_1p4ycii</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0t4yszi</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +int nextModule = execution.getVariable("nextModule") + execution.setVariable("nextModule", nextModule + 1)]]></bpmn2:script> + </bpmn2:scriptTask> + </bpmn2:process> + <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVnfAndModules"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1"> + <dc:Bounds x="238" y="209" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="256" y="250" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization"> + <dc:Bounds x="344" y="187" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311"> + <di:waypoint xsi:type="dc:Point" x="274" y="227" /> + <di:waypoint xsi:type="dc:Point" x="344" y="228" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="309" y="212.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2"> + <dc:Bounds x="1605" y="209" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1623" y="250" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true"> + <dc:Bounds x="226" y="401" width="431" height="157" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3"> + <dc:Bounds x="374" y="462" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="392" y="503" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4"> + <dc:Bounds x="590" y="462" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="608" y="503" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException"> + <dc:Bounds x="444" y="440" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319"> + <di:waypoint xsi:type="dc:Point" x="410" y="480" /> + <di:waypoint xsi:type="dc:Point" x="444" y="480" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="427" y="465" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239"> + <di:waypoint xsi:type="dc:Point" x="544" y="480" /> + <di:waypoint xsi:type="dc:Point" x="590" y="480" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="567" y="465" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_1amun4k_di" bpmnElement="ExclusiveGateway_1amun4k" isMarkerVisible="true"> + <dc:Bounds x="691" y="202" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="683" y="252" width="65" height="36" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0laaqvh_di" bpmnElement="DeleteVNF"> + <dc:Bounds x="1436" y="187" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_08nd69s_di" bpmnElement="SequenceFlow_08nd69s"> + <di:waypoint xsi:type="dc:Point" x="444" y="227" /> + <di:waypoint xsi:type="dc:Point" x="512" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="478" y="212" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1qrkdn3_di" bpmnElement="SequenceFlow_1qrkdn3"> + <di:waypoint xsi:type="dc:Point" x="716" y="202" /> + <di:waypoint xsi:type="dc:Point" x="716" y="104" /> + <di:waypoint xsi:type="dc:Point" x="788" y="104" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="722" y="156.4750449879038" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0qmp9y5_di" bpmnElement="DeleteVFModule"> + <dc:Bounds x="962" y="64" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0189gqf_di" bpmnElement="ExclusiveGateway_0189gqf" isMarkerVisible="true"> + <dc:Bounds x="1304" y="202" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1329" y="252" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1p4ycii_di" bpmnElement="SequenceFlow_1p4ycii"> + <di:waypoint xsi:type="dc:Point" x="1062" y="104" /> + <di:waypoint xsi:type="dc:Point" x="1096" y="104" /> + <di:waypoint xsi:type="dc:Point" x="1096" y="104" /> + <di:waypoint xsi:type="dc:Point" x="1127" y="104" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1111" y="104" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0t4yszi_di" bpmnElement="SequenceFlow_0t4yszi"> + <di:waypoint xsi:type="dc:Point" x="1177" y="144" /> + <di:waypoint xsi:type="dc:Point" x="1177" y="227" /> + <di:waypoint xsi:type="dc:Point" x="741" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1192" y="185.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1936oc0_di" bpmnElement="SequenceFlow_1936oc0"> + <di:waypoint xsi:type="dc:Point" x="716" y="252" /> + <di:waypoint xsi:type="dc:Point" x="716" y="301" /> + <di:waypoint xsi:type="dc:Point" x="1329" y="301" /> + <di:waypoint xsi:type="dc:Point" x="1329" y="252" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1017" y="286" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_05ujwz8_di" bpmnElement="SequenceFlow_05ujwz8"> + <di:waypoint xsi:type="dc:Point" x="1354" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1436" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1395" y="202" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1uqlr6b_di" bpmnElement="SequenceFlow_1uqlr6b"> + <di:waypoint xsi:type="dc:Point" x="1536" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1605" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1571" y="212" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_12xsp2f_di" bpmnElement="QueryVnf"> + <dc:Bounds x="512" y="187" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_01c9qas_di" bpmnElement="PrepareModuleList"> + <dc:Bounds x="788" y="64" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0lu7b1v_di" bpmnElement="SequenceFlow_0lu7b1v"> + <di:waypoint xsi:type="dc:Point" x="612" y="227" /> + <di:waypoint xsi:type="dc:Point" x="691" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="652" y="202" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1qoor0l_di" bpmnElement="SequenceFlow_1qoor0l"> + <di:waypoint xsi:type="dc:Point" x="888" y="104" /> + <di:waypoint xsi:type="dc:Point" x="928" y="104" /> + <di:waypoint xsi:type="dc:Point" x="928" y="104" /> + <di:waypoint xsi:type="dc:Point" x="962" y="104" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="943" y="104" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_11i0rnd_di" bpmnElement="PostProcessDeleteVfModule"> + <dc:Bounds x="1127" y="64" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn new file mode 100644 index 0000000000..45e1a49f8a --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn @@ -0,0 +1,847 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="DoUpdateNetworkInstance" name="DoUpdateNetworkInstance" isExecutable="true"> + <bpmn2:startEvent id="updateNetwork_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="updateNetwork_startEvent" targetRef="preProcessRequest_ScriptTask" /> + <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.prepareSDNCRequest(execution) +]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity" /> + <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.validateSDNCResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow"> + <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming> + <bpmn2:outgoing>sdncTopoNo_SequenceFlow</bpmn2:outgoing> + <bpmn2:outgoing>sdncTopoYes_SequenceFlow</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent" /> + <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTReQuery1NetworkID_ScriptTask"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway" /> + <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask"> + <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2" /> + </bpmn2:boundaryEvent> + <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent" /> + <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error"> + <bpmn2:incoming>sdncTopoNo_SequenceFlow</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming> + <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_2" /> + </bpmn2:endEvent> + <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC ChangeAssign Adapter V1 Sub-process" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="UPDNETI_changeAssignSDNCRequest" target="sdncAdapterWorkflowRequest" /> + <camunda:out source="sdncAdapterResponse" target="UPDNETI_changeAssignSDNCResponse" /> + <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_sdncReturnCode" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="WorkflowException" target="UPDNETI_WorkflowException" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + <camunda:in variables="all" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask" /> + <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process Response" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="EndEvent_3" /> + <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception" triggeredByEvent="true"> + <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow"> + <bpmn2:incoming>SequenceFlow_053re4q</bpmn2:incoming> + <bpmn2:outgoing>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:outgoing> + <bpmn2:outgoing>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="isRollbackOn_YesNetwork_SequenceFlow" name="Yes" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_rollbackEnabled") == true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="isRollbackOn_NoNetwork_SequenceFlow" name="No" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="ExclusiveGateway_1dcb5p2" /> + <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start"> + <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" /> + </bpmn2:startEvent> + <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="ScriptTask_1gedbow" /> + <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="isPONR?" default="isPONR_No_SequenceFlow"> + <bpmn2:incoming>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:incoming> + <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing> + <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="ExclusiveGateway_1dcb5p2"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isPONR") == true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="ExclusiveGateway_1dcb5p2" /> + <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway"> + <bpmn2:incoming>SequenceFlow_0nrc66n</bpmn2:incoming> + <bpmn2:outgoing>sdncOk_Yeso_ExclusiveGateway</bpmn2:outgoing> + <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="prepareSDNCRollbackRequest_ScriptTask"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="InclusiveGateway_6" /> + <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy"> + <bpmn2:incoming>sdncOk_Yeso_ExclusiveGateway</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_53</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.prepareSDNCRollbackRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="InclusiveGateway_6" /> + <bpmn2:endEvent id="EndEvent_4"> + <bpmn2:incoming>SequenceFlow_04rdjfi</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:inclusiveGateway id="InclusiveGateway_6"> + <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming> + <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0srdlf3</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="ScriptTask_1p6n2yy" /> + <bpmn2:scriptTask id="ScriptTask_1p6n2yy" name="Prepare RollbackData" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0qr4es6</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.prepareRollbackData(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="CallActivity_1kid5y0" name="DoUpdate NetworkInstanceRollback " calledElement="DoCreateNetworkInstanceRollback"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="rollbackData" target="rollbackData" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:in source="WorkflowException" target="WorkflowException" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:out source="wasDeleted" target="wasDeleted" /> + <camunda:out source="rolledBack" target="rolledBack" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="workflowException" target="workflowException" /> + <camunda:in source="SavedWorkflowException1" target="SavedWorkflowException1" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0qr4es6</bpmn2:incoming> + </bpmn2:callActivity> + <bpmn2:scriptTask id="ScriptTask_0voqz6r" name="Post Process Response" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0ze5k6c</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_04rdjfi</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0qr4es6" sourceRef="ScriptTask_1p6n2yy" targetRef="CallActivity_1kid5y0" /> + <bpmn2:sequenceFlow id="SequenceFlow_04rdjfi" sourceRef="ScriptTask_0voqz6r" targetRef="EndEvent_4" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_1kjh92x" name="is '1702' SNDC Call?"> + <bpmn2:outgoing>SequenceFlow_0nrc66n</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0srdlf3</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0nrc66n" name="No" sourceRef="ExclusiveGateway_1kjh92x" targetRef="sdncOk_ExclusiveGateway" /> + <bpmn2:sequenceFlow id="SequenceFlow_0srdlf3" name="Yes" sourceRef="ExclusiveGateway_1kjh92x" targetRef="InclusiveGateway_6"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:scriptTask id="ScriptTask_1gedbow" name="Set Exception Flag" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_053re4q</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.setExceptionFlag(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_053re4q" sourceRef="ScriptTask_1gedbow" targetRef="isRollbackOn_Network_ExclusiveGateway" /> + <bpmn2:inclusiveGateway id="ExclusiveGateway_1dcb5p2"> + <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming> + <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming> + <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0ze5k6c</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0ze5k6c" sourceRef="ExclusiveGateway_1dcb5p2" targetRef="ScriptTask_0voqz6r" /> + <bpmn2:textAnnotation id="TextAnnotation_0qx19b9"> <bpmn2:text>Note: Rollback is not needed for UpdateNetwork,</bpmn2:text> +</bpmn2:textAnnotation> + <bpmn2:association id="Association_10dk4x3" sourceRef="CallActivity_1kid5y0" targetRef="TextAnnotation_0qx19b9" /> + </bpmn2:subProcess> + <bpmn2:scriptTask id="callRESTReQuery2NetworkID_ScriptTask" name="Call REST ReQuery2 Network Id in AAI" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQuery2NetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask" /> + <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="postProcessAndCompletionRequest_ScriptTask" /> + <bpmn2:endEvent id="EndEvent_3"> + <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> + <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.processJavaException(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" /> + <bpmn2:startEvent id="StartEvent_1"> + <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" /> + </bpmn2:startEvent> + <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" /> + <bpmn2:endEvent id="EndEvent_1"> + <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming> + </bpmn2:endEvent> + </bpmn2:subProcess> + <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.preProcessRequest(execution) +]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="callGetServiceInstance" /> + <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask" /> + <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy"> + <bpmn2:incoming>siFoundYes</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.callRESTQueryAAINetworkId(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_ScriptTask" /> + <bpmn2:endEvent id="EndEvent_2"> + <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming> + <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2" /> + </bpmn2:endEvent> + <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy"> + <bpmn2:incoming>siFoundNo</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.* +ExceptionUtil exceptionUtil = new ExceptionUtil() +exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2" /> + <bpmn2:exclusiveGateway id="siFoundCheck" name="is SI Found?" default="siFoundNo"> + <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming> + <bpmn2:outgoing>siFoundYes</bpmn2:outgoing> + <bpmn2:outgoing>siFoundNo</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="callRESTQueryNetworkId_ScriptTask"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound" /> + <bpmn2:callActivity id="callGetServiceInstance" name="Get
Service
Instance" calledElement="GenericGetService"> + <bpmn2:extensionElements> + <camunda:in source="UPDNETI_serviceInstanceId" target="GENGS_serviceInstanceId" /> + <camunda:out source="GENGS_serviceInstance" target="UPDNETI_serviceInstanceId" /> + <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator" /> + <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator" /> + <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="GENGS_type" target="GENGS_type" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck" /> + <bpmn2:scriptTask id="validateUpdatePONetwork_ScriptTask" name="Validate Update PO Network" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.validateUpdateNetworkResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateUpdatePONetwork_ScriptTask" targetRef="callRESTReQuery2NetworkID_ScriptTask" /> + <bpmn2:serviceTask id="callUpdateNetwork_ServiceTask" name="Call Update Network"> + <bpmn2:extensionElements> + <camunda:connector> + <camunda:inputOutput> + <camunda:inputParameter name="payload">${UPDNETI_updateNetworkRequest}</camunda:inputParameter> + <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}/${UPDNETI_networkId}</camunda:inputParameter> + <camunda:inputParameter name="headers"> + <camunda:map> + <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry> + <camunda:entry key="content-type">application/xml</camunda:entry> + </camunda:map> + </camunda:inputParameter> + <camunda:inputParameter name="method">PUT</camunda:inputParameter> + <camunda:outputParameter name="UPDNETI_networkReturnCode">${statusCode}</camunda:outputParameter> + <camunda:outputParameter name="UPDNETI_updateNetworkResponse">${response}</camunda:outputParameter> + </camunda:inputOutput> + <camunda:connectorId>http-connector</camunda:connectorId> + </camunda:connector> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="callUpdateNetwork_ServiceTask" targetRef="validateUpdatePONetwork_ScriptTask" /> + <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.prepareUpdateNetworkRequest(execution) +]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callUpdateNetwork_ServiceTask" /> + <bpmn2:scriptTask id="callRESTQueryNetworkTableRef_ScriptTask" name="Call REST Query Network TableRef in AAI" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask" /> + <bpmn2:scriptTask id="callRESTReQuery1NetworkID_ScriptTask" name="Call REST ReQuery1 Network Id in AAI" scriptFormat="groovy"> + <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callRESTReQuery1NetworkID_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask" /> + <bpmn2:scriptTask id="callRESTQueryVpnBinding_ScriptTask" name="Call REST Query Vpn Binding in AAI" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask" /> + <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstance = new DoUpdateNetworkInstance() +DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateNetworkInstance"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="updateNetwork_startEvent"> + <dc:Bounds x="286" y="185" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="279" y="226" width="49" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask"> + <dc:Bounds x="472" y="163" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61"> + <di:waypoint xsi:type="dc:Point" x="322" y="203" /> + <di:waypoint xsi:type="dc:Point" x="472" y="203" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="397" y="188" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateUpdatePONetwork_ScriptTask"> + <dc:Bounds x="1343" y="1311" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callUpdateNetwork_ServiceTask"> + <dc:Bounds x="1342" y="1176" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask"> + <dc:Bounds x="1519" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true"> + <dc:Bounds x="-153" y="594" width="1288" height="701" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent"> + <dc:Bounds x="-103" y="1160" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-109" y="1201" width="50" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true"> + <dc:Bounds x="1544" y="521" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1535" y="577" width="67" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124"> + <di:waypoint xsi:type="dc:Point" x="1594" y="546" /> + <di:waypoint xsi:type="dc:Point" x="1682" y="546" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1600" y="546.8622891951518" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_336"> + <di:waypoint xsi:type="dc:Point" x="1544" y="546" /> + <di:waypoint xsi:type="dc:Point" x="1393" y="546" /> + <di:waypoint xsi:type="dc:Point" x="1393" y="576" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1526" y="546" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask"> + <dc:Bounds x="743" y="1390" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent"> + <dc:Bounds x="1682" y="528" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1663" y="569" width="74" height="22" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity"> + <dc:Bounds x="1519" y="242" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19"> + <di:waypoint xsi:type="dc:Point" x="1569" y="180" /> + <di:waypoint xsi:type="dc:Point" x="1569" y="242" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1584" y="211" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131"> + <di:waypoint xsi:type="dc:Point" x="1569" y="322" /> + <di:waypoint xsi:type="dc:Point" x="1569" y="373" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1584" y="347.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61"> + <di:waypoint xsi:type="dc:Point" x="572" y="203" /> + <di:waypoint xsi:type="dc:Point" x="686" y="203" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="629" y="188" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90"> + <di:waypoint xsi:type="dc:Point" x="-67" y="1178" /> + <di:waypoint xsi:type="dc:Point" x="-40" y="1178" /> + <di:waypoint xsi:type="dc:Point" x="-11" y="1178" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-53" y="1163" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask"> + <dc:Bounds x="1519" y="373" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67"> + <di:waypoint xsi:type="dc:Point" x="1569" y="453" /> + <di:waypoint xsi:type="dc:Point" x="1569" y="521" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1584" y="487" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80"> + <di:waypoint xsi:type="dc:Point" x="743" y="1430" /> + <di:waypoint xsi:type="dc:Point" x="635" y="1430" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="689" y="1415" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask"> + <dc:Bounds x="984" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQuery2NetworkID_ScriptTask"> + <dc:Bounds x="1176" y="1390" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask"> + <dc:Bounds x="984" y="1390" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135"> + <di:waypoint xsi:type="dc:Point" x="1176" y="1430" /> + <di:waypoint xsi:type="dc:Point" x="1084" y="1430" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1130" y="1415" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135"> + <di:waypoint xsi:type="dc:Point" x="984" y="1430" /> + <di:waypoint xsi:type="dc:Point" x="843" y="1430" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="935" y="1431.2411831373652" width="32" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask"> + <dc:Bounds x="1341" y="688" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215"> + <di:waypoint xsi:type="dc:Point" x="1391" y="768" /> + <di:waypoint xsi:type="dc:Point" x="1391" y="810" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1388" y="781" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63"> + <di:waypoint xsi:type="dc:Point" x="1392" y="1256" /> + <di:waypoint xsi:type="dc:Point" x="1393" y="1311" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1390" y="1284" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask"> + <dc:Bounds x="1342" y="1052" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83"> + <di:waypoint xsi:type="dc:Point" x="1392" y="1132" /> + <di:waypoint xsi:type="dc:Point" x="1392" y="1176" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1389" y="1159" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true"> + <dc:Bounds x="156" y="1153" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="143" y="1213" width="78" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="isRollbackOn_YesNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_215"> + <di:waypoint xsi:type="dc:Point" x="181" y="1153" /> + <di:waypoint xsi:type="dc:Point" x="181" y="1089" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="187" y="1133.4787123394708" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="isRollbackOn_NoNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_InclusiveGateway_24"> + <di:waypoint xsi:type="dc:Point" x="206" y="1178" /> + <di:waypoint xsi:type="dc:Point" x="372" y="1178" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="206" y="1182.7278101950883" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask"> + <dc:Bounds x="1341" y="810" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_335"> + <di:waypoint xsi:type="dc:Point" x="1391" y="890" /> + <di:waypoint xsi:type="dc:Point" x="1391" y="926" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1388" y="900" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6"> + <dc:Bounds x="626" y="859" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="651" y="914" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true"> + <dc:Bounds x="156" y="1039" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="90" y="1054" width="46" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_InclusiveGateway_24"> + <di:waypoint xsi:type="dc:Point" x="206" y="1064" /> + <di:waypoint xsi:type="dc:Point" x="397" y="1064" /> + <di:waypoint xsi:type="dc:Point" x="397" y="1153" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="213" y="1067.6448598130842" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215"> + <di:waypoint xsi:type="dc:Point" x="181" y="1039" /> + <di:waypoint xsi:type="dc:Point" x="181" y="971" /> + <di:waypoint xsi:type="dc:Point" x="397" y="971" /> + <di:waypoint xsi:type="dc:Point" x="397" y="1153" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="185" y="1027.872131147541" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true"> + <dc:Bounds x="493" y="709" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="488" y="683" width="60" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261"> + <di:waypoint xsi:type="dc:Point" x="543" y="734" /> + <di:waypoint xsi:type="dc:Point" x="601" y="733" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="545" y="737.2172362208834" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217"> + <di:waypoint xsi:type="dc:Point" x="517" y="758" /> + <di:waypoint xsi:type="dc:Point" x="517" y="884" /> + <di:waypoint xsi:type="dc:Point" x="626" y="884" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="526" y="761.1171067354646" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3"> + <dc:Bounds x="599" y="1412" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="617" y="1453" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4"> + <dc:Bounds x="1029" y="968" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1047" y="1009" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask"> + <dc:Bounds x="1200" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67"> + <di:waypoint xsi:type="dc:Point" x="1300" y="140" /> + <di:waypoint xsi:type="dc:Point" x="1519" y="140" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1410" y="125" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4"> + <dc:Bounds x="1601" y="355" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1619" y="391" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124"> + <di:waypoint xsi:type="dc:Point" x="1637" y="373" /> + <di:waypoint xsi:type="dc:Point" x="1700" y="373" /> + <di:waypoint xsi:type="dc:Point" x="1700" y="528" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1669" y="358" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask"> + <dc:Bounds x="601" y="694" width="100" height="79" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24"> + <di:waypoint xsi:type="dc:Point" x="651" y="909" /> + <di:waypoint xsi:type="dc:Point" x="651" y="946" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="666" y="927.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261"> + <di:waypoint xsi:type="dc:Point" x="651" y="773" /> + <di:waypoint xsi:type="dc:Point" x="651" y="859" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="666" y="816" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134"> + <di:waypoint xsi:type="dc:Point" x="1393" y="1391" /> + <di:waypoint xsi:type="dc:Point" x="1393" y="1430" /> + <di:waypoint xsi:type="dc:Point" x="1310" y="1430" /> + <di:waypoint xsi:type="dc:Point" x="1276" y="1430" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1390" y="1425" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true"> + <dc:Bounds x="-62" y="375" width="394" height="188" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1"> + <dc:Bounds x="-29" y="452" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-11" y="493" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1"> + <dc:Bounds x="86" y="430" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1"> + <dc:Bounds x="247" y="452" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="265" y="493" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270"> + <di:waypoint xsi:type="dc:Point" x="7" y="470" /> + <di:waypoint xsi:type="dc:Point" x="86" y="470" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="49" y="470" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220"> + <di:waypoint xsi:type="dc:Point" x="186" y="470" /> + <di:waypoint xsi:type="dc:Point" x="247" y="470" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="221" y="470" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance"> + <dc:Bounds x="686" y="163" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true"> + <dc:Bounds x="836" y="177" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="891" y="195" width="79" height="22" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244"> + <di:waypoint xsi:type="dc:Point" x="786" y="203" /> + <di:waypoint xsi:type="dc:Point" x="805" y="203" /> + <di:waypoint xsi:type="dc:Point" x="805" y="202" /> + <di:waypoint xsi:type="dc:Point" x="836" y="202" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="799" y="203" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_133"> + <di:waypoint xsi:type="dc:Point" x="861" y="177" /> + <di:waypoint xsi:type="dc:Point" x="861" y="140" /> + <di:waypoint xsi:type="dc:Point" x="910" y="140" /> + <di:waypoint xsi:type="dc:Point" x="984" y="140" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="868" y="157" width="29" height="22" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2"> + <dc:Bounds x="1155" y="278" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1173" y="319" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound"> + <dc:Bounds x="984" y="256" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331"> + <di:waypoint xsi:type="dc:Point" x="861" y="227" /> + <di:waypoint xsi:type="dc:Point" x="861" y="296" /> + <di:waypoint xsi:type="dc:Point" x="984" y="296" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="871" y="233" width="22" height="22" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247"> + <di:waypoint xsi:type="dc:Point" x="1084" y="296" /> + <di:waypoint xsi:type="dc:Point" x="1155" y="296" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1103" y="296" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_245"> + <di:waypoint xsi:type="dc:Point" x="1084" y="140" /> + <di:waypoint xsi:type="dc:Point" x="1200" y="140" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1127" y="140" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask"> + <dc:Bounds x="1341" y="926" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_335" targetElement="_BPMNShape_ScriptTask_157"> + <di:waypoint xsi:type="dc:Point" x="1391" y="1006" /> + <di:waypoint xsi:type="dc:Point" x="1392" y="1052" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1388" y="1028" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_336" bpmnElement="callRESTReQuery1NetworkID_ScriptTask"> + <dc:Bounds x="1343" y="576" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_336" targetElement="_BPMNShape_ScriptTask_156"> + <di:waypoint xsi:type="dc:Point" x="1393" y="656" /> + <di:waypoint xsi:type="dc:Point" x="1393" y="672" /> + <di:waypoint xsi:type="dc:Point" x="1391" y="672" /> + <di:waypoint xsi:type="dc:Point" x="1391" y="688" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1390" y="666" width="6" height="6" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1p6n2yy_di" bpmnElement="ScriptTask_1p6n2yy"> + <dc:Bounds x="601" y="946" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1kid5y0_di" bpmnElement="CallActivity_1kid5y0"> + <dc:Bounds x="739" y="946" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0voqz6r_di" bpmnElement="ScriptTask_0voqz6r"> + <dc:Bounds x="883" y="946" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0qr4es6_di" bpmnElement="SequenceFlow_0qr4es6"> + <di:waypoint xsi:type="dc:Point" x="701" y="986" /> + <di:waypoint xsi:type="dc:Point" x="739" y="986" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="720" y="971" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_04rdjfi_di" bpmnElement="SequenceFlow_04rdjfi"> + <di:waypoint xsi:type="dc:Point" x="983" y="986" /> + <di:waypoint xsi:type="dc:Point" x="1029" y="986" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1006" y="961" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_1kjh92x_di" bpmnElement="ExclusiveGateway_1kjh92x" isMarkerVisible="true"> + <dc:Bounds x="372" y="709" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="368" y="672" width="76" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0nrc66n_di" bpmnElement="SequenceFlow_0nrc66n"> + <di:waypoint xsi:type="dc:Point" x="422" y="734" /> + <di:waypoint xsi:type="dc:Point" x="493" y="734" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="427" y="735" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0srdlf3_di" bpmnElement="SequenceFlow_0srdlf3"> + <di:waypoint xsi:type="dc:Point" x="397" y="759" /> + <di:waypoint xsi:type="dc:Point" x="397" y="884" /> + <di:waypoint xsi:type="dc:Point" x="626" y="884" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="402" y="760" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1gedbow_di" bpmnElement="ScriptTask_1gedbow"> + <dc:Bounds x="-11" y="1138" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_053re4q_di" bpmnElement="SequenceFlow_053re4q"> + <di:waypoint xsi:type="dc:Point" x="89" y="1178" /> + <di:waypoint xsi:type="dc:Point" x="156" y="1178" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="123" y="1163" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_1adrta3_di" bpmnElement="ExclusiveGateway_1dcb5p2"> + <dc:Bounds x="372" y="1153" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="397" y="1203" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ze5k6c_di" bpmnElement="SequenceFlow_0ze5k6c"> + <di:waypoint xsi:type="dc:Point" x="422" y="1178" /> + <di:waypoint xsi:type="dc:Point" x="933" y="1178" /> + <di:waypoint xsi:type="dc:Point" x="933" y="1026" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="678" y="1163" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="TextAnnotation_0qx19b9_di" bpmnElement="TextAnnotation_0qx19b9"> + <dc:Bounds x="736" y="808" width="168" height="39" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="Association_10dk4x3_di" bpmnElement="Association_10dk4x3"> + <di:waypoint xsi:type="dc:Point" x="797" y="946" /> + <di:waypoint xsi:type="dc:Point" x="816" y="847" /> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn new file mode 100644 index 0000000000..6fd0565f3a --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn @@ -0,0 +1,373 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="DoUpdateNetworkInstanceRollback" name="DoUpdateNetworkInstanceRollback" isExecutable="true"> + <bpmn:startEvent id="StartEvent_1"> + <bpmn:outgoing>SequenceFlow_1krl2dg</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:scriptTask id="Task_0whino1" name="PreProcess Incoming Data" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1krl2dg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0u41iz2</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback() +DoUpdateNetworkInstanceRollback.preProcessRequest(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1krl2dg" sourceRef="StartEvent_1" targetRef="Task_0whino1" /> + <bpmn:sequenceFlow id="SequenceFlow_0u41iz2" sourceRef="Task_0whino1" targetRef="ExclusiveGateway_0v0en47" /> + <bpmn:serviceTask id="ServiceTask_0bqh5yl" name="Call Rollback Network"> + <bpmn:extensionElements> + <camunda:connector> + <camunda:inputOutput> + <camunda:inputParameter name="payload">${UPDNETIR_rollbackNetworkRequest}</camunda:inputParameter> + <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}</camunda:inputParameter> + <camunda:inputParameter name="headers"> + <camunda:map> + <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry> + <camunda:entry key="content-type">application/xml</camunda:entry> + </camunda:map> + </camunda:inputParameter> + <camunda:inputParameter name="method">PUT</camunda:inputParameter> + <camunda:outputParameter name="UPDNETIR_rollbackNetworkReturnCode">${statusCode}</camunda:outputParameter> + <camunda:outputParameter name="UPDNETIR_rollbackNetworkResponse">${response}</camunda:outputParameter> + </camunda:inputOutput> + <camunda:connectorId>http-connector</camunda:connectorId> + </camunda:connector> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0e1uixp</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_17o4w67</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:exclusiveGateway id="ExclusiveGateway_0v0en47" name="is PO Network Rollback?" default="SequenceFlow_1lteduj"> + <bpmn:incoming>SequenceFlow_0u41iz2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0e1uixp</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1lteduj</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:callActivity id="CallActivity_1xilevb" name="Call Rollback SDNC Adapter" calledElement="sdncAdapter"> + <bpmn:extensionElements> + <camunda:in source="UPDNETIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="SDNCA_ResponseCode" target="UPDNETIR_rollbackSDNCReturnCode" /> + <camunda:out source="sdncAdapterResponse" target="UPDNETIR_rollbackSDNCResponse" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_101y57s</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0790olb</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:exclusiveGateway id="ExclusiveGateway_17g4q5c" name="is RSRC SDNC?" default="SequenceFlow_101y57s"> + <bpmn:incoming>SequenceFlow_0virkpu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_101y57s</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0mw0dgd</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:scriptTask id="ScriptTask_1ggaxfu" name="Validate Rollback Responses" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0qc4v9t</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0el8yzs</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0yto4gz</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback() +DoUpdateNetworkInstanceRollback.validateRollbackResponses(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:exclusiveGateway id="ExclusiveGateway_1n5jck8" name="is SDNC Rollback?" default="SequenceFlow_0qc4v9t"> + <bpmn:incoming>SequenceFlow_1lteduj</bpmn:incoming> + <bpmn:incoming>SequenceFlow_17o4w67</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0virkpu</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0qc4v9t</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_0e1uixp" name="Yes" sourceRef="ExclusiveGateway_0v0en47" targetRef="ServiceTask_0bqh5yl"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETIR_rollbackNetworkRequest") != null}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_1lteduj" name="No" sourceRef="ExclusiveGateway_0v0en47" targetRef="ExclusiveGateway_1n5jck8" /> + <bpmn:sequenceFlow id="SequenceFlow_0virkpu" name="Yes" sourceRef="ExclusiveGateway_1n5jck8" targetRef="ExclusiveGateway_17g4q5c"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETIR_rollbackSDNCRequest") != null}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_17o4w67" sourceRef="ServiceTask_0bqh5yl" targetRef="ExclusiveGateway_1n5jck8" /> + <bpmn:sequenceFlow id="SequenceFlow_101y57s" name="No" sourceRef="ExclusiveGateway_17g4q5c" targetRef="CallActivity_1xilevb" /> + <bpmn:sequenceFlow id="SequenceFlow_0mw0dgd" name="Yes" sourceRef="ExclusiveGateway_17g4q5c" targetRef="ExclusiveGateway_0b9kbop"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") == '1702'} ]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:endEvent id="EndEvent_1fvr7ad"> + <bpmn:incoming>SequenceFlow_0yto4gz</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0qc4v9t" name="No" sourceRef="ExclusiveGateway_1n5jck8" targetRef="ScriptTask_1ggaxfu" /> + <bpmn:sequenceFlow id="SequenceFlow_0790olb" sourceRef="CallActivity_1xilevb" targetRef="ExclusiveGateway_0b9kbop" /> + <bpmn:subProcess id="SubProcess_1p4663w" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> + <bpmn:scriptTask id="ScriptTask_0by1uwk" name="Log / Print Unexpected Error" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0xktw7v</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0soe5t3</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback() +DoUpdateNetworkInstanceRollback.processJavaException(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:startEvent id="StartEvent_1j0eixl"> + <bpmn:outgoing>SequenceFlow_0xktw7v</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_0jxh015"> + <bpmn:incoming>SequenceFlow_0soe5t3</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0xktw7v" name="" sourceRef="StartEvent_1j0eixl" targetRef="ScriptTask_0by1uwk" /> + <bpmn:sequenceFlow id="SequenceFlow_0soe5t3" name="" sourceRef="ScriptTask_0by1uwk" targetRef="EndEvent_0jxh015" /> + </bpmn:subProcess> + <bpmn:inclusiveGateway id="ExclusiveGateway_0b9kbop"> + <bpmn:incoming>SequenceFlow_0790olb</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0mw0dgd</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0el8yzs</bpmn:outgoing> + </bpmn:inclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_0el8yzs" sourceRef="ExclusiveGateway_0b9kbop" targetRef="ScriptTask_1ggaxfu" /> + <bpmn:sequenceFlow id="SequenceFlow_0yto4gz" sourceRef="ScriptTask_1ggaxfu" targetRef="EndEvent_1fvr7ad" /> + <bpmn:subProcess id="SubProcess_1b8rnqv" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> + <bpmn:scriptTask id="ScriptTask_02d3i14" name="Catch Exception"> + <bpmn:incoming>SequenceFlow_07kf49j</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01syg1x</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +execution.setVariable("workflowException", execution.getVariable("WorkflowException")]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:startEvent id="StartEvent_0e8yrgo"> + <bpmn:outgoing>SequenceFlow_07kf49j</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_1cmovvm"> + <bpmn:incoming>SequenceFlow_01syg1x</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_07kf49j" name="" sourceRef="StartEvent_0e8yrgo" targetRef="ScriptTask_02d3i14" /> + <bpmn:sequenceFlow id="SequenceFlow_01syg1x" name="" sourceRef="ScriptTask_02d3i14" targetRef="EndEvent_1cmovvm" /> + </bpmn:subProcess> + <bpmn:textAnnotation id="TextAnnotation_000ap15"> <bpmn:text><![CDATA[Include ONLY inputs/varrables: +rollbackData, as Map +-rollbackSDNCRequest +-rollbackNetworkRequest +WorkflowException + +]]></bpmn:text> +</bpmn:textAnnotation> + <bpmn:association id="Association_0ybkmal" sourceRef="Task_0whino1" targetRef="TextAnnotation_000ap15" /> + <bpmn:textAnnotation id="TextAnnotation_0vwyo82"> <bpmn:text><![CDATA[set value for: +WorkflowException +rolledBack +wasDeleted +]]></bpmn:text> +</bpmn:textAnnotation> + <bpmn:association id="Association_1gx121b" sourceRef="ScriptTask_1ggaxfu" targetRef="TextAnnotation_0vwyo82" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateNetworkInstanceRollback"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"> + <dc:Bounds x="240" y="354" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="258" y="390" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1dqe09s_di" bpmnElement="Task_0whino1"> + <dc:Bounds x="403" y="332" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1krl2dg_di" bpmnElement="SequenceFlow_1krl2dg"> + <di:waypoint xsi:type="dc:Point" x="276" y="372" /> + <di:waypoint xsi:type="dc:Point" x="382" y="372" /> + <di:waypoint xsi:type="dc:Point" x="382" y="372" /> + <di:waypoint xsi:type="dc:Point" x="403" y="372" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="397" y="372" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0u41iz2_di" bpmnElement="SequenceFlow_0u41iz2"> + <di:waypoint xsi:type="dc:Point" x="503" y="372" /> + <di:waypoint xsi:type="dc:Point" x="660" y="372" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="582" y="357" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0bqh5yl_di" bpmnElement="ServiceTask_0bqh5yl"> + <dc:Bounds x="635" y="481" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0v0en47_di" bpmnElement="ExclusiveGateway_0v0en47" isMarkerVisible="true"> + <dc:Bounds x="660" y="347" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="648" y="312" width="74" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="TextAnnotation_000ap15_di" bpmnElement="TextAnnotation_000ap15"> + <dc:Bounds x="469" y="133" width="277" height="115" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="Association_0ybkmal_di" bpmnElement="Association_0ybkmal"> + <di:waypoint xsi:type="dc:Point" x="487" y="332" /> + <di:waypoint xsi:type="dc:Point" x="559" y="248" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1xilevb_di" bpmnElement="CallActivity_1xilevb"> + <dc:Bounds x="995" y="610" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_17g4q5c_di" bpmnElement="ExclusiveGateway_17g4q5c" isMarkerVisible="true"> + <dc:Bounds x="879" y="496" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="926" y="474" width="82" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1ggaxfu_di" bpmnElement="ScriptTask_1ggaxfu"> + <dc:Bounds x="1123" y="332" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_1n5jck8_di" bpmnElement="ExclusiveGateway_1n5jck8" isMarkerVisible="true"> + <dc:Bounds x="879" y="347" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="880" y="308" width="48" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="TextAnnotation_0vwyo82_di" bpmnElement="TextAnnotation_0vwyo82"> + <dc:Bounds x="1287" y="410" width="165" height="60" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="Association_1gx121b_di" bpmnElement="Association_1gx121b"> + <di:waypoint xsi:type="dc:Point" x="1223" y="389" /> + <di:waypoint xsi:type="dc:Point" x="1287" y="412" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0e1uixp_di" bpmnElement="SequenceFlow_0e1uixp"> + <di:waypoint xsi:type="dc:Point" x="685" y="397" /> + <di:waypoint xsi:type="dc:Point" x="685" y="439" /> + <di:waypoint xsi:type="dc:Point" x="685" y="439" /> + <di:waypoint xsi:type="dc:Point" x="685" y="481" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="693" y="395" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1lteduj_di" bpmnElement="SequenceFlow_1lteduj"> + <di:waypoint xsi:type="dc:Point" x="710" y="372" /> + <di:waypoint xsi:type="dc:Point" x="879" y="372" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="716" y="350" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0virkpu_di" bpmnElement="SequenceFlow_0virkpu"> + <di:waypoint xsi:type="dc:Point" x="904" y="397" /> + <di:waypoint xsi:type="dc:Point" x="904" y="496" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="914" y="392.7469456247061" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_17o4w67_di" bpmnElement="SequenceFlow_17o4w67"> + <di:waypoint xsi:type="dc:Point" x="735" y="521" /> + <di:waypoint xsi:type="dc:Point" x="817" y="521" /> + <di:waypoint xsi:type="dc:Point" x="817" y="372" /> + <di:waypoint xsi:type="dc:Point" x="879" y="372" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="832" y="446.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_101y57s_di" bpmnElement="SequenceFlow_101y57s"> + <di:waypoint xsi:type="dc:Point" x="904" y="546" /> + <di:waypoint xsi:type="dc:Point" x="904" y="650" /> + <di:waypoint xsi:type="dc:Point" x="995" y="650" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="913" y="544.0784313725491" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0mw0dgd_di" bpmnElement="SequenceFlow_0mw0dgd"> + <di:waypoint xsi:type="dc:Point" x="929" y="521" /> + <di:waypoint xsi:type="dc:Point" x="1148" y="521" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="937" y="500" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1fvr7ad_di" bpmnElement="EndEvent_1fvr7ad"> + <dc:Bounds x="1352" y="354" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1370" y="390" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0qc4v9t_di" bpmnElement="SequenceFlow_0qc4v9t"> + <di:waypoint xsi:type="dc:Point" x="929" y="372" /> + <di:waypoint xsi:type="dc:Point" x="1123" y="372" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="941" y="351.1191898360114" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0790olb_di" bpmnElement="SequenceFlow_0790olb"> + <di:waypoint xsi:type="dc:Point" x="1095" y="650" /> + <di:waypoint xsi:type="dc:Point" x="1173" y="650" /> + <di:waypoint xsi:type="dc:Point" x="1173" y="546" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1134" y="635" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_1p4663w_di" bpmnElement="SubProcess_1p4663w" isExpanded="true"> + <dc:Bounds x="61" y="668" width="394" height="188" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0by1uwk_di" bpmnElement="ScriptTask_0by1uwk"> + <dc:Bounds x="209" y="723" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1j0eixl_di" bpmnElement="StartEvent_1j0eixl"> + <dc:Bounds x="94" y="745" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="112" y="786" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0jxh015_di" bpmnElement="EndEvent_0jxh015"> + <dc:Bounds x="370" y="745" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="388" y="786" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0xktw7v_di" bpmnElement="SequenceFlow_0xktw7v"> + <di:waypoint xsi:type="dc:Point" x="130" y="763" /> + <di:waypoint xsi:type="dc:Point" x="209" y="763" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="172" y="763" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0soe5t3_di" bpmnElement="SequenceFlow_0soe5t3"> + <di:waypoint xsi:type="dc:Point" x="309" y="763" /> + <di:waypoint xsi:type="dc:Point" x="370" y="763" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="344" y="763" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_0dot6c9_di" bpmnElement="ExclusiveGateway_0b9kbop"> + <dc:Bounds x="1148" y="496" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1173" y="546" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0el8yzs_di" bpmnElement="SequenceFlow_0el8yzs"> + <di:waypoint xsi:type="dc:Point" x="1173" y="496" /> + <di:waypoint xsi:type="dc:Point" x="1173" y="412" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1188" y="444" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0yto4gz_di" bpmnElement="SequenceFlow_0yto4gz"> + <di:waypoint xsi:type="dc:Point" x="1223" y="372" /> + <di:waypoint xsi:type="dc:Point" x="1352" y="372" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1288" y="357" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_1b8rnqv_di" bpmnElement="SubProcess_1b8rnqv" isExpanded="true"> + <dc:Bounds x="61" y="916" width="394" height="188" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_02d3i14_di" bpmnElement="ScriptTask_02d3i14"> + <dc:Bounds x="209" y="971" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_0e8yrgo_di" bpmnElement="StartEvent_0e8yrgo"> + <dc:Bounds x="94" y="993" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="112" y="1034" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1cmovvm_di" bpmnElement="EndEvent_1cmovvm"> + <dc:Bounds x="370" y="993" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="388" y="1034" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_07kf49j_di" bpmnElement="SequenceFlow_07kf49j"> + <di:waypoint xsi:type="dc:Point" x="130" y="1011" /> + <di:waypoint xsi:type="dc:Point" x="209" y="1011" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="172" y="1011" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01syg1x_di" bpmnElement="SequenceFlow_01syg1x"> + <di:waypoint xsi:type="dc:Point" x="309" y="1011" /> + <di:waypoint xsi:type="dc:Point" x="370" y="1011" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="344" y="1011" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties b/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties index b3fee32765..ccbeaa6e38 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties @@ -1,29 +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 +###
+# ============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 index 130f95e171..3dbfcce36f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -1,31 +1,31 @@ -<!-- - ============LICENSE_START======================================================= - ECOMP MSO - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============LICENSE_END========================================================= - --> - -<jboss-deployment-structure> - <deployment> - <!-- Exclusions allow you to prevent the server from automatically adding some dependencies --> - <exclusions> - <module name="org.apache.log4j" /> - <module name="org.slf4j" /> - <module name="org.slf4j.impl" /> - </exclusions> - </deployment> -</jboss-deployment-structure> - +<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<jboss-deployment-structure>
+ <deployment>
+ <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
+ <exclusions>
+ <module name="org.apache.log4j" />
+ <module name="org.slf4j" />
+ <module name="org.slf4j.impl" />
+ </exclusions>
+ </deployment>
+</jboss-deployment-structure>
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml index 42717c5a76..a39a02178a 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml +++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml @@ -1,26 +1,26 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ============LICENSE_START======================================================= - ECOMP MSO - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============LICENSE_END========================================================= - --> - -<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd"> -<jboss-web> - <security-domain>other</security-domain> - <context-root>/mso</context-root> -</jboss-web> +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+<jboss-web>
+ <security-domain>other</security-domain>
+ <context-root>/mso</context-root>
+</jboss-web>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml index 3bdba77999..eb5df6038e 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml +++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml @@ -1,74 +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> +<?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 |