diff options
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main')
40 files changed, 9896 insertions, 11448 deletions
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/CreateGenericALaCarteServiceInstance.groovy index 2205ffd696..ec414a4ee2 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/CreateGenericALaCarteServiceInstance.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 =
+/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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 CreateGenericALaCarteServiceInstance 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", msg, 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: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-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>CreateGenericALaCarteServiceInstance</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 =
+ <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 CreateGenericALaCarteServiceInstance 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>
+ <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)
- }
+ <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/CreateGenericMacroServiceNetworkVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy index 88e2396078..79508cb8cb 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,752 +1,804 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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 =
+/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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.bpmn.core.decomposition.ModelInfo +import org.openecomp.mso.bpmn.core.decomposition.NetworkResource +import org.openecomp.mso.bpmn.core.decomposition.ServiceDecomposition +import org.openecomp.mso.bpmn.core.decomposition.VnfResource +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="CGMSNV_" + 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("createViprServiceRequest", "") + execution.setVariable("globalSubscriberId", "") + execution.setVariable("serviceInstanceName", "") + execution.setVariable("msoRequestId", "") + execution.setVariable("CGMSNV_NetworksCreatedCount", 0) + execution.setVariable("CGMSNV_VnfsCreatedCount", 0) + execution.setVariable("productFamilyId", "") + + //TODO + execution.setVariable("sdncVersion", "1707") + } + + // ************************************************** + // Pre or Prepare Request Section + // ************************************************** + /** + * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process. + * @param execution + */ + public void preProcessRequest (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 createViprServiceRequest = execution.getVariable("bpmnRequest") + utils.logAudit(createViprServiceRequest) + execution.setVariable("createViprServiceRequest", createViprServiceRequest); + println 'createViprServiceRequest - ' + createViprServiceRequest + + // 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(createViprServiceRequest, "requestDetails.requestInfo.source") + if ((source == null) || (source.isEmpty())) { + execution.setVariable("source", "VID") + } else { + execution.setVariable("source", source) + } + + // extract globalSubscriberId + String globalSubscriberId = jsonUtil.getJsonValue(createViprServiceRequest, "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(createViprServiceRequest, "requestDetails.requestParameters.subscriptionServiceType") + execution.setVariable("subscriptionServiceType", subscriptionServiceType) + utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled) + + String suppressRollback = jsonUtil.getJsonValue(createViprServiceRequest, "requestDetails.requestInfo.suppressRollback") + execution.setVariable("disableRollback", suppressRollback) + utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled) + + String productFamilyId = jsonUtil.getJsonValue(createViprServiceRequest, "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 = """
+ <request-id>${requestId}</request-id> + <action>CREATE</action> + <source>${source}</source> + </request-info>""" + + execution.setVariable("CGMSNV_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 prepareDecomposeService(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + + try { + utils.log("DEBUG", " ***** Inside prepareDecomposeService of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + + String createViprServiceRequest = execution.getVariable("createViprServiceRequest") + String serviceModelInfo = jsonUtil.getJsonValue(createViprServiceRequest, "requestDetails.modelInfo") + execution.setVariable("serviceModelInfo", serviceModelInfo) + + utils.log("DEBUG", " ***** Completed prepareDecomposeService of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + } catch (Exception ex) { + // try error in method block + String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareDecomposeService() - " + 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) + + /* + * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from DecompositionObject + * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + * ModelInfo modelInfo = serviceDecomposition.getModelInfo() + * + */ + String createViprServiceRequest = execution.getVariable("createViprServiceRequest") + String serviceInputParams = jsonUtil.getJsonValue(createViprServiceRequest, "requestDetails.requestParameters") + execution.setVariable("serviceInputParams", serviceInputParams) + + String serviceInstanceName = jsonUtil.getJsonValue(createViprServiceRequest, "requestDetails.requestInfo.instanceName") + execution.setVariable("serviceInstanceName", serviceInstanceName) + + ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + execution.setVariable("serviceDecompositionString", serviceDecomposition.toJsonString()) + + 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 prepareCreateServiceInstance() - " + 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>
+ <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("CGMSNV_setUpdateDbInstancePayload", payload) + utils.logAudit("CGMSNV_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 getDataFromDecomposition (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + + utils.log("DEBUG", " ***** Inside getDataFromDecomposition() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + + try { + + ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + + List<NetworkResource> networkList = serviceDecomposition.getServiceNetworks() + + //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.size() > 0) { + + execution.setVariable("CGMSNV_NetworksCount", networkList.size()) + utils.log("DEBUG", "networks to create: "+ networkList.size(), isDebugEnabled) + } else { + execution.setVariable("CGMSNV_NetworksCount", 0) + utils.log("DEBUG", "no networks to create based upon serviceDecomposition content", isDebugEnabled) + } + + // VNFs + List<VnfResource> vnfList = serviceDecomposition.getServiceVnfs() + execution.setVariable("vnfList", vnfList) + + String vnfModelInfoString = "" + if (vnfList != null && vnfList.size() > 0) { + execution.setVariable("CGMSNV_VNFsCount", vnfList.size()) + utils.log("DEBUG", "vnfs to create: "+ vnfList.size(), isDebugEnabled) + ModelInfo vnfModelInfo = vnfList[0].getModelInfo() + String vnfModelInfoWithRoot = vnfModelInfo.toString() + vnfModelInfoString = jsonUtil.getJsonValue(vnfModelInfoWithRoot, "modelInfo") + } else { + execution.setVariable("CGMSNV_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 getDataFromDecomposition() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + } catch (Exception ex) { + sendSyncError(execution) + String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. getDataFromDecomposition() - " + 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 createViprServiceRequest = execution.getVariable("createViprServiceRequest") + + JSONArray networkList = execution.getVariable("networkList") + utils.log("DEBUG", "array networkList: "+ networkList, isDebugEnabled) + + if (networkList == null || networkList.size() < 1){ + networkList = new JSONArray(execution.getVariable("networkListString")) + utils.log("DEBUG", "array from string networkList: "+ networkList, isDebugEnabled) + } + + Integer networksCreatedCount = execution.getVariable("CGMSNV_NetworksCreatedCount") + String networkModelInfoString = "" + + if (networkList != null) { + utils.log("DEBUG", " getting model info for network # :" + networksCreatedCount, isDebugEnabled) + ModelInfo networkModelInfo = networkList[networksCreatedCount.intValue()].getModelInfo() + 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(createViprServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId") + execution.setVariable("lcpCloudRegionId", lcpCloudRegionId) + utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled) + String tenantId = jsonUtil.getJsonValue(createViprServiceRequest, "requestDetails.cloudConfiguration.tenantId") + execution.setVariable("tenantId", tenantId) + utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled) + + String sdncVersion = execution.getVariable("sdncVersion") + utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled) + + List<VnfResource> vnfList = execution.getVariable("vnfList") + utils.log("DEBUG", "vnfList: "+ vnfList.toString(), 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("CGMSNV_NetworksCreatedCount") + networksCreatedCount++ + + execution.setVariable("CGMSNV_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 createViprServiceRequest = execution.getVariable("createViprServiceRequest") + String productFamilyId = jsonUtil.getJsonValue(createViprServiceRequest, "requestDetails.requestInfo.productFamilyId") + execution.setVariable("productFamilyId", productFamilyId) + utils.log("DEBUG","productFamilyId: "+ productFamilyId, isDebugEnabled) + + List<VnfResource> vnfList = execution.getVariable("vnfList") + + Integer vnfsCreatedCount = execution.getVariable("CGMSNV_VnfsCreatedCount") + String vnfModelInfoString = null; + + if (vnfList != null && vnfList.size() > 0 ) { + utils.log("DEBUG", "getting model info for vnf # " + vnfsCreatedCount, isDebugEnabled) + ModelInfo vnfModelInfo1 = vnfList[0].getModelInfo() + utils.log("DEBUG", "got 0 ", isDebugEnabled) + ModelInfo vnfModelInfo = vnfList[vnfsCreatedCount.intValue()].getModelInfo() + 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(createViprServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId") + execution.setVariable("lcpCloudRegionId", lcpCloudRegionId) + utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled) + String tenantId = jsonUtil.getJsonValue(createViprServiceRequest, "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("CGMSNV_VnfsCreatedCount") + vnfsCreatedCount++ + + execution.setVariable("CGMSNV_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("CGMSNV_NetworksCreatedCount") + networksCreatedCount-- + + execution.setVariable("CGMSNV_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("CGMSNV_NetworksCreatedCount", 0) + utils.log("ERROR", exceptionMessage, true) + } + } + +// public void extractServiceModelInfo (Execution execution) { +// def isDebugEnabled = execution.getVariable("isDebugLogEnabled") +// String msg = "" +// utils.log("DEBUG"," ***** extractServiceModelInfo of CreateGenericMacroServiceNetworkVnf *****", isDebugEnabled) +// +// try { +// +// // check for input +// String requestId = execution.getVariable("msoRequestId") +// +// ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") +// ModelInfo modelInfo = serviceDecomposition.getModelInfo() +// +// utils.log("DEBUG", "modelInfo: "+ modelInfo.toJsonString(), isDebugEnabled) +// utils.log("DEBUG", "modelInfo: "+ modelInfo, isDebugEnabled) +// execution.setVariable("serviceDecomposition", modelInfo) +// +// utils.log("DEBUG"," ***** Exit extractServiceModelInfo of CreateGenericMacroServiceNetworkVnf *****", isDebugEnabled) +// +// } catch (BpmnError e) { +// throw e; +// } catch (Exception ex){ +// msg = "Exception in extractServiceModelInfo " + ex.getMessage() +// utils.log("DEBUG", msg, isDebugEnabled) +// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) +// } +// utils.log("DEBUG"," ***** Exit extractServiceModelInfo of DecomposeService *****", isDebugEnabled) +// } + + // ******************************* + // 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("CGMSNV_requestId") +// String statusMessage = "vIPR ATM Service Instance successfully created." +// String serviceInstanceId = execution.getVariable("CGMSNV_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 =
+// <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("CGMSNV_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 =
+ <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("CGMSNV_Success", true) + execution.setVariable("CGMSNV_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("CGMSNV_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("CGMSNV_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)
- }
+ <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/CreateVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy index 573deb4155..b468a5116c 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,42 +1,45 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.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 groovy.json.JsonOutput 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 {
- - ExceptionUtil exceptionUtil = new ExceptionUtil()
- +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 +import org.openecomp.mso.bpmn.core.json.JsonUtils + +public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { + + ExceptionUtil exceptionUtil = new ExceptionUtil() + JsonUtils jsonUtil = new JsonUtils() + /** * Validates the request message and sets up the workflow. * @param execution the execution @@ -71,73 +74,160 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { // check if request is xml or json try { def jsonSlurper = new JsonSlurper() + def jsonOutput = new JsonOutput() 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 + 'serviceInstanceId', serviceInstanceId) execution.setVariable(prefix+'vnfId', vnfId) execution.setVariable("isVidRequest", "true") - - } - catch(groovy.json.JsonException je) { - utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled) - 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) - exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest") - } - - try { - String request = validateInfraRequest(execution) + + def vnfName = '' + def asdcServiceModelVersion = '' + def serviceModelInfo = null + def vnfModelInfo = null + + def relatedInstanceList = reqMap.requestDetails?.relatedInstanceList + + if (relatedInstanceList != null) { + relatedInstanceList.each { + if (it.relatedInstance.modelInfo?.modelType == 'service') { + asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion + serviceModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo) + + } + if (it.relatedInstance.modelInfo.modelType == 'vnf') { + vnfName = it.relatedInstance.instanceName ?: '' + vnfModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo) + } + } + } + + execution.setVariable(prefix + 'vnfName', vnfName) + execution.setVariable(prefix + 'asdcServiceModelVersion', asdcServiceModelVersion) + execution.setVariable(prefix + 'serviceModelInfo', serviceModelInfo) + execution.setVariable(prefix + 'vnfModelInfo', vnfModelInfo) + + + def vnfType = execution.getVariable('vnfType') + execution.setVariable(prefix + 'vnfType', vnfType) + def vfModuleId = execution.getVariable('vfModuleId') + execution.setVariable(prefix + 'vfModuleId', vfModuleId) + def volumeGroupId = execution.getVariable('volumeGroupId') + execution.setVariable(prefix + 'volumeGroupId', volumeGroupId) + def userParams = reqMap.requestDetails?.requestParameters?.userParams + + Map<String, String> userParamsMap = [:] + if (userParams != null) { + userParams.each { userParam -> + userParamsMap.put(userParam.name, userParam.value) + } + } + + utils.log("DEBUG", 'Processed user params: ' + userParamsMap, isDebugLogEnabled) + + execution.setVariable(prefix + 'vfModuleInputParams', userParamsMap) + + def isBaseVfModule = "false" + if (execution.getVariable('isBaseVfModule') == true) { + isBaseVfModule = "true" + } + + execution.setVariable(prefix + 'isBaseVfModule', isBaseVfModule) + + def requestId = execution.getVariable("mso-request-id") + execution.setVariable(prefix + 'requestId', requestId) + + def vfModuleModelInfo = jsonOutput.toJson(reqMap.requestDetails?.modelInfo) + execution.setVariable(prefix + 'vfModuleModelInfo', vfModuleModelInfo) + + def suppressRollback = reqMap.requestDetails?.requestInfo?.suppressRollback + + + def backoutOnFailure = "" + if(suppressRollback != null){ + if ( suppressRollback == true) { + backoutOnFailure = "false" + } else if ( suppressRollback == false) { + backoutOnFailure = "true" + } + } + + execution.setVariable(prefix + 'disableRollback', suppressRollback) + + def vfModuleName = reqMap.requestDetails?.requestInfo?.instanceName ?: null + execution.setVariable(prefix + 'vfModuleName', vfModuleName) + + def serviceId = reqMap.requestDetails?.requestParameters?.serviceId ?: '' + execution.setVariable(prefix + 'serviceId', serviceId) + + def usePreload = reqMap.requestDetails?.requestParameters?.usePreload + execution.setVariable(prefix + 'usePreload', usePreload) + + def cloudConfiguration = reqMap.requestDetails?.cloudConfiguration + def lcpCloudRegionId = cloudConfiguration.lcpCloudRegionId + execution.setVariable(prefix + 'lcpCloudRegionId', lcpCloudRegionId) + def tenantId = cloudConfiguration.tenantId + execution.setVariable(prefix + 'tenantId', tenantId) + + def globalSubscriberId = reqMap.requestDetails?.subscriberInfo?.globalSubscriberId ?: '' + execution.setVariable(prefix + 'globalSubscriberId', globalSubscriberId) + + execution.setVariable(prefix + 'sdncVersion', '1702') execution.setVariable("CreateVfModuleInfraSuccessIndicator", false) execution.setVariable("RollbackCompleted", false) - execution.setVariable("DoCreateVfModuleRequest", request) + execution.setVariable("isDebugLogEnabled", isDebugLogEnabled) - execution.setVariable("CVFMI_requestInfo",utils.getNodeXml(request,"request-info")) - execution.setVariable("CVFMI_requestId",utils.getNodeText1(request,"request-id")) - execution.setVariable("CVFMI_source",utils.getNodeText1(request,"source")) - execution.setVariable("CVFMI_serviceInstanceId", utils.getNodeText1(request, "service-instance-id")) - execution.setVariable("CVFMI_vnfInputs",utils.getNodeXml(request,"vnf-inputs")) + + + def source = reqMap.requestDetails?.requestInfo?.source + execution.setVariable("CVFMI_source", source) + + //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("CVFMI_requestInfo", requestInfo) + //backoutOnFailure - NetworkUtils networkUtils = new NetworkUtils() - execution.setVariable("CVFMI_rollbackEnabled", networkUtils.isRollbackEnabled(execution,request)) + //NetworkUtils networkUtils = new NetworkUtils() + //execution.setVariable("CVFMI_rollbackEnabled", networkUtils.isRollbackEnabled(execution,request)) execution.setVariable("CVFMI_originalWorkflowException", null) - def vnfParams = "" - if (utils.nodeExists(request, "vnf-params")) { - vnfParams = utils.getNodeXml(request,"vnf-params") - } - execution.setVariable("CVFMI_vnfParams", vnfParams) + def newVfModuleId = UUID.randomUUID().toString() execution.setVariable("newVfModuleId", newVfModuleId) + execution.setVariable(prefix + 'vfModuleId', newVfModuleId) - logDebug('RequestInfo: ' + execution.getVariable("CVFMI_requestInfo"), isDebugLogEnabled) - logDebug('VnfInputs: ' + execution.getVariable("CVFMI_vnfInputs"), isDebugLogEnabled) - logDebug('VnfParams: ' + execution.getVariable("CVFMI_vnfParams"), isDebugLogEnabled) + logDebug('RequestInfo: ' + execution.getVariable("CVFMI_requestInfo"), isDebugLogEnabled) + logDebug('rollbackEnabled: ' + execution.getVariable("CVFMI_rollbackEnabled"), isDebugLogEnabled) logDebug('Exited ' + method, isDebugLogEnabled) } catch (BpmnError bpmnError) { throw bpmnError - } catch (Exception exception) { + } + catch(groovy.json.JsonException je) { + utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled) + 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) exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest") } + } /** @@ -168,16 +258,8 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { try { def requestInfo = execution.getVariable('CVFMI_requestInfo') def requestId = execution.getVariable('CVFMI_requestId') - def source = execution.getVariable('CVFMI_source') - def progress = getNodeTextForce(requestInfo, 'progress') - if (progress.isEmpty()) { - progress = '0' - } - def startTime = getNodeTextForce(requestInfo, 'start-time') - if (startTime.isEmpty()) { - startTime = System.currentTimeMillis() - } - + def source = execution.getVariable('CVFMI_source') + // RESTResponse (for API Handler (APIH) Reply Task) def newVfModuleId = execution.getVariable("newVfModuleId") String synchResponse = """{"requestReferences":{"instanceId":"${newVfModuleId}","requestId":"${requestId}"}}""".trim() @@ -202,9 +284,8 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { 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) + try{ + def requestInfo = execution.getVariable("CVFMI_requestInfo") def action = utils.getNodeText1(requestInfo, "action") utils.log("DEBUG", "requestInfo is: " + requestInfo, isDebugEnabled) @@ -223,10 +304,10 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { }
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> @@ -292,7 +373,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { /* - def requestId = execution.getVariable("mso-request-id")
+ def requestId = execution.getVariable("mso-request-id") if (requestId == null) { exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id") @@ -300,7 +381,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { setVariable(execution, prefix + 'requestId', requestId) - def serviceInstanceId = execution.getVariable("mso-service-instance-id")
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id") if (serviceInstanceId == null) { exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id") @@ -325,14 +406,16 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { utils.log("DEBUG", " ======== STARTED prepareUpdateInfraRequest Process ======== ", isDebugEnabled) try{ - - String vnfInputs = execution.getVariable("CVFMI_vnfInputs") - String requestInfo = execution.getVariable("CVFMI_requestInfo") - def aicCloudRegion = utils.getNodeText1(vnfInputs, "aic-cloud-region") - def tenantId = utils.getNodeText1(vnfInputs, "tenant-id") + + + String requestInfo = execution.getVariable("CVFMI_requestInfo") + def aicCloudRegion = execution.getVariable("CVFMI_lcpCloudRegionId") + def tenantId = execution.getVariable("CVFMI_tenantId") def requestId = utils.getNodeText1(requestInfo, "request-id") def vnfId = execution.getVariable("CVFMI_vnfId") def vfModuleId = execution.getVariable("CVFMI_vfModuleId") + // vfModuleName may be generated by DoCreateVfModule subprocess if it is not specified on the input + def vfModuleName = execution.getVariable("CVFMI_vfModuleName") def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_db_endpoint") execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) @@ -352,18 +435,19 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { 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> + <vfModuleName>${vfModuleName}</vfModuleName> </ns:updateInfraRequest> </soapenv:Body> </soapenv:Envelope>""" @@ -396,9 +480,8 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { try { - def WorkflowException workflowException = execution.getVariable("WorkflowException") - def request = execution.getVariable("DoCreateVfModuleRequest") - def requestInformation = utils.getNodeXml(request, 'request-info', false) + def WorkflowException workflowException = execution.getVariable("WorkflowException") + def requestInformation = execution.getVariable("CVFMI_requestInfo") def errorResponseCode = workflowException.getErrorCode() def errorResponseMsg = workflowException.getErrorMessage() def encErrorResponseMsg = "" @@ -407,10 +490,10 @@ 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">
+ <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> @@ -458,6 +541,8 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { 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 289e185522..48ca2905c1 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,303 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package 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) { + def dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs') + def requestId = execution.getVariable('mso-request-id') + def statusMessage = "VolumeGroup successfully created." + def requestStatus = "COMPLETED" + def progress = "100" + + try { + String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth") + utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled) + + def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey")) + execution.setVariable("BasicAuthHeaderValueDB",encodedString) + } catch (IOException ex) { + String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage() + utils.log("DEBUG", dataErrorMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) + } + + /* + from: $gVolumeGroup/aai:volume-group-id/text() + to: vnfreq:volume-outputs/vnfreq:volume-group-id + */ + // for now assume, generated volumeGroupId is accepted + def volumeGroupId = execution.getVariable(prefix+'volumeGroupId') + + String dbRequest = + """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> + <soapenv:Header/> + <soapenv:Body> + <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb"> + <requestId>${requestId}</requestId> + <lastModifiedBy>BPMN</lastModifiedBy> + <statusMessage>${statusMessage}</statusMessage> + <responseBody></responseBody> + <requestStatus>${requestStatus}</requestStatus> + <progress>${progress}</progress> + <vnfOutputs>${dbVnfOutputs}</vnfOutputs> + <volumeGroupId>${volumeGroupId}</volumeGroupId> + </ns:updateInfraRequest> + </soapenv:Body> + </soapenv:Envelope>""" + + String buildDeleteDBRequestAsString = utils.formatXml(dbRequest) + execution.setVariable(prefix+"createDBRequest", buildDeleteDBRequestAsString) + + utils.logAudit(buildDeleteDBRequestAsString) + } + + + + + + public void postProcessResponse (Execution execution, isDebugEnabled) { + + def dbReturnCode = execution.getVariable(prefix+'dbReturnCode') + def createDBResponse = execution.getVariable(prefix+'createDBResponse') + + utils.logAudit('DB return code: ' + dbReturnCode) + utils.logAudit('DB response: ' + createDBResponse) + + def requestId = execution.getVariable("mso-request-id") + def source = execution.getVariable(prefix+'source') + + String msoCompletionRequest = + """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" + xmlns:ns="http://org.openecomp/mso/request/types/v1"> + <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> + <request-id>${requestId}</request-id> + <action>CREATE</action> + <source>${source}</source> + </request-info> + <aetgt:status-message>Volume Group has been created successfully.</aetgt:status-message> + <aetgt:mso-bpel-name>BPMN VF Module Volume action: CREATE</aetgt:mso-bpel-name> + </aetgt:MsoCompletionRequest>""" + + String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest) + + utils.logAudit(createDBResponse) + utils.logAudit(xmlMsoCompletionRequest) + execution.setVariable(prefix+'Success', true) + execution.setVariable(prefix+'CompleteMsoProcessRequest', xmlMsoCompletionRequest) + utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled) + + } + + public void prepareFalloutHandlerRequest(Execution execution, isDebugEnabled) { + + WorkflowException we = execution.getVariable('WorkflowException') + def errorCode = we?.getErrorCode() + def errorMessage = we?.getErrorMessage() + + def requestId = execution.getVariable("mso-request-id") + def source = execution.getVariable(prefix+'source') + + String falloutHandlerRequest = + """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" + xmlns:ns="http://org.openecomp/mso/request/types/v1" + xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1"> + <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> + <request-id>${requestId}</request-id> + <action>CREATE</action> + <source>${source}</source> + </request-info> + <aetgt:WorkflowException> + <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage> + <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode> + </aetgt:WorkflowException> + + </aetgt:FalloutHandlerRequest>""" + + // Format Response + String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest) + utils.logAudit(xmlHandlerRequest) + + execution.setVariable(prefix+'FalloutHandlerRequest', xmlHandlerRequest) + utils.log("ERROR", "Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled) + } + + + /** + * Query AAI service instance + * @param execution + * @param isDebugEnabled + */ + public void callRESTQueryAAIServiceInstance(Execution execution, isDebugEnabled) { + + def request = execution.getVariable(prefix+"Request") + def serviceInstanceId = utils.getNodeText1(request, "service-instance-id") + + AaiUtil aaiUtil = new AaiUtil(this) + String aaiEndpoint = aaiUtil.getSearchNodesQueryEndpoint(execution) + + def String queryAAIRequest = aaiEndpoint + "?search-node-type=service-instance&filter=service-instance-id:EQUALS:" + serviceInstanceId + utils.logAudit("AAI query service instance request: " + queryAAIRequest) + + APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest) + + String returnCode = response.getStatusCode() + String aaiResponseAsString = response.getResponseBodyAsString() + aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString) + + utils.logAudit("AAI query service instance return code: " + returnCode) + utils.logAudit("AAI query service instance response: " + aaiResponseAsString) + + utils.log("DEBUG", "AAI query service instance return code: " + returnCode, isDebugEnabled) + utils.log("DEBUG", "AAI query service instance response: " + aaiResponseAsString, isDebugEnabled) + + ExceptionUtil exceptionUtil = new ExceptionUtil() + + if (returnCode=='200') { + utils.log("DEBUG", 'Service instance ' + serviceInstanceId + ' found in AAI.', isDebugEnabled) + } else { + if (returnCode=='404') { + def message = 'Service instance ' + serviceInstanceId + ' was not found in AAI. Return code: 404.' + utils.log("DEBUG", message, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message) + } else { + WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) + throw new BpmnError("MSOWorkflowException") + } + } + } +} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy index 6168acde44..9b7fd6835c 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy @@ -205,76 +205,6 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor { utils.log("DEBUG", "*** COMPLETED CreateVnfInfra SendSyncResponse Process ***", isDebugEnabled) } - public void prepareCreateGenericVnf (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix",Prefix) - - utils.log("DEBUG", " *** STARTED CreateVnfInfra PrepareCreateGenericVnf Process *** ", isDebugEnabled) - try { - //Get Vnf Info - String vnfId = execution.getVariable("CREVI_vnfId") - def vnfName = execution.getVariable("CREVI_vnfName") - def vnfType = execution.getVariable("CREVI_vnfType") - def serviceId = execution.getVariable("CREVI_serviceId") - def orchStatus = execution.getVariable("CREVI_orchStatus") - def modelInvariantId = execution.getVariable("CREVI_modelInvariantId") - def modelVersion = execution.getVariable("CREVI_modelVersion") - // TODO: 1702 Variable - def equipmentRole = execution.getVariable("CREVI_equipmentRole") - - //Get Service Instance Info - def serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId") - String siRelatedLink = execution.getVariable("GENGS_siResourceLink") - - int custStart = siRelatedLink.indexOf("customer/") - int custEnd = siRelatedLink.indexOf("/service-subscriptions") - String globalCustId = siRelatedLink.substring(custStart + 9, custEnd) - int serviceStart = siRelatedLink.indexOf("service-subscription/") - int serviceEnd = siRelatedLink.indexOf("/service-instances/") - String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd) - - //Get Namespace - AaiUtil aaiUtil = new AaiUtil(this) - def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution) - String namespace = aaiUtil.getNamespaceFromUri(aai_uri) - - String payload = - """<generic-vnf xmlns="${namespace}"> - <vnf-id>${vnfId}</vnf-id> - <vnf-name>${vnfName}</vnf-name> - <service-id>${serviceId}</service-id> - <vnf-type>${vnfType}</vnf-type> - <orchestration-status>${orchStatus}</orchestration-status> - <persona-model-id>${modelInvariantId}</persona-model-id> - <persona-model-version>${modelVersion}</persona-model-version> - <relationship-list> - <relationship> - <related-to>service-instance</related-to> - <related-link>${siRelatedLink}</related-link> - <relationship-data> - <relationship-key>customer.global-customer-id</relationship-key> - <relationship-value>${globalCustId}</relationship-value> - </relationship-data> - <relationship-data> - <relationship-key>service-subscription.service-type</relationship-key> - <relationship-value>${serviceType}</relationship-value> - </relationship-data> - <relationship-data> - <relationship-key>service-instance.service-instance-id</relationship-key> - <relationship-value>${serviceInstanceId}</relationship-value> - </relationship-data> - </relationship> - </relationship-list> - </generic-vnf>""" - - execution.setVariable("CREVI_genericVnfPayload", payload) - - }catch(Exception ex) { - utils.log("DEBUG", "Error Occured in CreateVnfInfra PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PrepareCreateGenericVnf Process") - } - utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCreateGenericVnf Process ***", isDebugEnabled) - } public void preProcessSDNCAssignRequest(Execution execution){ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled") 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/DeleteGenericALaCarteServiceInstance.groovy index aad0693948..7555885bcb 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/DeleteGenericALaCarteServiceInstance.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 =
+/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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 DeleteGenericALaCarteServiceInstance 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: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-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>DeleteGenericALaCarteServiceInstance</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 =
+ <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>
+ <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>
+ <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 DeleteGenericALaCarteServiceInstance ***** ", 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>
+ <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 DeleteGenericALaCarteServiceInstance 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 DeleteGenericALaCarteServiceInstance ***** ", 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 DeleteGenericALaCarteServiceInstance proccessing. " + } + + //TODO - verify the format for Service Instance Create, + String dbRequest = + """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> + <soapenv:Header/> + <soapenv:Body> <ns:updateInfraRequest xmlns:ns="http://org.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)
-
- }
-
- }
-}
+ <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 DeleteGenericALaCarteServiceInstance 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 e49de0bc09..108f8d3751 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,468 +1,468 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.openecomp.mso.bpmn.infrastructure.scripts;
-
-import groovy.xml.XmlUtil
-import groovy.json.*
-
-import org.openecomp.mso.bpmn.core.json.JsonUtils
-import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
-import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
-import org.openecomp.mso.bpmn.common.scripts.VidUtils
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse;
-
-
-import java.util.UUID;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.json.JSONObject;
-import org.json.JSONArray;
-import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.web.util.UriUtils;
-
-/**
- * This groovy class supports the <class>DeleteViprAtmService.bpmn</class> process.
- *
- */
-public class DeleteGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor {
-
- String Prefix="DELVAS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- JsonUtils jsonUtil = new JsonUtils()
- VidUtils vidUtils = new VidUtils()
- CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
- NetworkUtils networkUtils = new NetworkUtils()
-
- /**
- * This method is executed during the preProcessRequest task of the <class>DeleteViprAtmService.bpmn</class> process.
- * @param execution
- */
- public InitializeProcessVariables(Execution execution){
- /* Initialize all the process variables in this block */
-
- execution.setVariable("deleteViprAtmServiceRequest", "")
- execution.setVariable("msoRequestId", "")
- execution.setVariable("DELVAS_vnfsDeletedCount", 0)
- execution.setVariable("DELVAS_vnfsCount", 0)
- execution.setVariable("DELVAS_networksCount", 0)
- execution.setVariable("DELVAS_networksDeletedCount", 0)
- }
-
- // **************************************************
- // Pre or Prepare Request Section
- // **************************************************
- /**
- * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
- * @param execution
- */
- public void preProcessRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled)
-
- try {
- // initialize flow variables
- InitializeProcessVariables(execution)
-
- // check for incoming json message/input
- String deleteViprAtmServiceRequest = execution.getVariable("bpmnRequest")
- utils.logAudit(deleteViprAtmServiceRequest)
- execution.setVariable("deleteViprAtmServiceRequest", deleteViprAtmServiceRequest);
- println 'deleteViprAtmServiceRequest - ' + deleteViprAtmServiceRequest
-
- // extract requestId
- String requestId = execution.getVariable("mso-request-id")
- execution.setVariable("msoRequestId", requestId)
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
- String dataErrorMessage = " Element 'serviceInstanceId' is missing. "
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
-
- String requestAction = execution.getVariable("requestAction")
- execution.setVariable("requestAction", requestAction)
-
- String source = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.source")
- if ((source == null) || (source.isEmpty())) {
- execution.setVariable("source", "VID")
- } else {
- execution.setVariable("source", source)
- }
-
- // extract globalSubscriberId
- String globalSubscriberId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.subscriberInfo.globalSubscriberId")
-
- // global-customer-id is optional on Delete
-
- execution.setVariable("globalSubscriberId", globalSubscriberId)
- execution.setVariable("globalCustomerId", globalSubscriberId)
-
- String suppressRollback = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.suppressRollback")
- execution.setVariable("disableRollback", suppressRollback)
- utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
-
- String productFamilyId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.productFamilyId")
- execution.setVariable("productFamilyId", productFamilyId)
- utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
-
- // extract subscriptionServiceType
- String subscriptionServiceType = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestParameters.subscriptionServiceType")
- execution.setVariable("subscriptionServiceType", subscriptionServiceType)
- utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
-
- // extract cloud configuration
- String lcpCloudRegionId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
- execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
- utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
- String tenantId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.tenantId")
- execution.setVariable("tenantId", tenantId)
- utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
-
- String sdncVersion = "1702"
- execution.setVariable("sdncVersion", sdncVersion)
- utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
-
- //For Completion Handler & Fallout Handler
- String requestInfo =
- """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${source}</source>
- </request-info>"""
-
- execution.setVariable("DELVAS_requestInfo", requestInfo)
-
- //Setting for Generic Sub Flows
- execution.setVariable("GENGS_type", "service-instance")
-
- utils.log("DEBUG", " ***** Completed preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled)
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex){
- String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- public void sendSyncResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- utils.log("DEBUG", " ***** Inside sendSyncResponse of DeleteViprAtmService ***** ", isDebugEnabled)
-
- try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- String requestId = execution.getVariable("mso-request-id")
-
- // RESTResponse (for API Handler (APIH) Reply Task)
- String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
-
- utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
- sendWorkflowResponse(execution, 202, syncResponse)
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- public void prepareServiceInstanceDelete (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " ***** Inside prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled)
-
- try {
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- // confirm if ServiceInstance was found
- if ( !execution.getVariable("GENGS_FoundIndicator") )
- {
- String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Service Instance was not found in AAI by id: " + serviceInstanceId
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
-
- // get variable within incoming json
- String deleteViprAtmServiceRequest = execution.getVariable("deleteViprAtmServiceRequest");
-
- // get SI extracted by GenericGetService
- String serviceInstanceAaiRecord = execution.getVariable("GENGS_service");
-
- utils.log("DEBUG", "serviceInstanceAaiRecord: "+serviceInstanceAaiRecord, isDebugEnabled)
-
- String relationship = ""
- try {
- relationship = networkUtils.getFirstNodeXml(serviceInstanceAaiRecord, "relationship-list")
- } catch (Exception ex) {
- //no relationships found
- }
- utils.log("DEBUG", " relationship string - " + relationship, isDebugEnabled)
-
- int vnfsCount = 0
- int networksCount = 0
-
- if (relationship != null && relationship.length() > 0){
- relationship = relationship.trim().replace("tag0:","").replace(":tag0","")
-
- // Check if Network TableREf is present, then build a List of network policy
- List relatedVnfIdList = networkUtils.getRelatedVnfIdList(relationship)
- vnfsCount = relatedVnfIdList.size()
- execution.setVariable("DELVAS_vnfsCount", vnfsCount)
- utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled)
- execution.setVariable("DELVAS_relatedVnfIdList", relatedVnfIdList)
-
- // Check if Network TableREf is present, then build a List of network policy
- List relatedNetworkIdList = networkUtils.getRelatedNetworkIdList(relationship)
- networksCount = relatedNetworkIdList.size()
- execution.setVariable("DELVAS_networksCount", networksCount)
- utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled)
- execution.setVariable("DELVAS_relatedNetworkIdList", relatedNetworkIdList)
- } else {
- execution.setVariable("DELVAS_vnfsCount", 0)
- utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled)
- execution.setVariable("DELVAS_networksCount", 0)
- utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled)
- }
-
- utils.log("DEBUG", " ***** Completed prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- sendSyncError(execution)
- String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. prepareServiceInstanceDelete() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
-
- // *******************************
- //
- // *******************************
- public void prepareVnfAndModulesDelete (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- try {
- utils.log("DEBUG", " ***** Inside prepareVnfAndModulesDelete of DeleteServiceInstanceMacro ***** ", isDebugEnabled)
-
- List vnfList = execution.getVariable("DELVAS_relatedVnfIdList")
- Integer vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount")
- String vnfModelInfoString = ""
- String vnfId = ""
- if (vnfList.size() > 0 ) {
- vnfId = vnfList.get(vnfsDeletedCount.intValue())
- }
-
- execution.setVariable("vnfId", vnfId)
- utils.log("DEBUG", "need to delete vnfId:" + vnfId, isDebugEnabled)
-
- utils.log("DEBUG", " ***** Completed prepareVnfAndModulesDelete of DeleteServiceInstanceMacro ***** ", isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceMacro flow. Unexpected Error from method prepareVnfAndModulesDelete() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- // *******************************
- // Validate Vnf request Section -> increment count
- // *******************************
- public void validateVnfDelete (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- try {
- utils.log("DEBUG", " ***** Inside validateVnfDelete of DeleteViprAtmService ***** ", isDebugEnabled)
-
- String vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount")
- vnfsDeletedCount++
-
- execution.setVariable("DELVAS_vnfsDeletedCount", vnfsDeletedCount)
-
- utils.log("DEBUG", " ***** Completed validateVnfDelete of DeleteViprAtmService ***** "+" vnf # "+vnfsDeletedCount, isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method validateVnfDelete() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- // *******************************
- // Generate Network request Section
- // *******************************
- public void prepareNetworkDelete (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- try {
- utils.log("DEBUG", " ***** Inside prepareNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
-
- List networkList = execution.getVariable("DELVAS_relatedNetworkIdList")
- Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount")
-
- String networkId = ""
- if (networkList.size() > 0) {
- networkId = networkList.get(networksDeletedCount.intValue())
- }
-
- execution.setVariable("networkId", networkId)
- utils.log("DEBUG", "need to delete networkId:" + networkId, isDebugEnabled)
-
- utils.log("DEBUG", " ***** Completed prepareNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = q"Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method prepareNetworkDelete() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- // *******************************
- // Validate Network request Section
- // *******************************
- public void validateNetworkDelete (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- try {
- utils.log("DEBUG", " ***** Inside validateNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
-
- Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount")
- networksDeletedCount++
-
- execution.setVariable("DELVAS_networksDeletedCount", networksDeletedCount)
-
- utils.log("DEBUG", " ***** Completed validateNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method validateNetworkDelete() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
-
- // *****************************************
- // Prepare Completion request Section
- // *****************************************
- public void postProcessResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " ***** Inside postProcessResponse of DeleteViprAtmService ***** ", isDebugEnabled)
-
- try {
- String source = execution.getVariable("source")
- String requestId = execution.getVariable("msoRequestId")
-
- String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1">
- <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:status-message>vIPR ATM Service Instance has been deleted successfully.</aetgt:status-message>
- <aetgt:mso-bpel-name>BPMN Service Instance macro action: DELETE</aetgt:mso-bpel-name>
- </aetgt:MsoCompletionRequest>"""
-
- // Format Response
- String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
-
- utils.logAudit(xmlMsoCompletionRequest)
- execution.setVariable("DELVAS_Success", true)
- execution.setVariable("DELVAS_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
- utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- public void prepareFalloutRequest(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** STARTED DeleteViprAtmService prepareFalloutRequest Process *** ", isDebugEnabled)
-
- try {
- WorkflowException wfex = execution.getVariable("WorkflowException")
- utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
- String requestInfo = execution.getVariable("DELVAS_requestInfo")
- utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
-
- String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
-
- execution.setVariable("DELVAS_falloutRequest", falloutRequest)
- } catch (Exception ex) {
- utils.log("DEBUG", "Error Occured in DeleteViprAtmService prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteViprAtmService prepareFalloutRequest Process")
- }
- utils.log("DEBUG", "*** COMPLETED DeleteViprAtmService prepareFalloutRequest Process ***", isDebugEnabled)
- }
-
-
- public void sendSyncError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " ***** Inside sendSyncError() of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
-
- try {
- String errorMessage = ""
- if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
- WorkflowException wfe = execution.getVariable("WorkflowException")
- errorMessage = wfe.getErrorMessage()
- } else {
- errorMessage = "Sending Sync Error."
- }
-
- String buildworkflowException =
- """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7000</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
-
- utils.logAudit(buildworkflowException)
- sendWorkflowResponse(execution, 500, buildworkflowException)
- } catch (Exception ex) {
- utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
- }
- }
-
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- try{
- utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
- execution.setVariable("DELVAS_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
- }catch(BpmnError b){
- utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- execution.setVariable("DELVAS_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-
+/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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>DeleteGenericMacroServiceNetworkVnf.bpmn</class> process. + * @param execution + */ + public InitializeProcessVariables(Execution execution){ + /* Initialize all the process variables in this block */ + + execution.setVariable("DeleteGenericMacroServiceNetworkVnfRequest", "") + 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 DeleteGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled) + + try { + // initialize flow variables + InitializeProcessVariables(execution) + + // check for incoming json message/input + String DeleteGenericMacroServiceNetworkVnfRequest = execution.getVariable("bpmnRequest") + utils.logAudit(DeleteGenericMacroServiceNetworkVnfRequest) + execution.setVariable("DeleteGenericMacroServiceNetworkVnfRequest", DeleteGenericMacroServiceNetworkVnfRequest); + println 'DeleteGenericMacroServiceNetworkVnfRequest - ' + DeleteGenericMacroServiceNetworkVnfRequest + + // 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(DeleteGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.source") + if ((source == null) || (source.isEmpty())) { + execution.setVariable("source", "VID") + } else { + execution.setVariable("source", source) + } + + // extract globalSubscriberId + String globalSubscriberId = jsonUtil.getJsonValue(DeleteGenericMacroServiceNetworkVnfRequest, "requestDetails.subscriberInfo.globalSubscriberId") + + // global-customer-id is optional on Delete + + execution.setVariable("globalSubscriberId", globalSubscriberId) + execution.setVariable("globalCustomerId", globalSubscriberId) + + String suppressRollback = jsonUtil.getJsonValue(DeleteGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.suppressRollback") + execution.setVariable("disableRollback", suppressRollback) + utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled) + + String productFamilyId = jsonUtil.getJsonValue(DeleteGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.productFamilyId") + execution.setVariable("productFamilyId", productFamilyId) + utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled) + + // extract subscriptionServiceType + String subscriptionServiceType = jsonUtil.getJsonValue(DeleteGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters.subscriptionServiceType") + execution.setVariable("subscriptionServiceType", subscriptionServiceType) + utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled) + + // extract cloud configuration + String lcpCloudRegionId = jsonUtil.getJsonValue(DeleteGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId") + execution.setVariable("lcpCloudRegionId", lcpCloudRegionId) + utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled) + String tenantId = jsonUtil.getJsonValue(DeleteGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.tenantId") + execution.setVariable("tenantId", tenantId) + utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled) + + String sdncVersion = "1707" + 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 DeleteGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled) + + } catch (BpmnError e) { + throw e; + } catch (Exception ex){ + String exceptionMessage = "Bpmn error encountered in DeleteGenericMacroServiceNetworkVnf 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 DeleteGenericMacroServiceNetworkVnf ***** ", 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 DeleteGenericMacroServiceNetworkVnf 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 DeleteGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + + try { + + String serviceInstanceId = execution.getVariable("serviceInstanceId") + + // confirm if ServiceInstance was found + if ( !execution.getVariable("GENGS_FoundIndicator") ) + { + String exceptionMessage = "Bpmn error encountered in DeleteGenericMacroServiceNetworkVnf flow. Service Instance was not found in AAI by id: " + serviceInstanceId + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + } + + // get variable within incoming json + String DeleteGenericMacroServiceNetworkVnfRequest = execution.getVariable("DeleteGenericMacroServiceNetworkVnfRequest"); + + // 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 DeleteGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + } catch (Exception ex) { + sendSyncError(execution) + String exceptionMessage = "Bpmn error encountered in DeleteGenericMacroServiceNetworkVnf 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 DeleteGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + + String vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount") + vnfsDeletedCount++ + + execution.setVariable("DELVAS_vnfsDeletedCount", vnfsDeletedCount) + + utils.log("DEBUG", " ***** Completed validateVnfDelete of DeleteGenericMacroServiceNetworkVnf ***** "+" vnf # "+vnfsDeletedCount, isDebugEnabled) + } catch (Exception ex) { + // try error in method block + String exceptionMessage = "Bpmn error encountered in DeleteGenericMacroServiceNetworkVnf 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 DeleteGenericMacroServiceNetworkVnf ***** ", 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 DeleteGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + } catch (Exception ex) { + // try error in method block + String exceptionMessage = q"Bpmn error encountered in DeleteGenericMacroServiceNetworkVnf 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 DeleteGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + + Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount") + networksDeletedCount++ + + execution.setVariable("DELVAS_networksDeletedCount", networksDeletedCount) + + utils.log("DEBUG", " ***** Completed validateNetworkDelete of DeleteGenericMacroServiceNetworkVnf ***** ", isDebugEnabled) + } catch (Exception ex) { + // try error in method block + String exceptionMessage = "Bpmn error encountered in DeleteGenericMacroServiceNetworkVnf 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 DeleteGenericMacroServiceNetworkVnf ***** ", 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 DeleteGenericMacroServiceNetworkVnf 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 DeleteGenericMacroServiceNetworkVnf prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteGenericMacroServiceNetworkVnf prepareFalloutRequest Process") + } + utils.log("DEBUG", "*** COMPLETED DeleteGenericMacroServiceNetworkVnf 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 9e341dafbc..e18af172de 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/DoCreateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy index 2d5ddf0d0c..d221d0622b 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; @@ -322,7 +322,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { String networkInputs = execution.getVariable(Prefix + "networkInputs") String networkName = utils.getNodeText1(networkInputs, "network-name") networkName = UriUtils.encode(networkName,"UTF-8") - String messageId = execution.getVariable("messageId") // Prepare AA&I url with network-name String aai_endpoint = execution.getVariable("URN_aai_endpoint") @@ -333,14 +332,8 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "queryNameAAIRequest", queryAAINameRequest) utils.log("DEBUG", Prefix + "queryNameAAIRequest - " + "\n" + queryAAINameRequest, isDebugEnabled) - RESTConfig config = new RESTConfig(queryAAINameRequest); - try { - RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId) - .addHeader("X-FromAppId", "MSO") - .addHeader("Content-Type", "application/xml") - .addHeader("Accept","application/xml"); - APIResponse response = client.get() + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryAAINameRequest) String returnCode = response.getStatusCode() execution.setVariable(Prefix + "aaiNameReturnCode", returnCode) utils.log("DEBUG", " ***** AAI Query Name Response Code : " + returnCode, isDebugEnabled) @@ -483,7 +476,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "networkName", networkName) networkId = UriUtils.encode(networkId,"UTF-8") - String messageId = execution.getVariable(Prefix + "messageId") // Prepare AA&I url String aai_endpoint = execution.getVariable("URN_aai_endpoint") @@ -494,12 +486,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "queryIdAAIRequest", queryIdAAIRequest) utils.log("DEBUG", Prefix + "queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled) - RESTConfig config = new RESTConfig(queryIdAAIRequest); - RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId) - .addHeader("X-FromAppId", "MSO") - .addHeader("Content-Type", "application/xml") - .addHeader("Accept","application/xml"); - APIResponse response = client.get() + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryIdAAIRequest) String returnCode = response.getStatusCode() execution.setVariable(Prefix + "aaiIdReturnCode", returnCode) @@ -562,7 +549,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { String networkId = execution.getVariable(Prefix + "networkId") String netId = networkId networkId = UriUtils.encode(networkId,"UTF-8") - String messageId = execution.getVariable(Prefix + "messageId") // Prepare AA&I url String aai_endpoint = execution.getVariable("URN_aai_endpoint") @@ -573,12 +559,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "requeryIdAAIRequest", requeryIdAAIRequest) utils.log("DEBUG", Prefix + "requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled) - RESTConfig config = new RESTConfig(requeryIdAAIRequest); - RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId) - .addHeader("X-FromAppId", "MSO") - .addHeader("Content-Type", "application/xml") - .addHeader("Accept","application/xml"); - APIResponse response = client.get() + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, requeryIdAAIRequest) String returnCode = response.getStatusCode() execution.setVariable(Prefix + "aaiRequeryIdReturnCode", returnCode) utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled) @@ -642,7 +623,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { try { // get variables - String messageId = execution.getVariable(Prefix + "messageId") String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) @@ -693,12 +673,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "queryVpnBindingAAIRequest", queryVpnBindingAAIRequest) utils.log("DEBUG", Prefix + "queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled) - RESTConfig config = new RESTConfig(queryVpnBindingAAIRequest); - RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId) - .addHeader("X-FromAppId", "MSO") - .addHeader("Content-Type", "application/xml") - .addHeader("Accept","application/xml"); - APIResponse response = client.get() + 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) @@ -747,7 +722,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { // reset return code to success execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200") String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) String aaiStubResponse = """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> <vpn-binding xmlns="${schemaVersion}"> @@ -781,7 +756,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { try { // get variables - String messageId = execution.getVariable(Prefix + "messageId") String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) @@ -835,12 +809,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest) utils.log("DEBUG", Prefix + "queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled) - RESTConfig config = new RESTConfig(queryNetworkPolicyAAIRequest); - RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId) - .addHeader("X-FromAppId", "MSO") - .addHeader("Content-Type", "application/xml") - .addHeader("Accept","application/xml"); - APIResponse response = client.get() + 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) @@ -889,7 +858,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { // reset return code to success execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200") String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) String aaiStubResponse = """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> <network-policy xmlns="${schemaVersion}"> @@ -923,7 +892,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { try { // get variables - String messageId = execution.getVariable(Prefix + "messageId") String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) @@ -977,12 +945,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest) utils.log("DEBUG", Prefix + "queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled) - RESTConfig config = new RESTConfig(queryNetworkTableRefAAIRequest); - RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId) - .addHeader("X-FromAppId", "MSO") - .addHeader("Content-Type", "application/xml") - .addHeader("Accept","application/xml"); - APIResponse response = client.get() + 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) @@ -1031,7 +994,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { // reset return code to success execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200") String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) String aaiStubResponse = """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> <route-table-references xmlns="${schemaVersion}"> @@ -1070,7 +1033,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { networkId = UriUtils.encode(networkId,"UTF-8") String requeryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse") String createNetworkResponse = execution.getVariable(Prefix + "createNetworkResponse") - String messageId = execution.getVariable(Prefix + "messageId") // Prepare url String aai_endpoint = execution.getVariable("URN_aai_endpoint") @@ -1083,7 +1045,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { utils.log("DEBUG", Prefix + "updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled) //Prepare payload (PUT) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion) String payloadXml = utils.formatXml(payload) utils.logAudit(payloadXml) @@ -1096,7 +1058,6 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode) utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled) String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString() - if (returnCode=='200') { utils.logAudit(aaiUpdateContrailResponseAsString) execution.setVariable(Prefix + "updateContrailAAIResponse", aaiUpdateContrailResponseAsString) @@ -1125,7 +1086,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { // aai all errors String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode utils.log("DEBUG", errorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage) } } } @@ -1153,7 +1114,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") @@ -1200,12 +1161,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/DoCreateServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy index e6276a8852..9f28db727d 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; @@ -134,14 +134,14 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { execution.setVariable("sdncCallbackUrl", sdncCallbackUrl) utils.log("DEBUG","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled) - String personaModelId = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantId") - String personaModelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion") + String modelInvariantId = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantId") + String modelVersionId = jsonUtil.getJsonValue(serviceModelInfo, "modelVersionId") - if (personaModelId == null) { - personaModelId = "" + if (modelInvariantId == null) { + modelInvariantId = "" } - if (personaModelVersion == null) { - personaModelVersion = "" + if (modelVersionId == null) { + modelVersionId = "" } if (serviceInstanceName == null) { execution.setVariable("serviceInstanceName", "") @@ -155,9 +155,9 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { String serviceInstanceData = """<service-instance xmlns=\"${namespace}\"> <service-instance-name>${serviceInstanceName}</service-instance-name> - <orchestration-status>active</orchestration-status> - <persona-model-id>${personaModelId}</persona-model-id> - <persona-model-version>${personaModelVersion}</persona-model-version> + <orchestration-status>Active</orchestration-status> + <model-invariant-id>${modelInvariantId}</model-invariant-id> + <model-version-id>${modelVersionId}</model-version-id> </service-instance>""".trim() execution.setVariable("serviceInstanceData", serviceInstanceData) @@ -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> @@ -406,12 +406,14 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { utils.logAudit("sdncAssignRequest: " + sdncAssignRequest) def sdncRequestId2 = UUID.randomUUID().toString() - String sdncRollbackRequest = sdncAssignRequest.replace(">assign<", ">delete<").replace(">CreateServiceInstance<", ">DeleteServiceInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<") + String sdncDelete = sdncAssignRequest.replace(">assign<", ">delete<").replace(">CreateServiceInstance<", ">DeleteServiceInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<") + def sdncRequestId3 = UUID.randomUUID().toString() + String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId2}<", ">${sdncRequestId3}<") def rollbackData = execution.getVariable("rollbackData") - rollbackData.put("SERVICEINSTANCE", "sdncRollbackRequest", sdncRollbackRequest) + rollbackData.put("SERVICEINSTANCE", "sdncDeactivate", sdncDeactivate) + rollbackData.put("SERVICEINSTANCE", "sdncDelete", sdncDelete) execution.setVariable("rollbackData", rollbackData) - utils.log("DEBUG","sdncRollbackRequest:\n" + sdncRollbackRequest, isDebugEnabled) utils.log("DEBUG","rollbackData:\n" + rollbackData.toString(), isDebugEnabled) } catch (BpmnError e) { 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 1e6541e226..0e9fd7f4b7 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 @@ -106,8 +106,12 @@ public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcesso execution.setVariable("skipRollback", true)
}
- def sdncRollbackRequest = rollbackData.get("SERVICEINSTANCE", "sdncRollbackRequest")
- execution.setVariable("sdncRollbackRequest", sdncRollbackRequest)
+ def sdncDelete = rollbackData.get("SERVICEINSTANCE", "sdncDelete")
+ execution.setVariable("sdncDelete", sdncDelete)
+ def sdncDeactivate = rollbackData.get("SERVICEINSTANCE", "sdncDeactivate")
+ execution.setVariable("sdncDeactivate", sdncDeactivate)
+ utils.log("DEBUG","sdncDeactivate:\n" + sdncDeactivate, isDebugEnabled)
+ utils.log("DEBUG","sdncDelete:\n" + sdncDelete, isDebugEnabled)
}
else {
execution.setVariable("skipRollback", true)
@@ -131,31 +135,33 @@ public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcesso utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
- public void validateSDNCResponse(Execution execution) {
+ public void validateSDNCResponse(Execution execution, String response, String method) {
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")
-
+ utils.log("DEBUG", "SDNCResponse: " + response, isDebugEnabled)
+ utils.log("DEBUG", "workflowException: " + workflowException, isDebugEnabled)
+
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)
+ msg = "SDNC Adapter service-instance rollback successful for " + method
+ utils.log("DEBUG", msg, 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)
+ msg = "Error Response from SDNC Adapter service-instance rollback for " + method
+ execution.setVariable("rollbackError", msg)
+ utils.log("DEBUG", msg, isDebugEnabled)
throw new BpmnError("MSOWorkflowException")
}
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
- msg = "Exception in Create ServiceInstance Rollback validateSDNCResponse " + ex.getMessage()
+ msg = "Exception in Create ServiceInstance rollback for " + method + " Exception:" + ex.getMessage()
utils.log("DEBUG", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
@@ -187,7 +193,7 @@ public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcesso utils.log("DEBUG","*** Exit postProcessRequest ***", isDebugEnabled)
} catch (BpmnError e) {
- msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + e.getMessage()
utils.log("DEBUG", msg, isDebugEnabled)
} catch (Exception ex) {
msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
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 269cb808c4..1fd5ab0abc 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,15 +37,15 @@ 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 { @@ -140,7 +140,7 @@ public class DoCreateVfModule extends VfModuleBase { 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 + // Set mso-request-id to request-id for VNF Adapter interface execution.setVariable("mso-request-id", requestId) //serviceId def serviceId = execution.getVariable("serviceId") @@ -175,7 +175,7 @@ public class DoCreateVfModule extends VfModuleBase { //personaModelId execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantId")) //personaModelVersion - execution.setVariable("DCVFM_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelVersion")) + execution.setVariable("DCVFM_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelVersionId")) //vfModuleLabel def vfModuleLabel = execution.getVariable("vfModuleLabel") if (vfModuleLabel != null) { @@ -665,7 +665,7 @@ public class DoCreateVfModule extends VfModuleBase { 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() } def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl") @@ -680,6 +680,14 @@ public class DoCreateVfModule extends VfModuleBase { else { svcInstId = serviceInstanceId } + + def msoAction = "" + if (!sdncVersion.equals("1707")) { + msoAction = "mobility" + } + else { + msoAction = "vfmodule" + } // For VNF, serviceOperation (URI for topology GET) will be retrieved from "selflink" element // in the response from GenericGetVnf // For VF Module, in 1707 serviceOperation will be retrieved from "object-path" element @@ -723,7 +731,7 @@ public class DoCreateVfModule extends VfModuleBase { <sdncadapter:SvcAction>query</sdncadapter:SvcAction> <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation> <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl> - <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction> + <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction> </sdncadapter:RequestHeader> <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData> </sdncadapterworkflow:SDNCAdapterWorkflowRequest>""" @@ -902,13 +910,13 @@ public class DoCreateVfModule extends VfModuleBase { def requestId = execution.getVariable("mso-request-id") if (requestId == null) { - exceptionUtil.buildAndThrowWorkflowException(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) { - exceptionUtil.buildAndThrowWorkflowException(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) @@ -1014,9 +1022,9 @@ public class DoCreateVfModule extends VfModuleBase { if (!sdncVersion.equals("1707")) { sdncRequest = - """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1" - xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" - xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ """<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> @@ -1057,14 +1065,14 @@ public class DoCreateVfModule extends VfModuleBase { 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">
+ """<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:SvcOperation>vf-module-topology-operation</sdncadapter:SvcOperation> <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl> <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction> </sdncadapter:RequestHeader> @@ -1081,10 +1089,7 @@ public class DoCreateVfModule extends VfModuleBase { ${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> + </service-information> <vnf-information> <vnf-id>${vnfId}</vnf-id> <vnf-type>${vnfType}</vnf-type> @@ -1095,11 +1100,10 @@ public class DoCreateVfModule extends VfModuleBase { <vf-module-type>${vfModuleModelName}</vf-module-type> ${vfModuleEcompModelInformation} </vf-module-information> - <vf-module-request-input> - <request-version>${sdncVersion}</request-version> + <vf-module-request-input> <vf-module-name>${vfModuleName}</vf-module-name> <tenant>${tenantId}</tenant> - <aic-cloud-region>${cloudSiteId}</aic-cloud-region> + <aic-cloud-region>${cloudSiteId}</aic-cloud-region> ${sdncVNFParamsXml} </vf-module-request-input> </sdncadapterworkflow:SDNCRequestData> @@ -1108,9 +1112,9 @@ public class DoCreateVfModule extends VfModuleBase { /* 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">
+ """<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> @@ -1142,8 +1146,7 @@ public class DoCreateVfModule extends VfModuleBase { <vf-module-type>${vfModuleModelName}</vf-module-type> ${vfModuleEcompModelInformation} </vf-module-information> - <vf-module-request-input> - <request-version>${sdncVersion}</request-version> + <vf-module-request-input> <vf-module-name>${vfModuleName}</vf-module-name> <tenant>${tenantId}</tenant> <aic-cloud-region>${cloudSiteId}</aic-cloud-region> @@ -1662,7 +1665,7 @@ public class DoCreateVfModule extends VfModuleBase { def networkPolicyId = UUID.randomUUID().toString() logDebug("Adding network-policy with network-policy-id " + networkPolicyId, isDebugLogEnabled) - String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri) + String aaiNamespace = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) logDebug('AAI namespace is: ' + aaiNamespace, isDebugLogEnabled) String payload = """<network-policy xmlns="${aaiNamespace}"> <network-policy-id>${networkPolicyId}</network-policy-id> 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 8ca749d1ec..af1161b656 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,33 +1,33 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
- -package org.openecomp.mso.bpmn.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 @@ -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", "attmsorequestid") execution.setVariable("DCVFMR_requestId", requestId) List createdNetworkPolicyFqdnList = [] int i = 0 @@ -92,7 +92,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{ 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", "attmsoserviceinstanceid") //execution.setVariable("DCVFMR_serviceInstanceId", serviceInstanceId) execution.setVariable("DCVFMR_rollbackPrepareUpdateVfModule", rollbackData.get("VFMODULE", "rollbackPrepareUpdateVfModule")) execution.setVariable("DCVFMR_rollbackUpdateAAIVfModule", rollbackData.get("VFMODULE", "rollbackUpdateAAIVfModule")) @@ -159,9 +159,9 @@ 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">
+ 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> @@ -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") diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy index f54fa5c88b..8e54024c6f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy @@ -303,7 +303,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase { def vnfId = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-id') def vnfName = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-name') def modelCustomizationId = getNodeTextForce(volumeRequest, "model-customization-id") - + String messageId = UUID.randomUUID() utils.log("DEBUG", "messageId to be used is generated: " + messageId, isDebugEnabled) @@ -502,6 +502,9 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase { utils.logAudit("AAI query generic vnf return code: " + returnCode) utils.logAudit("AAI query generic vnf response: " + aaiResponseAsString) + //utils.log("DEBUG", "AAI query generic vnf return code: " + returnCode, isDebugEnabled) + //utils.log("DEBUG", "AAI query generic vnf response: " + aaiResponseAsString, isDebugEnabled) + ExceptionUtil exceptionUtil = new ExceptionUtil() if (returnCode=='200') { 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 55d56a6194..8a6cac4a91 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.openecomp.mso.bpmn.core.RollbackData
-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,429 +30,557 @@ import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils import org.openecomp.mso.bpmn.common.scripts.VidUtils import org.openecomp.mso.bpmn.core.WorkflowException import org.openecomp.mso.bpmn.core.json.JsonUtils -
-
-/**
- * This class supports the DoCreateVnf building block subflow
- * with the creation of a generic vnf for
- * infrastructure.
- *
- */
-class DoCreateVnf extends AbstractServiceTaskProcessor {
-
- String Prefix="DoCVNF_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- JsonUtils jsonUtil = new JsonUtils()
- VidUtils vidUtils = new VidUtils(this)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
-
- /**
- * This method gets and validates the incoming
- * request.
- *
- * @param - execution
- *
- */
- public void preProcessRequest(Execution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED DoCreateVnf PreProcessRequest Process*** ", isDebugEnabled)
-
- // DISABLE SDNC INTERACTION FOR NOW
- execution.setVariable("SDNCInteractionEnabled", false)
-
-
- /*******************/
- try{
- // Get Variables
-
- String cloudConfiguration = execution.getVariable("cloudConfiguration")
- String vnfModelInfo = execution.getVariable("vnfModelInfo")
- String serviceModelInfo = execution.getVariable("serviceModelInfo")
-
- String requestId = execution.getVariable("requestId")
- execution.setVariable("DoCVNF_requestId", requestId)
+ + +/** + * 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 vnfModelInfo = execution.getVariable("vnfModelInfo") + String serviceModelInfo = execution.getVariable("serviceModelInfo") + + String requestId = execution.getVariable("msoRequestId") + execution.setVariable("DoCVNF_requestId", requestId) execution.setVariable("mso-request-id", requestId) - 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 =
+ 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") + if (vnfName.equals("") || vnfName.equals("null")) { + vnfName = null + } + 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 = execution.getVariable("lcpCloudRegionId") + execution.setVariable("DoCVNF_cloudSiteId", cloudSiteId) + utils.log("DEBUG", "Incoming Cloud Site Id is: " + cloudSiteId, isDebugEnabled) + + String tenantId = execution.getVariable("tenantId") + execution.setVariable("DoCVNF_tenantId", tenantId) + utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId, isDebugEnabled) + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + if (globalSubscriberId == null) { + globalSubscriberId = "" + } + execution.setVariable("DoCVNF_globalSubscriberId", globalSubscriberId) + utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled) + + String sdncVersion = execution.getVariable("sdncVersion") + if (sdncVersion == null) { + sdncVersion = "1702" + } + execution.setVariable("DoCVNF_sdncVersion", sdncVersion) + utils.log("DEBUG", "Incoming Sdnc Version is: " + sdncVersion, isDebugEnabled) + + //For Completion Handler & Fallout Handler + String requestInfo = """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> - <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>"""
-
- execution.setVariable("DoCVNF_requestInfo", requestInfo)
- //TODO: Orch Status - TBD, will come from SDN-C Response in 1702
- String orchStatus = "Created"
- execution.setVariable("DoCVNF_orchStatus", orchStatus)
-
- //TODO: Equipment Role - Should come from SDN-C Response in 1702
- String equipmentRole = " "
- execution.setVariable("DoCVNF_equipmentRole", equipmentRole)
- String vnfId = execution.getVariable("testVnfId") // for junits
- if(isBlank(vnfId)){
- vnfId = execution.getVariable("vnfId")
- if (isBlank(vnfId)) {
- vnfId = UUID.randomUUID().toString()
- utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
- }
- }
- execution.setVariable("DoCVNF_vnfId", vnfId)
-
- // Setting for Sub Flow Calls
- execution.setVariable("DoCVNF_type", "generic-vnf")
- execution.setVariable("GENGS_type", "service-instance")
-
- String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
- def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
- execution.setVariable("DoCVNF_sdncCallbackUrl", sdncCallbackUrl)
- utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
- logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugEnabled)
-
- def rollbackData = execution.getVariable("RollbackData")
- if (rollbackData == null) {
- rollbackData = new RollbackData()
- }
-
- execution.setVariable("RollbackData", rollbackData)
-
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", " Error Occured in DoCreateVnf PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
-
- }
- utils.log("DEBUG", "*** COMPLETED DoCreateVnf PreProcessRequest Process ***", isDebugEnabled)
- }
-
-
- public void prepareCreateGenericVnf (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " *** STARTED DoCreateVnf PrepareCreateGenericVnf Process *** ", isDebugEnabled)
- try {
- //Get Vnf Info
- String vnfId = execution.getVariable("DoCVNF_vnfId")
- def vnfName = execution.getVariable("DoCVNF_vnfName")
- def vnfType = execution.getVariable("DoCVNF_vnfType")
- def serviceId = execution.getVariable("DoCVNF_serviceId")
- def orchStatus = execution.getVariable("DoCVNF_orchStatus")
- def modelInvariantId = execution.getVariable("DoCVNF_modelInvariantId")
- def modelVersion = execution.getVariable("DoCVNF_modelVersion")
- def modelCustomizationId = execution.getVariable("DoCVNF_modelCustomizationId")
- // TODO: 1702 Variable
- def equipmentRole = execution.getVariable("DoCVNF_equipmentRole")
-
- //Get Service Instance Info
- def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
- String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
-
- int custStart = siRelatedLink.indexOf("customer/")
- int custEnd = siRelatedLink.indexOf("/service-subscriptions")
- String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
-
- //Get Namespace
- AaiUtil aaiUtil = new AaiUtil(this)
- def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
- String namespace = aaiUtil.getNamespaceFromUri(aai_uri)
-
- String payload =
- """<generic-vnf xmlns="${namespace}">
- <vnf-id>${vnfId}</vnf-id>
- <vnf-name>${vnfName}</vnf-name>
- <service-id>${serviceId}</service-id>
- <vnf-type>${vnfType}</vnf-type>
- <prov-status>PREPROV</prov-status>
- <orchestration-status>${orchStatus}</orchestration-status>
- <persona-model-id>${modelInvariantId}</persona-model-id>
- <persona-model-version>${modelVersion}</persona-model-version>
- <persona-model-customization-id>${modelCustomizationId}</persona-model-customization-id>
- <relationship-list>
- <relationship>
- <related-to>service-instance</related-to>
- <related-link>${siRelatedLink}</related-link>
- <relationship-data>
- <relationship-key>customer.global-customer-id</relationship-key>
- <relationship-value>${globalCustId}</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>service-subscription.service-type</relationship-key>
- <relationship-value>${serviceType}</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>service-instance.service-instance-id</relationship-key>
- <relationship-value>${serviceInstanceId}</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </generic-vnf>"""
-
- execution.setVariable("DoCVNF_genericVnfPayload", payload)
-
- }catch(Exception ex) {
- utils.log("DEBUG", "Error Occured in DoCreateVnf PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PrepareCreateGenericVnf Process")
- }
- utils.log("DEBUG", "*** COMPLETED DoCreateVnf PrepareCreateGenericVnf Process ***", isDebugEnabled)
- }
-
- public void postProcessCreateGenericVnf (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " *** STARTED DoCreateVnf PostProcessCreateGenericVnf Process *** ", isDebugEnabled)
- try {
- //Get Vnf Info
- String vnfId = execution.getVariable("DoCVNF_vnfId")
- def rollbackData = execution.getVariable("RollbackData")
- rollbackData.put("VNF", "vnfId", vnfId)
- execution.setVariable("RollbackData", rollbackData)
- }catch(Exception ex) {
- utils.log("DEBUG", "Error Occured in DoCreateVnf PostProcessCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PostProcessCreateGenericVnf Process")
- }
- utils.log("DEBUG", "*** COMPLETED DoCreateVnf PostProcessCreateGenericVnf Process ***", isDebugEnabled)
- }
-
-
- public void preProcessSDNCAssignRequest(Execution execution){
- def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
- logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
- def vnfId = execution.getVariable("DoCVNF_vnfId")
- def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
- logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled)
- utils.logAudit("NEW VNF ID: " + vnfId)
-
- try{
- //Build SDNC Request
-
- String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign")
-
- assignSDNCRequest = utils.formatXml(assignSDNCRequest)
- execution.setVariable("DoCVNF_assignSDNCRequest", assignSDNCRequest)
- logDebug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest, isDebugLogEnabled)
- utils.logAudit("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing preProcessSDNCAssignRequest. Exception is:\n" + e, isDebugLogEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCAssignRequest Method:\n" + e.getMessage())
- }
- logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
- }
-
- public void preProcessSDNCActivateRequest(Execution execution) {
- def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- execution.setVariable("prefix", Prefix)
- logDebug(" ======== STARTED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
- try{
- String vnfId = execution.getVariable("DoCVNF_vnfId")
- String serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
-
- String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate")
-
- execution.setVariable("DoCVNF_activateSDNCRequest", activateSDNCRequest)
- logDebug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest, isDebugLogEnabled)
- utils.logAudit("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
-
- }catch(Exception e){
- log.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e, isDebugLogEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
- }
- logDebug("======== COMPLETED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
- }
-
- public String buildSDNCRequest(Execution execution, String svcInstId, String action){
-
- String uuid = execution.getVariable('testReqId') // for junits
- if(uuid==null){
+ <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") + if (vnfName == null) { + vnfName = "sdncGenerated" + utils.log("DEBUG", "Sending a dummy VNF name to AAI - the name will be generated by SDNC: " + vnfName, isDebugEnabled) + } + 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 modelVersionId = execution.getVariable("DoCVNF_modelVersionId") + 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(execution, 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> + <model-invariant-id>${modelInvariantId}</model-invariant-id> + <model-version-id>${modelVersionId}</model-version-id> + <model-customization-id>${modelCustomizationId}</model-customization-id> + <relationship-list> + <relationship> + <related-to>service-instance</related-to> + <related-link>${siRelatedLink}</related-link> + <relationship-data> + <relationship-key>customer.global-customer-id</relationship-key> + <relationship-value>${globalCustId}</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>service-subscription.service-type</relationship-key> + <relationship-value>${serviceType}</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>service-instance.service-instance-id</relationship-key> + <relationship-value>${serviceInstanceId}</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </generic-vnf>""" + + execution.setVariable("DoCVNF_genericVnfPayload", payload) + + }catch(Exception ex) { + utils.log("DEBUG", "Error Occured in DoCreateVnf PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PrepareCreateGenericVnf Process") + } + utils.log("DEBUG", "*** COMPLETED DoCreateVnf PrepareCreateGenericVnf Process ***", isDebugEnabled) + } + + public void postProcessCreateGenericVnf (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix",Prefix) + + utils.log("DEBUG", " *** STARTED DoCreateVnf PostProcessCreateGenericVnf Process *** ", isDebugEnabled) + try { + //Get Vnf Info + String vnfId = execution.getVariable("DoCVNF_vnfId") + def rollbackData = execution.getVariable("RollbackData") + rollbackData.put("VNF", "vnfId", vnfId) + execution.setVariable("RollbackData", rollbackData) + }catch(Exception ex) { + utils.log("DEBUG", "Error Occured in DoCreateVnf PostProcessCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PostProcessCreateGenericVnf Process") + } + utils.log("DEBUG", "*** COMPLETED DoCreateVnf PostProcessCreateGenericVnf Process ***", isDebugEnabled) + } + + + public void preProcessSDNCAssignRequest(Execution execution){ + def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled) + def vnfId = execution.getVariable("DoCVNF_vnfId") + def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId") + logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled) + utils.logAudit("NEW VNF ID: " + vnfId) + + try{ + //Build SDNC Request + + String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign") + + assignSDNCRequest = utils.formatXml(assignSDNCRequest) + execution.setVariable("DoCVNF_assignSDNCRequest", assignSDNCRequest) + logDebug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest, isDebugLogEnabled) + utils.logAudit("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest) + + }catch(Exception e){ + utils.log("ERROR", "Exception Occured Processing preProcessSDNCAssignRequest. Exception is:\n" + e, isDebugLogEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCAssignRequest Method:\n" + e.getMessage()) + } + logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled) + } + + public void preProcessSDNCActivateRequest(Execution execution) { + def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' + + 'execution=' + execution.getId() + + ')' + def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') + logDebug('Entered ' + method, isDebugLogEnabled) + execution.setVariable("prefix", Prefix) + logDebug(" ======== STARTED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled) + try{ + String vnfId = execution.getVariable("DoCVNF_vnfId") + String serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId") + + String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate") + + execution.setVariable("DoCVNF_activateSDNCRequest", activateSDNCRequest) + logDebug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest, isDebugLogEnabled) + utils.logAudit("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest) + + }catch(Exception e){ + log.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e, isDebugLogEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage()) + } + logDebug("======== COMPLETED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled) + } + + public String buildSDNCRequest(Execution execution, String svcInstId, String action){ + + String uuid = execution.getVariable('testReqId') // for junits + if(uuid==null){ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis() - }
- def callbackURL = execution.getVariable("DoCVNF_sdncCallbackUrl")
- def requestId = execution.getVariable("DoCVNF_requestId")
- def serviceId = execution.getVariable("DoCVNF_serviceId")
- def vnfType = execution.getVariable("DoCVNF_vnfType")
- def vnfName = execution.getVariable("DoCVNF_vnfName")
- def tenantId = execution.getVariable("DoCVNF_tenantId")
- def source = execution.getVariable("DoCVNF_source")
- def vnfId = execution.getVariable("DoCVNF_vnfId")
- def cloudSiteId = execution.getVariable("DoCVNF_cloudSiteId")
- def modelCustomizationId = execution.getVariable("DoCVNF_modelCustomizationId")
- def serviceModelInfo = execution.getVariable("serviceModelInfo")
- def vnfModelInfo = execution.getVariable("vnfModelInfo")
- String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo)
- String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo)
- def globalSubscriberId = execution.getVariable("DoCVNF_globalSubscriberId")
- def sdncVersion = execution.getVariable("DoCVNF_sdncVersion")
-
- String sdncVNFParamsXml = ""
-
- if(execution.getVariable("DoCVNF_vnfParamsExistFlag") == true){
- sdncVNFParamsXml = buildSDNCParamsXml(execution)
- }else{
- sdncVNFParamsXml = ""
- }
-
- String sdncRequest =
+ } + def callbackURL = execution.getVariable("DoCVNF_sdncCallbackUrl") + def requestId = execution.getVariable("DoCVNF_requestId") + def serviceId = execution.getVariable("DoCVNF_serviceId") + def vnfType = execution.getVariable("DoCVNF_vnfType") + def vnfName = execution.getVariable("DoCVNF_vnfName") + // Only send vnfName to SDNC if it is not null, otherwise it will get generated by SDNC on Assign + String vnfNameString = "" + if (vnfName != null) { + vnfNameString = """<vnf-name>${vnfName}</vnf-name>""" + } + def tenantId = execution.getVariable("DoCVNF_tenantId") + def source = execution.getVariable("DoCVNF_source") + def vnfId = execution.getVariable("DoCVNF_vnfId") + def cloudSiteId = execution.getVariable("DoCVNF_cloudSiteId") + def modelCustomizationId = execution.getVariable("DoCVNF_modelCustomizationId") + def serviceModelInfo = execution.getVariable("serviceModelInfo") + def vnfModelInfo = execution.getVariable("vnfModelInfo") + String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo) + String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo) + def globalSubscriberId = execution.getVariable("DoCVNF_globalSubscriberId") + def sdncVersion = execution.getVariable("DoCVNF_sdncVersion") + + String sdncVNFParamsXml = "" + + if(execution.getVariable("DoCVNF_vnfParamsExistFlag") == true){ + sdncVNFParamsXml = buildSDNCParamsXml(execution) + }else{ + sdncVNFParamsXml = "" + } + + String sdncRequest = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1" xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1"> - <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
- <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- <request-information>
- <request-id>${requestId}</request-id>
- <request-action>CreateVnfInstance</request-action>
- <source>${source}</source>
- <notification-url/>
- <order-number/>
- <order-version/>
- </request-information>
- <service-information>
- <service-id>${serviceId}</service-id>
- <subscription-service-type>${serviceId}</subscription-service-type>
- ${serviceEcompModelInformation}
- <service-instance-id>${svcInstId}</service-instance-id>
- <global-customer-id>${globalSubscriberId}</global-customer-id>
- </service-information>
- <vnf-information>
- <vnf-id>${vnfId}</vnf-id>
- <vnf-type>${vnfType}</vnf-type>
- ${vnfEcompModelInformation}
- </vnf-information>
- <vnf-request-input>
- <request-version>${sdncVersion}</request-version>
- <vnf-name></vnf-name>
- <tenant>${tenantId}</tenant>
- <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
- ${sdncVNFParamsXml}
- </vnf-request-input>
- </sdncadapterworkflow:SDNCRequestData>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
-
- utils.logAudit("sdncRequest: " + sdncRequest)
- return sdncRequest
- }
-
- public void validateSDNCResponse(Execution execution, String response, String method){
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
-
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
-
- utils.logAudit("workflowException: " + workflowException)
-
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
- sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
-
- utils.logAudit("SDNCResponse: " + response)
-
- String sdncResponse = response
- if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
- logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
-
- }else{
- logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
- logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
- }
-
-
-}
+ <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> + ${vnfNameString} + <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) + if(method.equals("get")){ + String topologyGetResponse = execution.getVariable("DoCVNF_getSDNCAdapterResponse") + String data = utils.getNodeXml(topologyGetResponse, "response-data") + data = data.replaceAll("<", "<") + data = data.replaceAll(">", ">") + utils.log("DEBUG", "topologyGetResponseData: " + data, isDebugLogEnabled) + String vnfName = utils.getNodeText1(data, "vnf-name") + utils.log("DEBUG", "vnfName received from SDNC: " + vnfName, isDebugLogEnabled) + execution.setVariable("vnfName", vnfName) + execution.setVariable("DoCVNF_vnfName", vnfName) + } + + }else{ + logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled) + throw new BpmnError("MSOWorkflowException") + } + logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled) + } + + public void preProcessSDNCGetRequest(Execution execution){ + def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + utils.log("DEBUG", " ======== STARTED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled) + try{ + def serviceInstanceId = execution.getVariable('DoCVNF_serviceInstanceId') + + String uuid = execution.getVariable('testReqId') // for junits + if(uuid==null){ + uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis() + } + + def callbackUrl = execution.getVariable("DoCVFM_sdncCallbackUrl") + utils.logAudit("callbackUrl:" + callbackUrl) + + def vnfId = execution.getVariable('DCVFM_vnfId') + + def svcInstId = "" + if (serviceInstanceId == null || serviceInstanceId.isEmpty()) { + svcInstId = vnfId + } + else { + svcInstId = serviceInstanceId + } + // serviceOperation will be retrieved from "object-path" element + // in SDNC Assign Response for VNF + String response = execution.getVariable("DoCVNF_assignSDNCAdapterResponse") + utils.logAudit("DoCVNF_assignSDNCAdapterResponse is: \n" + response) + + String serviceOperation = "" + + 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", "VNF with sdncVersion of 1707 or later - service operation: " + serviceOperation, isDebugLogEnabled) + + + //!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE + sleep(5000) + + String SDNCGetRequest = + """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1" + xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" + xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1"> + <sdncadapter:RequestHeader> + <sdncadapter:RequestId>${uuid}</sdncadapter:RequestId> + <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId> + <sdncadapter:SvcAction>query</sdncadapter:SvcAction> + <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation> + <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl> + <sdncadapter:MsoAction>vfmodule</sdncadapter:MsoAction> + </sdncadapter:RequestHeader> + <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData> + </sdncadapterworkflow:SDNCAdapterWorkflowRequest>""" + + utils.logAudit("SDNCGetRequest: \n" + SDNCGetRequest) + execution.setVariable("DoCVNF_getSDNCRequest", SDNCGetRequest) + utils.log("DEBUG", "Outgoing GetSDNCRequest is: \n" + SDNCGetRequest, isDebugLogEnabled) + + }catch(Exception e){ + utils.log("ERROR", "Exception Occurred Processing preProcessSDNCGetRequest. Exception is:\n" + e, isDebugLogEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage()) + } + utils.log("DEBUG", "======== COMPLETED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled) + } + + /** + * 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('DoCVNF_vnfId') + logDebug("VNF ID: " + vnfId, isDebugLogEnabled) + + String updateAAIGenericVnfRequest = """ + <UpdateAAIGenericVnfRequest> + <vnf-id>${vnfId}</vnf-id> + <orchestration-status>Active</orchestration-status> + </UpdateAAIGenericVnfRequest> + """ + updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest) + execution.setVariable('DoCVNF_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()) + } + } + + + + +} 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 861da52397..daae3d7dac 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,285 +1,369 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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)
- }
-
-
-
-}
+/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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 +import org.openecomp.mso.bpmn.core.decomposition.ModelInfo +import org.openecomp.mso.bpmn.core.decomposition.ModuleResource +import org.openecomp.mso.bpmn.core.decomposition.ServiceDecomposition +import org.openecomp.mso.bpmn.core.decomposition.VnfResource + + + +/** +* 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 + + ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + + String vnfModelInfo = execution.getVariable("vnfModelInfo") + + String requestId = execution.getVariable("msoRequestId") + execution.setVariable("requestId", requestId) + execution.setVariable("mso-request-id", requestId) + 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 lcpCloudRegionId = execution.getVariable("lcpCloudRegionId") + utils.log("DEBUG", "Incoming LCP Cloud Region Id is: " + lcpCloudRegionId) + + String tenantId = execution.getVariable("tenantId") + utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId) + + 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) + + sleep (20000) + + + }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 { + ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + // if serviceDecomposition is specified, get info from serviceDecomposition + if (serviceDecomposition != null) { + utils.log("DEBUG", "Getting Catalog DB data from ServiceDecomposition object: " + serviceDecomposition.toJsonString(), isDebugEnabled) + List<VnfResource> vnfs = serviceDecomposition.getServiceVnfs() + utils.log("DEBUG", "Read vnfs", isDebugEnabled) + if (vnfs == null) { + utils.log("DEBUG", "Error - vnfs are empty in serviceDecomposition object", isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf queryCatalogDB, vnfs are empty") + } + VnfResource vnf = vnfs[0] + utils.log("DEBUG", "Read vnfResource", isDebugEnabled) + if (vnf == null) { + utils.log("DEBUG", "Error - vnf is empty in serviceDecomposition object", isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf queryCatalogDB, vnf is null") + } + + List<ModuleResource> vfModules = vnf.getAllVfModuleObjects() + utils.log("DEBUG", "Read vfModules", isDebugEnabled) + if (vfModules == null) { + utils.log("DEBUG", "Error - vfModules are empty in serviceDecomposition object", isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf queryCatalogDB, vf modules are empty") + } + JSONArray addOnModules = new JSONArray() + + for (int i = 0; i < vfModules.size; i++) { + utils.log("DEBUG", "handling VF Module ", isDebugEnabled) + ModuleResource vfModule = vfModules[i] + boolean isBase = vfModule.getIsBase() + if (isBase) { + ModelInfo baseVfModuleModelInfoObject = vfModule.getModelInfo() + String baseVfModuleModelInfoWithRoot = baseVfModuleModelInfoObject.toString() + String baseVfModuleModelInfo = jsonUtil.getJsonValue(baseVfModuleModelInfoWithRoot, "modelInfo") + execution.setVariable("baseVfModuleModelInfo", baseVfModuleModelInfo) + String baseVfModuleLabel = vfModule.getVfModuleLabel() + execution.setVariable("baseVfModuleLabel", baseVfModuleLabel) + String basePersonaModelId = baseVfModuleModelInfoObject.getModelInvariantId() + execution.setVariable("basePersonaModelId", basePersonaModelId) + } + else { + addOnModules.put(vfModules[i]) + } + } + + execution.setVariable("addOnModules", addOnModules) + execution.setVariable("addOnModulesToDeploy", addOnModules.length()) + execution.setVariable("addOnModulesDeployed", 0) + + } + else { + //Get Vnf Info + String vnfModelInfo = execution.getVariable("vnfModelInfo") + utils.log("DEBUG", "vnfModelInfo: " + vnfModelInfo, isDebugEnabled) + String vnfModelCustomizationUuid = jsonUtil.getJsonValueForKey(vnfModelInfo, "modelCustomizationId") + if (vnfModelCustomizationUuid == null) { + vnfModelCustomizationUuid = jsonUtil.getJsonValueForKey(vnfModelInfo, "modelCustomizationUuid") + } + utils.log("DEBUG", "querying Catalog DB by vnfModelCustomizationUuid: " + vnfModelCustomizationUuid, isDebugEnabled) + 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.put(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) + // For JUnits + String requestId = execution.getVariable("requestId") + if (requestId.equals("testRequestId123")) { + execution.setVariable("vnfId", "skask") + } + + 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 addOnVfModuleModelInfoWithRoot = addOnVfModuleModelInfoObject.toString() + String addOnVfModuleModelInfo = jsonUtil.getJsonValue(addOnVfModuleModelInfoWithRoot, "modelInfo") + 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) + logDebug("addOnModulesDeployed: " + execution.getVariable("addOnModulesDeployed"), isDebugLogEnabled) + logDebug("addOnModulesToDeploy: " + execution.getVariable("addOnModulesToDeploy"), isDebugLogEnabled) + if (execution.getVariable("addOnModulesDeployed") < execution.getVariable("addOnModulesToDeploy")) { + logDebug("More add on modules to deploy", isDebugLogEnabled) + } + else { + logDebug("No more add on modules to deploy", isDebugLogEnabled) + } + + }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/DoDeleteNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy index 76a86ff516..2bf3e55301 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; @@ -239,7 +239,6 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { String networkInputs = execution.getVariable(Prefix + "networkInputs") String networkId = utils.getNodeText(networkInputs, "network-id") networkId = UriUtils.encode(networkId,"UTF-8") - String messageId = execution.getVariable(Prefix + "messageId") // Prepare AA&I url String aai_endpoint = execution.getVariable("URN_aai_endpoint") @@ -255,11 +254,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor { ExceptionUtil exceptionUtil = new ExceptionUtil() Boolean isVfRelationshipExist = false try { - RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId) - .addHeader("X-FromAppId", "MSO") - .addHeader("Content-Type", "application/xml") - .addHeader("Accept","application/xml"); - APIResponse response = client.get() + APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryAAIRequest) String returnCode = response.getStatusCode() execution.setVariable(Prefix + "aaiReturnCode", returnCode) @@ -520,15 +515,14 @@ 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") @@ -655,7 +649,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) @@ -996,12 +990,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/DoDeleteServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy index 6daec69b9d..32197c1bc2 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>""" + + sdncDelete = utils.formatXml(sdncDelete) + def sdncRequestId2 = UUID.randomUUID().toString() + String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<") + execution.setVariable("sdncDelete", sdncDelete) + execution.setVariable("sdncDeactivate", sdncDeactivate) + utils.log("DEBUG","sdncDeactivate:\n" + sdncDeactivate, isDebugEnabled) + utils.log("DEBUG","sdncDelete:\n" + sdncDelete, isDebugEnabled) + + } 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, String response, String method) { + + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + utils.log("DEBUG"," ***** postProcessSDNC " + method + " *****", isDebugEnabled) + String msg = "" + + try { + WorkflowException workflowException = execution.getVariable("WorkflowException") + boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator") + utils.log("DEBUG", "SDNCResponse: " + response, isDebugEnabled) + utils.log("DEBUG", "workflowException: " + workflowException, isDebugEnabled) + + 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 " + method + "response:\n" + response, isDebugEnabled) + + }else{ + msg = "Bad Response from SDNC Adapter for service-instance " + method + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 3500, msg) + } + } catch (BpmnError e) { + throw e; + } catch(Exception ex) { + msg = "Exception in postProcessSDNC " + method + " Exception:" + ex.getMessage() + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + utils.log("DEBUG"," *** Exit postProcessSDNC " + method + " ***", 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/DoDeleteVnfAndModules.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy index 92456b0216..208caa790d 100644 --- 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 @@ -1,256 +1,484 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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)
- }
-
-
-
-
-}
+/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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.SDNCAdapterUtils +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) + 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 DoDeleteVnfAndModules PreProcessRequest Process*** ", isDebugEnabled) + + try{ + // Get Variables + + String cloudConfiguration = execution.getVariable("cloudConfiguration") + + String requestId = execution.getVariable("msoRequestId") + execution.setVariable("requestId", 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("DDVAM_source", source) + utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled) + + String sdncVersion = execution.getVariable("sdncVersion") + if (sdncVersion == null) { + sdncVersion = "1702" + } + execution.setVariable("DDVAM_sdncVersion", sdncVersion) + utils.log("DEBUG", "Incoming Sdnc Version is: " + sdncVersion, isDebugEnabled) + + 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("sdncCallbackUrl", sdncCallbackUrl) + utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl) + logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugEnabled) + + if (!sdncVersion.equals("1702")) { + //String vnfModelInfo = execution.getVariable("vnfModelInfo") + //String serviceModelInfo = execution.getVariable("serviceModelInfo") + + String serviceId = execution.getVariable("productFamilyId") + execution.setVariable("DDVAM_serviceId", serviceId) + utils.log("DEBUG", "Incoming Service Id is: " + serviceId, isDebugEnabled) + + + //String modelInvariantId = jsonUtil.getJsonValue(vnfModelInfo, "modelInvariantId") + //execution.setVariable("DDVAM_modelInvariantId", modelInvariantId) + //utils.log("DEBUG", "Incoming Invariant Id is: " + modelInvariantId, isDebugEnabled) + + //String modelVersionId = jsonUtil.getJsonValue(vnfModelInfo, "modelVersionId") + //if (modelVersionId == null) { + // modelVersionId = "" + //} + //execution.setVariable("DDVAM_modelVersionId", modelVersionId) + //utils.log("DEBUG", "Incoming Version Id is: " + modelVersionId, isDebugEnabled) + + //String modelVersion = jsonUtil.getJsonValue(vnfModelInfo, "modelVersion") + //execution.setVariable("DDVAM_modelVersion", modelVersion) + //utils.log("DEBUG", "Incoming Model Version is: " + modelVersion, isDebugEnabled) + + //String modelName = jsonUtil.getJsonValue(vnfModelInfo, "modelName") + //execution.setVariable("DDVAM_modelName", modelName) + //utils.log("DEBUG", "Incoming Model Name is: " + modelName, isDebugEnabled) + + //String modelCustomizationId = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationId") + //if (modelCustomizationId == null) { + // modelCustomizationId = "" + //} + //execution.setVariable("DDVAM_modelCustomizationId", modelCustomizationId) + //utils.log("DEBUG", "Incoming Model Customization Id is: " + modelCustomizationId, isDebugEnabled) + + String cloudSiteId = execution.getVariable("lcpCloudRegionId") + execution.setVariable("DDVAM_cloudSiteId", cloudSiteId) + utils.log("DEBUG", "Incoming Cloud Site Id is: " + cloudSiteId, isDebugEnabled) + + String tenantId = execution.getVariable("tenantId") + execution.setVariable("DDVAM_tenantId", tenantId) + utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId, isDebugEnabled) + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + if (globalSubscriberId == null) { + globalSubscriberId = "" + } + execution.setVariable("DDVAM_globalSubscriberId", globalSubscriberId) + utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, 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('vnfId') + + 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>[] + def vfModulesList = new ArrayList<Map<String,String>>() + def vfModules = null + def vfModuleBaseEntry = null + if (response.getStatusCode() == 200) { + // Parse the VNF record from A&AI to find base module info + logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled) + if (responseData != null) { + def vfModulesText = utils.getNodeXml(responseData, "vf-modules") + logDebug("vModulesText: " + vfModulesText, isDebugLogEnabled) + if (vfModulesText != null && !vfModulesText.trim().isEmpty()) { + def xmlVfModules= new XmlSlurper().parseText(vfModulesText) + vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"} + execution.setVariable("DDVAM_moduleCount", vfModules.size()) + int vfModulesSize = 0 + 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", vfModuleId) + def vfModuleName = utils.getNodeText1(vfModuleXml, "vf-module-name") + vfModuleEntry.put("vfModuleName", vfModuleName) + + def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module") + // Save base vf module for last + if (isBaseVfModule == "true") { + vfModuleBaseEntry = vfModuleEntry + } + else { + vfModulesList.add(vfModuleEntry) + } + } + if (vfModuleBaseEntry != null) { + vfModulesList.add(vfModuleBaseEntry) + } + } + + } + } + execution.setVariable("DDVAM_vfModules", vfModulesList) + } catch (Exception ex) { + ex.printStackTrace() + 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 prepareNextModuleToDelete Method:\n" + e.getMessage()) + } + logDebug("======== COMPLETED prepareNextModuleToDelete ======== ", isDebugLogEnabled) + } + + public void preProcessSDNCDeactivateRequest(Execution execution){ + def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled") + execution.setVariable("prefix", Prefix) + logDebug(" ======== STARTED preProcessSDNCDeactivateRequest ======== ", isDebugLogEnabled) + def vnfId = execution.getVariable("vnfId") + def serviceInstanceId = execution.getVariable("serviceInstanceId") + + try{ + //Build SDNC Request + + String deactivateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "deactivate") + + deactivateSDNCRequest = utils.formatXml(deactivateSDNCRequest) + execution.setVariable("DDVAM_deactivateSDNCRequest", deactivateSDNCRequest) + logDebug("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest, isDebugLogEnabled) + utils.logAudit("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest) + + }catch(Exception e){ + utils.log("ERROR", "Exception Occured Processing preProcessSDNCDeactivateRequest. Exception is:\n" + e, isDebugLogEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage()) + } + logDebug("======== COMPLETED preProcessSDNCDeactivateRequest ======== ", isDebugLogEnabled) + } + + public void preProcessSDNCUnassignRequest(Execution execution) { + def method = getClass().getSimpleName() + '.preProcessSDNCUnassignRequest(' + + 'execution=' + execution.getId() + + ')' + def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') + logDebug('Entered ' + method, isDebugLogEnabled) + execution.setVariable("prefix", Prefix) + logDebug(" ======== STARTED preProcessSDNCUnassignRequest Process ======== ", isDebugLogEnabled) + try{ + String vnfId = execution.getVariable("vnfId") + String serviceInstanceId = execution.getVariable("serviceInstanceId") + + String unassignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "unassign") + + execution.setVariable("DDVAM_unassignSDNCRequest", unassignSDNCRequest) + logDebug("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest, isDebugLogEnabled) + utils.logAudit("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest) + + }catch(Exception e){ + log.debug("Exception Occured Processing preProcessSDNCUnassignRequest. Exception is:\n" + e, isDebugLogEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCUnassignRequest Method:\n" + e.getMessage()) + } + logDebug("======== COMPLETED preProcessSDNCUnassignRequest 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("sdncCallbackUrl") + def requestId = execution.getVariable("msoRequestId") + def serviceId = execution.getVariable("DDVAM_serviceId") + def tenantId = execution.getVariable("DDVAM_tenantId") + def source = execution.getVariable("DDVAM_source") + def vnfId = execution.getVariable("vnfId") + def serviceInstanceId = execution.getVariable("serviceInstanceId") + def cloudSiteId = execution.getVariable("DDVAM_cloudSiteId") + def modelCustomizationId = execution.getVariable("DDVAM_modelCustomizationId") + //def serviceModelInfo = execution.getVariable("serviceModelInfo") + //def vnfModelInfo = execution.getVariable("vnfModelInfo") + //String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo) + //String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo) + def globalSubscriberId = execution.getVariable("DDVAM_globalSubscriberId") + def sdncVersion = execution.getVariable("DDVAM_sdncVersion") + + String sdncRequest = + """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.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>DeleteVnfInstance</request-action> + <source>${source}</source> + <notification-url/> + <order-number/> + <order-version/> + </request-information> + <service-information> + <service-id/> + <subscription-service-type/> + <service-instance-id>${serviceInstanceId}</service-instance-id> + <global-customer-id/> + </service-information> + <vnf-information> + <vnf-id>${vnfId}</vnf-id> + <vnf-type/> + </vnf-information> + <vnf-request-input> + <vnf-name/> + <tenant>${tenantId}</tenant> + <aic-cloud-region>${cloudSiteId}</aic-cloud-region> + </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/DoUpdateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy index dd35334ddf..5bd9f96bc6 100644 --- 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 @@ -365,7 +365,6 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { 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") @@ -433,7 +432,6 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { 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") @@ -509,7 +507,6 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { 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) @@ -609,7 +606,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { // reset return code to success execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200") String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) String aaiStubResponse = """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> <vpn-binding xmlns="${schemaVersion}"> @@ -643,7 +640,6 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { 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) @@ -746,7 +742,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { // reset return code to success execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200") String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) String aaiStubResponse = """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> <network-policy xmlns="${schemaVersion}"> @@ -780,7 +776,6 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { 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) @@ -883,7 +878,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { // reset return code to success execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200") String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) String aaiStubResponse = """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> <route-table-references xmlns="${schemaVersion}"> @@ -922,7 +917,6 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { 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") @@ -935,7 +929,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { utils.log("DEBUG", " UPDNETI_updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled) //Prepare payload (PUT) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) + String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri) String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, updateNetworkResponse, schemaVersion) String payloadXml = utils.formatXml(payload) utils.logAudit(payloadXml) @@ -973,7 +967,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { // aai all errors String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode utils.log("DEBUG", errorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage) + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage) } } } 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 5999857608..f07bb0df49 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,919 +1,921 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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())
- }
- }
-
-
-}
+/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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() + + /** + * 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) + + Map<String,String> vfModuleInputParams = execution.getVariable("vfModuleInputParams") + if (vfModuleInputParams != null) { + execution.setVariable("DOUPVfMod_vnfParamsMap", vfModuleInputParams) + } + } + 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 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) + } + + Map<String, String> vnfParamsMap = execution.getVariable("DOUPVfMod_vnfParamsMap") + + String sdncGetResponse = execution.getVariable('DOUPVfMod_sdncTopologyResponse') + + String vfModuleParams = buildVfModuleParams(vnfParamsMap, 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 = '<model-invariant-id>' + personaModelId + '</model-invariant-id>' + def personaModelVersionElement = '<model-version-id>' + personaModelVersion + '</model-version-id>' + + 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 = '<model-invariant-id>' + personaModelId + '</model-invariant-id>' + } + def personaModelVersionElement = '' + def personaModelVersion = utils.getNodeText1(vnfInputs, 'persona-model-version') + if (personaModelVersion != null) { + personaModelVersionElement = '<model-version-id>' + personaModelVersion + '</model-version-id>' + } + 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> + """ + + logDebug('Unformatted updateAAIVfModuleRequest: ' + updateAAIVfModuleRequest, isDebugLogEnabled) + 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/UpdateNetworkInstanceInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy deleted file mode 100644 index 5f0f65bd85..0000000000 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy +++ /dev/null @@ -1,1639 +0,0 @@ -/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */ -
-package org.openecomp.mso.bpmn.infrastructure.scripts;
- -import groovy.xml.XmlUtil -import groovy.json.* - -import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
-import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
-import org.openecomp.mso.bpmn.common.scripts.NetworkUtils;
-import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
-import org.openecomp.mso.bpmn.common.scripts.VidUtils;
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.json.JsonUtils;
-import org.openecomp.mso.rest.APIResponse
- -import java.util.UUID; - -import org.camunda.bpm.engine.delegate.BpmnError -import org.camunda.bpm.engine.runtime.Execution -import org.apache.commons.lang3.* -import org.apache.commons.codec.binary.Base64; -import org.springframework.web.util.UriUtils - -/** - * This groovy class supports the <class>UpdateNetworkInstanceInfra.bpmn</class> process. - */ -public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor { - String Prefix="UPDNETI_" - ExceptionUtil exceptionUtil = new ExceptionUtil() - JsonUtils jsonUtil = new JsonUtils() - VidUtils vidUtils = new VidUtils(this) - NetworkUtils networkUtils = new NetworkUtils() - SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() - - /** - * This method is executed during the preProcessRequest task of the <class>UpdateNetworkInstanceInfra.bpmn</class> process. - * @param execution - */ - public InitializeProcessVariables(Execution execution){ - /* Initialize all the process variables in this block */ - - execution.setVariable("UPDNETI_messageId", "") - execution.setVariable("BasicAuthHeaderValuePO", "") - execution.setVariable("BasicAuthHeaderValueSDNC", "") - execution.setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", "") - execution.setVariable("UPDNETI_networkRequest", "") - execution.setVariable("UPDNETI_networkInputs", "") - execution.setVariable("UPDNETI_networkOutputs", "") - execution.setVariable("UPDNETI_requestId", "") - execution.setVariable("UPDNETI_source", "") - execution.setVariable("UPDNETI_networkId", "") - - execution.setVariable("UPDNETI_CompleteMsoProcessRequest", "") - execution.setVariable("UPDNETI_FalloutHandlerRequest", "") - execution.setVariable("UPDNETI_isSilentSuccess", false) - execution.setVariable("UPDNETI_isPONR", false) // Point-of-no-return, means, rollback is not needed - - // AAI query Cloud Region - execution.setVariable("UPDNETI_queryCloudRegionRequest","") - execution.setVariable("UPDNETI_queryCloudRegionReturnCode","") - execution.setVariable("UPDNETI_queryCloudRegionResponse","") - execution.setVariable("UPDNETI_cloudRegionPo","") - execution.setVariable("UPDNETI_cloudRegionSdnc","") - execution.setVariable("UPDNETI_isCloudRegionGood", false) - - // AAI query Id - execution.setVariable("UPDNETI_queryIdAAIRequest","") - execution.setVariable("UPDNETI_queryIdAAIResponse", "") - execution.setVariable("UPDNETI_aaiIdReturnCode", "") - - // AAI query vpn binding - execution.setVariable("UPDNETI_queryVpnBindingAAIRequest","") - execution.setVariable("UPDNETI_queryVpnBindingAAIResponse", "") - execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "") - execution.setVariable("UPDNETI_vpnBindings", null) - execution.setVariable("UPDNETI_vpnCount", 0) - execution.setVariable("UPDNETI_routeCollection", "") - - // AAI query network policy - execution.setVariable("UPDNETI_queryNetworkPolicyAAIRequest","") - execution.setVariable("UPDNETI_queryNetworkPolicyAAIResponse", "") - execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "") - execution.setVariable("UPDNETI_networkPolicyUriList", null) - execution.setVariable("UPDNETI_networkPolicyCount", 0) - execution.setVariable("UPDNETI_networkCollection", "") - - // AAI query route table reference - execution.setVariable("UPDNETI_queryNetworkTableRefAAIRequest","") - execution.setVariable("UPDNETI_queryNetworkTableRefAAIResponse", "") - execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "") - execution.setVariable("UPDNETI_networkTableRefUriList", null) - execution.setVariable("UPDNETI_networkTableRefCount", 0) - execution.setVariable("UPDNETI_tableRefCollection", "") - - // AAI requery Id - execution.setVariable("UPDNETI_requeryIdAAIRequest","") - execution.setVariable("UPDNETI_requeryIdAAIResponse", "") - execution.setVariable("UPDNETI_aaiRequeryIdReturnCode", "") - - // AAI update contrail - execution.setVariable("UPDNETI_updateContrailAAIUrlRequest","") - execution.setVariable("UPDNETI_updateContrailAAIPayloadRequest","") - execution.setVariable("UPDNETI_updateContrailAAIResponse", "") - execution.setVariable("UPDNETI_aaiUpdateContrailReturnCode", "") - - execution.setVariable("UPDNETI_updateNetworkRequest", "") - execution.setVariable("UPDNETI_updateNetworkResponse", "") - execution.setVariable("UPDNETI_rollbackNetworkRequest", "") - execution.setVariable("UPDNETI_rollbackNetworkResponse", "") - execution.setVariable("UPDNETI_networkReturnCode", "") - execution.setVariable("UPDNETI_rollbackNetworkReturnCode", "") - execution.setVariable("UPDNETI_isNetworkRollbackNeeded", false) - - execution.setVariable("UPDNETI_changeAssignSDNCRequest", "") - execution.setVariable("UPDNETI_changeAssignSDNCResponse", "") - execution.setVariable("UPDNETI_rollbackSDNCRequest", "") - execution.setVariable("UPDNETI_rollbackSDNCResponse", "") - execution.setVariable("UPDNETI_sdncReturnCode", "") - execution.setVariable("UPDNETI_rollbackSDNCReturnCode", "") - execution.setVariable("UPDNETI_isSdncRollbackNeeded", false) - execution.setVariable("UPDNETI_sdncResponseSuccess", false) - - execution.setVariable("UPDNETI_updateDBRequest", "") - execution.setVariable("UPDNETI_updateDBResponse", "") - execution.setVariable("UPDNETI_dbReturnCode", "") - - execution.setVariable("UPDNETI_isVnfBindingPresent", false) - execution.setVariable("UPDNETI_Success", false) - execution.setVariable("UPDNETI_serviceInstanceId", "") - execution.setVariable("GENGS_type", "service-instance") // Setting for Generic Sub Flow use - - } - - // ************************************************** - // Pre or Prepare Request Section - // ************************************************** - /** - * This method is executed during the preProcessRequest task of the <class>UpdateNetworkInstanceInfra.bpmn</class> process. - * @param execution - */ - public void preProcessRequest (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix",Prefix) - - utils.log("DEBUG", " ***** Inside preProcessRequest UpdateNetworkInstanceInfra Request ***** ", isDebugEnabled) - - // initialize flow variables - InitializeProcessVariables(execution) - - // get Incoming request & validate json format - String updateNetworkJsonIncoming = execution.getVariable("bpmnRequest") - utils.logAudit(updateNetworkJsonIncoming) - try { - def prettyJson = JsonOutput.prettyPrint(updateNetworkJsonIncoming.toString()) - utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled) - - } catch (Exception ex) { - String dataErrorMessage = " Invalid json format Request - " + ex.getMessage() - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - } - - // PO Authorization Info / headers Authorization= - String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth") - utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled) - try { - def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey")) - execution.setVariable("BasicAuthHeaderValuePO",encodedString) - execution.setVariable("BasicAuthHeaderValueSDNC", encodedString) - - } catch (IOException ex) { - String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage() - utils.log("DEBUG", dataErrorMessage, , isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - } - - try { - // Catalog DB headers Authorization
- String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
- utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
-
- def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
- execution.setVariable("BasicAuthHeaderValueDB",encodedString)
- } catch (IOException ex) {
- String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
-
- try {
- - execution.setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", updateNetworkJsonIncoming) - - // recreate the xml network-request - String networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, updateNetworkJsonIncoming) - execution.setVariable("UPDNETI_networkRequest", networkRequest) - utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled) - - String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","") - execution.setVariable("UPDNETI_networkInputs", networkInputs) - utils.log("DEBUG", " networkInputs - " + '\n' + networkInputs, isDebugEnabled) - - String netId = utils.getNodeText1(networkRequest, "network-id") - String netName = utils.getNodeText1(networkRequest, "network-name") - String networkOutputs = - """<network-outputs> - <network-id>${netId}</network-id> - <network-name>${netName}</network-name> - </network-outputs>""" - execution.setVariable("UPDNETI_networkOutputs", networkOutputs) - utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled) - - String requestId = execution.getVariable("mso-request-id")
- if (requestId == null || requestId == "") { - requestId = execution.getVariable("requestId") - } - execution.setVariable("UPDNETI_requestId", requestId) - execution.setVariable("UPDNETI_source", utils.getNodeText1(networkRequest, "source")) - - // prepare messageId - String messageId = execution.getVariable("UPDNETI_messageId") // for testing - if (messageId == null || messageId == "") { - messageId = UUID.randomUUID() - utils.log("DEBUG", " UPDNETI_messageId, random generated: " + messageId, isDebugEnabled) - } else { - utils.log("DEBUG", " UPDNETI_messageId, pre-assigned: " + messageId, isDebugEnabled) - } - execution.setVariable("UPDNETI_messageId", messageId) - - // validate 'backout-on-failure' to override 'URN_mso_rollback' - boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest) - execution.setVariable("UPDNETI_rollbackEnabled", rollbackEnabled) - - String networkId = "" - if (utils.nodeExists(networkRequest, "network-id")) { - networkId = utils.getNodeText1(networkRequest, "network-id") - if (networkId == 'null' || networkId == "") { - sendSyncError(execution) - // missing value of networkId - String dataErrorMessage = "Variable 'network-id' value/element is missing." - utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } - } - - String lcpCloudRegion = "" - if (utils.nodeExists(networkRequest, "aic-cloud-region")) { - lcpCloudRegion = utils.getNodeText1(networkRequest, "aic-cloud-region") - if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) { - sendSyncError(execution) - String dataErrorMessage = "requestDetails has missing 'aic-cloud-region' value/element." - utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - } - } - - String serviceInstanceId = "" - if (utils.nodeExists(networkRequest, "service-instance-id")) { - serviceInstanceId = utils.getNodeText1(networkRequest, "service-instance-id") - if ((serviceInstanceId == 'null') || (lcpCloudRegion == "")) { - sendSyncError(execution) - String dataErrorMessage = "Variable 'serviceInstanceId' value/element is missing." - utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - } - } - - execution.setVariable("UPDNETI_serviceInstanceId", serviceInstanceId) - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex){ - sendSyncError(execution) - // caught exception - String exceptionMessage = "Exception Encountered in UpdateNetworkInstanceInfra, PreProcessRequest() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - } - - public void sendSyncResponse (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix",Prefix) - - utils.log("DEBUG", " ***** Inside sendSyncResponse of UpdateNetworkInstanceInfra ***** ", isDebugEnabled) - - try { - String serviceInstanceId = execution.getVariable("UPDNETI_serviceInstanceId") - String requestId = execution.getVariable("mso-request-id")
- - // RESTResponse (for API Handler (APIH) Reply Task) - String updateNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim() - - utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + updateNetworkRestRequest, isDebugEnabled) - sendWorkflowResponse(execution, 202, updateNetworkRestRequest) - - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. sendSyncResponse() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - } - - } - - public void callRESTQueryAAICloudRegion (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of UpdateNetworkInstanceInfra ***** " , isDebugEnabled) - - try { - String networkInputs = execution.getVariable("UPDNETI_networkInputs") - String cloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region") - cloudRegion = UriUtils.encode(cloudRegion,"UTF-8") - - // Prepare AA&I url - String aai_endpoint = execution.getVariable("URN_aai_endpoint") - AaiUtil aaiUtil = new AaiUtil(this) - String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution) - String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion - utils.logAudit(queryCloudRegionRequest) - execution.setVariable("UPDNETI_queryCloudRegionRequest", queryCloudRegionRequest) - utils.log("DEBUG", " UPDNETI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled) - - String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion) - String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion) - - if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) { - execution.setVariable("UPDNETI_cloudRegionPo", cloudRegionPo) - execution.setVariable("UPDNETI_cloudRegionSdnc", cloudRegionSdnc) - execution.setVariable("UPDNETI_isCloudRegionGood", true) - - } else { - String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable("UPDNETI_queryCloudRegionReturnCode") - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } - - utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("UPDNETI_isCloudRegionGood"), isDebugEnabled) - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - // try error - String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow - callRESTQueryAAICloudRegion() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void callRESTQueryAAINetworkId(Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkId of UpdateNetworkInstanceInfra ***** " , isDebugEnabled) - - try { - // get variables - String networkRequest = execution.getVariable("UPDNETI_networkRequest") - String networkId = utils.getNodeText1(networkRequest, "network-id") - networkId = UriUtils.encode(networkId,"UTF-8") - execution.setVariable("UPDNETI_networkId", networkId) - String messageId = execution.getVariable("UPDNETI_messageId") - - // Prepare AA&I url - String aai_endpoint = execution.getVariable("URN_aai_endpoint") - AaiUtil aaiUriUtil = new AaiUtil(this) - String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId - utils.logAudit(queryIdAAIRequest) - execution.setVariable("UPDNETI_queryIdAAIRequest", queryIdAAIRequest) - utils.log("DEBUG", " UPDNETI_queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled) - - APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryIdAAIRequest) - String returnCode = response.getStatusCode() - execution.setVariable("UPDNETI_aaiIdReturnCode", returnCode) - - utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled) - - String aaiResponseAsString = response.getResponseBodyAsString() - - if (returnCode=='200') { - utils.logAudit(aaiResponseAsString) - execution.setVariable("UPDNETI_queryIdAAIResponse", aaiResponseAsString) - utils.log("DEBUG", " QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled) - - } else { - if (returnCode=='404') { - String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)." - utils.log("DEBUG", " AAI Query Failed. " + dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } else { - if (aaiResponseAsString.contains("RESTFault")) { - WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) - execution.setVariable("WorkflowException", exceptionObject) - throw new BpmnError("MSOWorkflowException") - - } else { - // aai all errors - String dataErrorMessage = "Unexpected Response from QueryAAINetworkId - " + returnCode - utils.log("DEBUG", "Unexpected Response from QueryAAINetworkId - " + dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } - } - } - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTQueryAAINetworkId() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void callRESTReQueryAAINetworkId(Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside callRESTReQueryAAINetworkId of UpdateNetworkInstanceInfra ***** " , isDebugEnabled) - - try { - // get variables - String networkId = utils.getNodeText1(execution.getVariable("UPDNETI_changeAssignSDNCResponse"), "network-id") - networkId = UriUtils.encode(networkId,"UTF-8") - String messageId = execution.getVariable("UPDNETI_messageId") - - // Prepare AA&I url - String aai_endpoint = execution.getVariable("URN_aai_endpoint") - AaiUtil aaiUriUtil = new AaiUtil(this) - String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId - utils.logAudit(requeryIdAAIRequest) - execution.setVariable("UPDNETI_requeryIdAAIRequest", requeryIdAAIRequest) - utils.log("DEBUG", " UPDNETI_requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled) - - APIResponse response = aaiUriUtil.executeAAIGetCall(execution, requeryIdAAIRequest) - String returnCode = response.getStatusCode() - execution.setVariable("UPDNETI_aaiRequeryIdReturnCode", returnCode) - utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled) - - String aaiResponseAsString = response.getResponseBodyAsString() - - if (returnCode=='200') { - utils.logAudit(aaiResponseAsString) - execution.setVariable("UPDNETI_requeryIdAAIResponse", aaiResponseAsString) - utils.log("DEBUG", " ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled) - - String netId = utils.getNodeText1(aaiResponseAsString, "network-id") - String netName = utils.getNodeText1(aaiResponseAsString, "network-name") - String networkOutputs = - """<network-outputs> - <network-id>${netId}</network-id> - <network-name>${netName}</network-name> - </network-outputs>""" - execution.setVariable("UPDNETI_networkOutputs", networkOutputs) - utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled) - - } else { - if (returnCode=='404') { - String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)." - utils.log("DEBUG", " AAI ReQuery Failed. - " + dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } else { - if (aaiResponseAsString.contains("RESTFault")) { - WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) - execution.setVariable("WorkflowException", exceptionObject) - throw new BpmnError("MSOWorkflowException") - - } else { - // aai all errors - String dataErrorMessage = "Unexpected Response from ReQueryAAINetworkId - " + returnCode - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } - } - } - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTReQueryAAINetworkId() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void callRESTQueryAAINetworkVpnBinding(Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkVpnBinding of UpdateNetworkInstanceInfra ***** " , isDebugEnabled) - - try { - - // get variables - String messageId = execution.getVariable("UPDNETI_messageId") - String queryIdAAIResponse = execution.getVariable("UPDNETI_requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") - String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") - utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) - - // Check if Vnf Binding is present, then build a List of vnfBinding - List vpnBindingUri = networkUtils.getVnfBindingObject(relationship) - int vpnCount = vpnBindingUri.size() - execution.setVariable("UPDNETI_vpnCount", vpnCount) - utils.log("DEBUG", " UPDNETI_vpnCount - " + vpnCount, isDebugEnabled) - - String aai_endpoint = execution.getVariable("URN_aai_endpoint") - AaiUtil aaiUriUtil = new AaiUtil(this) - - if (vpnCount > 0) { - execution.setVariable("UPDNETI_vpnBindings", vpnBindingUri) - utils.log("DEBUG", " vpnBindingUri List - " + vpnBindingUri, isDebugEnabled) - - String routeTargets = "" - // AII loop call using list vpnBindings - for (i in 0..vpnBindingUri.size()-1) { - - int counting = i+1 - - // prepare url using vpnBinding - String queryVpnBindingAAIRequest = "" - String aai_uri = aaiUriUtil.getNetworkVpnBindingUri(execution) - - // Note: By default, the vpnBinding url is found in 'related-link' of the response, - // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping. - if (aai_uri == null || aai_uri == "") { - // using value of 'related-link' from response - if (vpnBindingUri[i].charAt(vpnBindingUri[i].length()-1) == '/') { - queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i].substring(0, vpnBindingUri[i].length()-1) - } else { - queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i] - } - - } else { - // using uri value in URN mapping - String vpnBindingId = vpnBindingUri[i].substring(vpnBindingUri[i].indexOf("/vpn-binding/")+13, vpnBindingUri[i].length()) - if (vpnBindingId.charAt(vpnBindingId.length()-1) == '/') { - vpnBindingId = vpnBindingId.substring(0, vpnBindingId.length()-1) - } - queryVpnBindingAAIRequest = "${aai_endpoint}${aai_uri}/" + vpnBindingId - } - - utils.logAudit(queryVpnBindingAAIRequest) - execution.setVariable("UPDNETI_queryVpnBindingAAIRequest", queryVpnBindingAAIRequest) - utils.log("DEBUG", " UPDNETI_queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled) - - APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryVpnBindingAAIRequest) - String returnCode = response.getStatusCode() - execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", returnCode) - utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled) - - String aaiResponseAsString = response.getResponseBodyAsString() - - if (returnCode=='200') { - utils.logAudit(aaiResponseAsString) - execution.setVariable("UPDNETI_queryVpnBindingAAIResponse", aaiResponseAsString) - utils.log("DEBUG", " AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled) - - String routeTarget = "" - if (utils.nodeExists(aaiResponseAsString, "global-route-target")) { - routeTarget = utils.getNodeText1(aaiResponseAsString, "global-route-target") - routeTargets += "<routeTargets>" + routeTarget + "</routeTargets>" + '\n' - } - - } else { - if (returnCode=='404') { - String dataErrorMessage = "Response Error from AAINetworkVpnBinding is 404 (Not Found)." - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } else { - if (aaiResponseAsString.contains("RESTFault")) { - WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) - execution.setVariable("WorkflowException", exceptionObject) - throw new BpmnError("MSOWorkflowException") - - } else { - // aai all errors - String dataErrorMessage = " Unexpected Response from AAINetworkVpnBinding - " + returnCode - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } - } - } - - } // end loop - - execution.setVariable("UPDNETI_routeCollection", routeTargets) - utils.log("DEBUG", " UPDNETI_routeCollection - " + '\n' + routeTargets, isDebugEnabled) - - } else { - // reset return code to success - execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200") - String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) - String aaiStubResponse = - """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> - <vpn-binding xmlns="${schemaVersion}"> - <global-route-target/> - </vpn-binding> - </rest:payload>""" - String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse) - execution.setVariable("UPDNETI_queryVpnBindingAAIResponse", aaiStubResponseAsXml) - execution.setVariable("UPDNETI_routeCollection", "<routeTargets/>") - utils.log("DEBUG", " No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled) - - } - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void callRESTQueryAAINetworkPolicy(Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkPolicy of UpdateNetworkInstanceInfra ***** " , isDebugEnabled) - - try { - // get variables - String messageId = execution.getVariable("UPDNETI_messageId") - String queryIdAAIResponse = execution.getVariable("UPDNETI_requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") - String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") - utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) - - // Check if Network Policy is present, then build a List of network policy - List networkPolicyUriList = networkUtils.getNetworkPolicyObject(relationship) - int networkPolicyCount = networkPolicyUriList.size() - execution.setVariable("UPDNETI_networkPolicyCount", networkPolicyCount) - utils.log("DEBUG", " UPDNETI_networkPolicyCount - " + networkPolicyCount, isDebugEnabled) - - String aai_endpoint = execution.getVariable("URN_aai_endpoint") - AaiUtil aaiUriUtil = new AaiUtil(this) - - if (networkPolicyCount > 0) { - execution.setVariable("UPDNETI_networkPolicyUriList", networkPolicyUriList) - utils.log("DEBUG", " networkPolicyUri List - " + networkPolicyUriList, isDebugEnabled) - - String networkPolicies = "" - // AII loop call using list vpnBindings - for (i in 0..networkPolicyUriList.size()-1) { - - int counting = i+1 - - // prepare url using vpnBinding - String queryNetworkPolicyAAIRequest = "" - - String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution) - - // Note: By default, the network policy url is found in 'related-link' of the response, - // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping. - if (aai_uri == null || aai_uri == "") { - // using value of 'related-link' from response - if (networkPolicyUriList[i].charAt(networkPolicyUriList[i].length()-1) == '/') { - queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i].substring(0, networkPolicyUriList[i].length()-1) - } else { - queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i] - } - } else { - // using uri value in URN mapping - String networkPolicyId = networkPolicyUriList[i].substring(networkPolicyUriList[i].indexOf("/network-policy/")+16, networkPolicyUriList[i].length()) - println " networkPolicyId - " + networkPolicyId - if (networkPolicyId.charAt(networkPolicyId.length()-1) == '/') { - networkPolicyId = networkPolicyId.substring(0, networkPolicyId.length()-1) - } - queryNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + networkPolicyId - - } - - - utils.logAudit(queryNetworkPolicyAAIRequest) - execution.setVariable("UPDNETI_queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest) - utils.log("DEBUG", " UPDNETI_queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled) - - APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyAAIRequest) - String returnCode = response.getStatusCode() - execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", returnCode) - utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled) - - String aaiResponseAsString = response.getResponseBodyAsString() - - if (returnCode=='200') { - utils.logAudit(aaiResponseAsString) - execution.setVariable("UPDNETI_queryNetworkPolicyAAIResponse", aaiResponseAsString) - utils.log("DEBUG", " QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled) - - String networkPolicy = "" - if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) { - networkPolicy = utils.getNodeText1(aaiResponseAsString, "network-policy-fqdn") - networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n' - } - - } else { - if (returnCode=='404') { - String dataErrorMessage = "Response Error from QueryAAINetworkPolicy is 404 (Not Found)." - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } else { - if (aaiResponseAsString.contains("RESTFault")) { - WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) - execution.setVariable("WorkflowException", exceptionObject) - throw new BpmnError("MSOWorkflowException") - - } else { - // aai all errors - String dataErrorMessage = "Unexpected Response from QueryAAINetworkPolicy - " + returnCode - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } - } - } - - } // end loop - - execution.setVariable("UPDNETI_networkCollection", networkPolicies) - utils.log("DEBUG", " UPDNETI_networkCollection - " + '\n' + networkPolicies, isDebugEnabled) - - } else { - // reset return code to success - execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "200") - String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) - String aaiStubResponse = - """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> - <network-policy xmlns="${schemaVersion}"> - <network-policy-fqdn/> - </network-policy> - </rest:payload>""" - String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse) - execution.setVariable("UPDNETI_queryNetworkPolicyAAIResponse", aaiStubResponseAsXml) - execution.setVariable("UPDNETI_networkCollection", "<policyFqdns/>") - utils.log("DEBUG", " No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled) - - } - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void callRESTQueryAAINetworkTableRef(Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkTableRef of UpdateNetworkInstanceInfra ***** " , isDebugEnabled) - - try { - // get variables - String messageId = execution.getVariable("UPDNETI_messageId") - String queryIdAAIResponse = execution.getVariable("UPDNETI_requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "") - String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","") - utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled) - - // Check if Network TableREf is present, then build a List of network policy - List networkTableRefUriList = networkUtils.getNetworkTableRefObject(relationship) - int networkTableRefCount = networkTableRefUriList.size() - execution.setVariable("UPDNETI_networkTableRefCount", networkTableRefCount) - utils.log("DEBUG", " UPDNETI_networkTableRefCount - " + networkTableRefCount, isDebugEnabled) - - String aai_endpoint = execution.getVariable("URN_aai_endpoint") - AaiUtil aaiUriUtil = new AaiUtil(this) - - if (networkTableRefCount > 0) { - execution.setVariable("UPDNETI_networkTableRefUriList", networkTableRefUriList) - utils.log("DEBUG", " networkTableRefUri List - " + networkTableRefUriList, isDebugEnabled) - - // AII loop call using list vpnBindings - String networkTableRefs = "" - for (i in 0..networkTableRefUriList.size()-1) { - - int counting = i+1 - - // prepare url using tableRef - String queryNetworkTableRefAAIRequest = "" - - String aai_uri = aaiUriUtil.getNetworkTableReferencesUri(execution) - - // Note: By default, the network policy url is found in 'related-link' of the response, - // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping. - if (aai_uri == null || aai_uri == "") { - // using value of 'related-link' from response - if (networkTableRefUriList[i].charAt(networkTableRefUriList[i].length()-1) == '/') { - queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i].substring(0, networkTableRefUriList[i].length()-1) - } else { - queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i] - } - } else { - // using uri value in URN mapping - String networkTableRefId = networkTableRefUriList[i].substring(networkTableRefUriList[i].indexOf("/route-table-reference/")+23, networkTableRefUriList[i].length()) - - if (networkTableRefId.charAt(networkTableRefId.length()-1) == '/') { - networkTableRefId = networkTableRefId.substring(0, networkTableRefId.length()-1) - } - queryNetworkTableRefAAIRequest = "${aai_endpoint}${aai_uri}/" + networkTableRefId - - } - - - utils.logAudit(queryNetworkTableRefAAIRequest) - execution.setVariable("UPDNETI_queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest) - utils.log("DEBUG", " UPDNETI_queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled) - - APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkTableRefAAIRequest) - String returnCode = response.getStatusCode() - execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", returnCode) - utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled) - - String aaiResponseAsString = response.getResponseBodyAsString() - - if (returnCode=='200') { - utils.logAudit(aaiResponseAsString) - execution.setVariable("UPDNETI_queryNetworkTableRefAAIResponse", aaiResponseAsString) - utils.log("DEBUG", " QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled) - - String networkTableRef = "" - if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) { - networkTableRef = utils.getNodeText1(aaiResponseAsString, "route-table-reference-fqdn") - networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n' - } - - } else { - if (returnCode=='404') { - String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)." - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } else { - if (aaiResponseAsString.contains("RESTFault")) { - WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution) - execution.setVariable("WorkflowException", exceptionObject) - throw new BpmnError("MSOWorkflowException") - - } else { - // aai all errors - String dataErrorMessage = "Unexpected Response from QueryAAINetworkTableRef - " + returnCode - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } - } - } - - } // end loop - - execution.setVariable("UPDNETI_tableRefCollection", networkTableRefs) - utils.log("DEBUG", " UPDNETI_tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled) - - } else { - // reset return code to success - execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "200") - String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) - String aaiStubResponse = - """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"> - <route-table-references xmlns="${schemaVersion}"> - <route-table-reference-fqdn/> - </route-table-references> - </rest:payload>""" - String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse) - execution.setVariable("UPDNETI_queryNetworkTableRefAAIResponse", aaiStubResponseAsXml) - execution.setVariable("UPDNETI_tableRefCollection", "<routeTableFqdns/>") - utils.log("DEBUG", " No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled) - - } - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void callRESTUpdateContrailAAINetwork(Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside callRESTUpdateContrailAAINetwork of UpdateNetworkInstanceInfra ***** " , isDebugEnabled) - - try { - // get variables - String networkId = utils.getNodeText1(execution.getVariable("UPDNETI_changeAssignSDNCResponse"), "network-id") - networkId = UriUtils.encode(networkId,"UTF-8") - String requeryIdAAIResponse = execution.getVariable("UPDNETI_requeryIdAAIResponse") - String updateNetworkResponse = execution.getVariable("UPDNETI_updateNetworkResponse") - String messageId = execution.getVariable("UPDNETI_messageId") - - // Prepare url - String aai_endpoint = execution.getVariable("URN_aai_endpoint") - AaiUtil aaiUriUtil = new AaiUtil(this) - String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution) - String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId - - utils.logAudit(updateContrailAAIUrlRequest) - execution.setVariable("UPDNETI_updateContrailAAIUrlRequest", updateContrailAAIUrlRequest) - utils.log("DEBUG", " UPDNETI_updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled) - - //Prepare payload (PUT) - String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri) - String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, updateNetworkResponse, schemaVersion) - String payloadXml = utils.formatXml(payload) - utils.logAudit(payloadXml) - execution.setVariable("UPDNETI_updateContrailAAIPayloadRequest", payloadXml) - utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled) - - APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payload) - String returnCode = response.getStatusCode() - execution.setVariable("UPDNETI_aaiUpdateContrailReturnCode", returnCode) - - utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled) - - String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString() - - if (returnCode=='200') { - utils.logAudit(aaiUpdateContrailResponseAsString) - execution.setVariable("UPDNETI_updateContrailAAIResponse", aaiUpdateContrailResponseAsString) - utils.log("DEBUG", " AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString, isDebugEnabled) - // Point-of-no-return is set to false, rollback not needed. - execution.setVariable("UPDNETI_isPONR", true) - - } else { - if (returnCode=='404') { - String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)." - utils.log("DEBUG", dataErrorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } else { - if (aaiUpdateContrailResponseAsString.contains("RESTFault")) { - WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiUpdateContrailResponseAsString, execution) - execution.setVariable("WorkflowException", exceptionObject) - throw new BpmnError("MSOWorkflowException") - - } else { - // aai all errors - String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode - utils.log("DEBUG", errorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage) - } - } - } - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void prepareUpdateNetworkRequest (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside prepareUpdateNetworkRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled) - - try { - - // get variables - String requestId = execution.getVariable("UPDNETI_requestId") - String messageId = execution.getVariable("UPDNETI_messageId") - String source = execution.getVariable("UPDNETI_source") - - String requestInput = execution.getVariable("UPDNETI_networkRequest") - String queryIdResponse = execution.getVariable("UPDNETI_requeryIdAAIResponse") - String cloudRegionId = execution.getVariable("UPDNETI_cloudRegionPo") - String backoutOnFailure = execution.getVariable("UPDNETI_rollbackEnabled") - - // Prepare Network request - String routeCollection = execution.getVariable("UPDNETI_routeCollection") - String policyCollection = execution.getVariable("UPDNETI_networkCollection") - String tableCollection = execution.getVariable("UPDNETI_tableRefCollection") - String updateNetworkRequest = networkUtils.UpdateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyCollection, tableCollection, cloudRegionId, backoutOnFailure, source ) - // Format Response - String buildUpdateNetworkRequestAsString = utils.formatXml(updateNetworkRequest) - buildUpdateNetworkRequestAsString = buildUpdateNetworkRequestAsString.replace(":w1aac13n0", "").replace("w1aac13n0:", "") - utils.logAudit(buildUpdateNetworkRequestAsString) - - execution.setVariable("UPDNETI_updateNetworkRequest", buildUpdateNetworkRequestAsString) - utils.log("DEBUG", " UPDNETI_updateNetworkRequest - " + "\n" + buildUpdateNetworkRequestAsString, isDebugEnabled) - - } catch (Exception ex) { - String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareUpdateNetworkRequest() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void prepareSDNCRequest (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside prepareSDNCRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled) - - try { - // get variables - String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback") - String updateNetworkInput = execution.getVariable("UPDNETI_networkRequest") - String cloudRegionId = execution.getVariable("UPDNETI_cloudRegionSdnc") - - String networkId = "" - if (utils.nodeExists(updateNetworkInput, "network-id")) { - networkId = utils.getNodeText1(updateNetworkInput, "network-id") - } - if (networkId == null) {networkId = ""} - - String serviceInstanceId = utils.getNodeText1(updateNetworkInput, "service-instance-id") - - // 1. prepare assign topology via SDNC Adapter SUBFLOW call - String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "changeassign", "NetworkActivateRequest", cloudRegionId, networkId, null, null) - - String sndcTopologyUpdateRequesAsString = utils.formatXml(sndcTopologyCreateRequest) - utils.logAudit(sndcTopologyUpdateRequesAsString) - execution.setVariable("UPDNETI_changeAssignSDNCRequest", sndcTopologyUpdateRequesAsString) - utils.log("DEBUG", " UPDNETI_changeAssignSDNCRequest - " + "\n" + sndcTopologyUpdateRequesAsString, isDebugEnabled) - - - } catch (Exception ex) { - String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareSDNCRequest() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void prepareDBRequest (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - try { - // 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") - String networkName = "" - try { - networkName = utils.getNodeText1(networkOutputs, "network-name") - if (networkName == null) {networkName = ""} - } catch (Exception ex) { - networkName = "" - utils.log("DEBUG", " No 'network-name' found in '<network-outputs>' ! ", isDebugEnabled) - } - String networkId = "" - try { - networkId = utils.getNodeText1(networkOutputs, "network-id") - if (networkId == null) {networkId = ""} - } catch (Exception) { - networkId = "" - utils.log("DEBUG", " No 'network-id' found in '<network-outputs>' ! ", isDebugEnabled) - } - String requestId = execution.getVariable("UPDNETI_requestId") - - String statusMessage = "Network successfully updated." - - String dbRequest = - """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> - <soapenv:Header/> - <soapenv:Body> - <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
- <requestId>${requestId}</requestId> - <lastModifiedBy>BPMN</lastModifiedBy> - <statusMessage>${statusMessage}</statusMessage> - <responseBody></responseBody> - <requestStatus>COMPLETED</requestStatus> - <progress>100</progress> - <vnfOutputs><network-id>${networkId}</network-id><network-name>${networkName}</network-names></vnfOutputs> - <networkId>${networkId}</networkId> - </ns:updateInfraRequest> - </soapenv:Body> - </soapenv:Envelope>""" - - String buildDeleteDBRequestAsString = utils.formatXml(dbRequest) - execution.setVariable("UPDNETI_updateDBRequest", buildDeleteDBRequestAsString) - utils.log("DEBUG", " DB Adapter Request - " + "\n" + buildDeleteDBRequestAsString, isDebugEnabled) - utils.logAudit(buildDeleteDBRequestAsString) - - } catch (Exception ex) { - String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareDBRequest() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void prepareDBRequestError (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - try { - // 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 = "" - WorkflowException wfe = null - if (execution.getVariable("WorkflowException") instanceof WorkflowException) { - wfe = execution.getVariable("WorkflowException") - statusMessage = wfe.getErrorMessage() - } else { - String workflowException = execution.getVariable("WorkflowException") - try { - statusMessage = utils.getNodeText1(workflowException, "ErrorMessage") - } catch (Exception ex) { - statusMessage = "Encountered Error during DB Update. " + ex.getMessage() - } - } - String networkOutputs = execution.getVariable("UPDNETI_networkOutputs") - String requestId = execution.getVariable("UPDNETI_requestId") - String networkId = "" - try { - networkId = utils.getNodeText1(networkOutputs, "network-id") - if (networkId == null) {networkId = ""} - } catch (Exception) { - networkId = "" - utils.log("DEBUG", " No 'network-id' found in '<network-outputs>' ! ", isDebugEnabled) - } - String networkName = "" - try { - networkName = utils.getNodeText1(networkOutputs, "network-name") - if (networkName == null) {networkName = ""} - } catch (Exception ex) { - networkName = "" - utils.log("DEBUG", " No 'network-name' found in '<network-outputs>' ! ", isDebugEnabled) - } - String dbRequest = - """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> - <soapenv:Header/> - <soapenv:Body> - <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
- <requestId>${requestId}</requestId> - <lastModifiedBy>BPMN</lastModifiedBy> - <statusMessage>${statusMessage}</statusMessage> - <responseBody></responseBody> - <requestStatus>FAILED</requestStatus> - <vnfOutputs><network-id>${networkId}</network-id><network-name>${networkName}</network-names></vnfOutputs> - </ns:updateInfraRequest> - </soapenv:Body> - </soapenv:Envelope>""" - - execution.setVariable("UPDNETI_updateDBRequest", dbRequest) - utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled) - utils.logAudit(dbRequest) - - } catch (Exception ex) { - String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareDBRequestError() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - - // ************************************************** - // Post or Validate Response Section - // ************************************************** - - public void validateUpdateNetworkResponse (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside validateUpdateNetworkResponse of UpdateNetworkInstanceInfra *****", isDebugEnabled) - - try { - String returnCode = execution.getVariable("UPDNETI_networkReturnCode") - String networkResponse = execution.getVariable("UPDNETI_updateNetworkResponse") - if (networkResponse==null) { - networkResponse="" // reset - } - - utils.log("DEBUG", " Network Adapter update responseCode: " + returnCode, isDebugEnabled) - - String errorMessage = "" - if (returnCode == "200") { - execution.setVariable("UPDNETI_isNetworkRollbackNeeded", true) - utils.logAudit(networkResponse) - execution.setVariable("UPDNETI_updateNetworkResponse", networkResponse) - utils.log("DEBUG", " Network Adapter update Success Response - " + "\n" + networkResponse, isDebugEnabled) - - // prepare rollback data - String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","") - String rollbackNetwork = - """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network">
- ${rollbackData} - </NetworkAdapter:rollbackNetwork>""" - String rollbackNetworkXml = utils.formatXml(rollbackNetwork) - execution.setVariable("UPDNETI_rollbackNetworkRequest", rollbackNetworkXml) - utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled) - - } else { // network error - if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) { //4xx, 5xx - if (networkResponse.contains("updateNetworkError")) { - networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '') - errorMessage = utils.getNodeText1(networkResponse, "message") - errorMessage = "Received error from Network Adapter: " + errorMessage - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage) - - } else { // CatchAll exception - if (returnCode == "500") { - errorMessage = "JBWEB000065: HTTP Status 500." - } else { - errorMessage = "Return code is " + returnCode - } - errorMessage = "Received error from Network Adapter: " + errorMessage - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage) - - } - - } else { // CatchAll exception - String dataErrorMessage = "Received error from Network Adapter. Return code is: " + returnCode - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage) - - } - - } - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. validateUpdateNetworkResponse() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - - } - - public void validateSDNCResponse (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside validateSDNCResponse of UpdateNetworkInstanceInfra ***** ", isDebugEnabled) - - String response = execution.getVariable("UPDNETI_changeAssignSDNCResponse") - WorkflowException workflowException = null - try { - workflowException = execution.getVariable("UPDNETI_WorkflowException") - //execution.setVariable("WorkflowException", workflowException) - } catch (Exception ex) { - utils.log("DEBUG", " Sdnc 'WorkflowException' object is empty or null. ", isDebugEnabled) - } - - boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator") - - SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this) - sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator) - // reset variable - String changeAssignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable("UPDNETI_changeAssignSDNCResponse")) - changeAssignSDNCResponseDecodeXml = changeAssignSDNCResponseDecodeXml.replace("&", "&").replace('<?xml version="1.0" encoding="UTF-8"?>', "") - execution.setVariable("UPDNETI_changeAssignSDNCResponse", changeAssignSDNCResponseDecodeXml) - - if (execution.getVariable("UPDNETI_sdncResponseSuccess") == true) { // from sdnc util, prefix+'sdncResponseSuccess' - execution.setVariable("UPDNETI_isSdncRollbackNeeded", true) - utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled) - - } else { - utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled) - throw new BpmnError("MSOWorkflowException") - } - - } - - - public void postProcessResponse (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside postProcessResponse of UpdateNetworkInstanceInfra ***** ", isDebugEnabled) - - try { - // Display DB response: UPDNETI_updateDBResponse / UPDNETI_dbReturnCode - String dbReturnCode = execution.getVariable("UPDNETI_dbReturnCode") - utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled) - String updateDBResponse = execution.getVariable("UPDNETI_updateDBResponse") - utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + updateDBResponse, isDebugEnabled) - utils.logAudit(updateDBResponse) - - String source = execution.getVariable("UPDNETI_source") - String requestId = execution.getVariable("UPDNETI_requestId") - - String msoCompletionRequest = - """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1">
- <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id> - <action>UPDATE</action> - <source>${source}</source> - </request-info> - <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name> - </aetgt:MsoCompletionRequest>""" - - // Format Response - String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest) - - if (dbReturnCode == "200") { - utils.logAudit(updateDBResponse) - utils.logAudit(xmlMsoCompletionRequest) - execution.setVariable("UPDNETI_Success", true) - execution.setVariable("UPDNETI_CompleteMsoProcessRequest", xmlMsoCompletionRequest) - utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled) - - } else { - String errorMessage = " DB Update failed, code: " + dbReturnCode - utils.log("DEBUG", errorMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage) - - } - - - } catch (BpmnError e) { - throw e; - - } catch (Exception ex) { - String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. postProcessResponse() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) - - } - - - } - - public void prepareSDNCRollbackRequest (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Inside prepareSDNCRollbackRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled) - - try { - // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException. - execution.setVariable("UPDNETI_WorkflowException", execution.getVariable("WorkflowException")) - // get variables - String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback") - String updateNetworkInput = execution.getVariable("UPDNETI_networkRequest") - String cloudRegionId = execution.getVariable("UPDNETI_cloudRegionSdnc") - String changeAssignSDNCResponse = execution.getVariable("UPDNETI_changeAssignSDNCResponse") - String networkId = utils.getNodeText1(changeAssignSDNCResponse, "network-id") - - String serviceInstanceId = utils.getNodeText1(updateNetworkInput, "service-instance-id") - - // 2. prepare rollback topology via SDNC Adapter SUBFLOW call - String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null, null) - String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest) - execution.setVariable("UPDNETI_rollbackSDNCRequest", sndcTopologyRollbackRequestAsString) - utils.log("DEBUG", " Preparing request for SDNC Topology assign's rollback/compensation . . . - " + "\n" + sndcTopologyRollbackRequestAsString, isDebugEnabled) - - - } catch (Exception ex) { - String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareSDNCRollbackRequest() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) - - } - - } - - public void validateRollbackResponses (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - try { - // Note: Updates do not support rollback. To restore a previous state, another Update would be needed to revert to the original settings. - // This would need to be managed by the client. - String rollbackNetworkErrorMessages = "" - Boolean isNetworkRollbackNeeded = execution.getVariable("UPDNETI_isNetworkRollbackNeeded") - if (isNetworkRollbackNeeded == true) { - rollbackNetworkErrorMessages = " + PO Network rollback is not supported for Update. Submit another Update to restore/rollback." - } - - // validate SDNC rollback response - String rollbackSdncErrorMessages = "" - Boolean isSdncRollbackNeeded = execution.getVariable("UPDNETI_isSdncRollbackNeeded") - if (isSdncRollbackNeeded == true) { - String rollbackSDNCReturnCode = execution.getVariable("UPDNETI_rollbackSDNCReturnCode") - String rollbackSDNCReturnInnerCode = "" - String rollbackSDNCResponse = execution.getVariable("UPDNETI_rollbackSDNCResponse") - SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this) - rollbackSDNCResponse = sdncAdapterUtils.decodeXML(rollbackSDNCResponse) - rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "") - - if (rollbackSDNCReturnCode == "200") { - if (utils.nodeExists(rollbackSDNCResponse, "response-code")) { - rollbackSDNCReturnInnerCode = utils.getNodeText1(rollbackSDNCResponse, "response-code") - if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") { - rollbackSdncErrorMessages = " + SNDC rollback completed." - } else { - rollbackSdncErrorMessages = " + SDNC rollback failed. " - } - } else { - rollbackSdncErrorMessages = " + SNDC rollback completed." - } - } else { - rollbackSdncErrorMessages = " + SDNC rollback failed. " - } - - utils.log("DEBUG", " SDNC rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled) - utils.log("DEBUG", " SDNC rollback Response - " + rollbackSDNCResponse, isDebugEnabled) - - } - - //WorkflowException wfe = execution.getVariable("WorkflowException") - //String statusMessage = wfe.getErrorMessage() - //int errorCode = wfe.getErrorCode() - - String statusMessage = "" - int errorCode = 0 - WorkflowException wfe = execution.getVariable("WorkflowException") - if (wfe instanceof WorkflowException) { - statusMessage = wfe.getErrorMessage() - errorCode = wfe.getErrorCode() - } else { - if (execution.getVariable("UPDNETI_WorkflowException") instanceof WorkflowException) { - // get saved WorkflowException - WorkflowException swfe = execution.getVariable("UPDNETI_WorkflowException") - statusMessage = swfe.getErrorMessage() - errorCode = swfe.getErrorCode() - } else { - statusMessage = "Encountered Error, please see previous tasks/activities/steps for error messages." - errorCode = 7000 - } - } - - // recreate WorkflowException to include the rollback Message - statusMessage = statusMessage + rollbackNetworkErrorMessages + rollbackSdncErrorMessages - exceptionUtil.buildWorkflowException(execution, errorCode, statusMessage) - - } catch (Exception ex) { - execution.setVariable("WorkflowException", null) - String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. validateRollbackResponses() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) - exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage) - - } - - - - } - - // ******************************* - // Build Error Section - // ******************************* - - // Prepare for FalloutHandler - public void buildErrorResponse (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled) - - String dbReturnCode = execution.getVariable("UPDNETI_dbReturnCode") - utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled) - String updateDBResponse = execution.getVariable("UPDNETI_updateDBResponse") - utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + updateDBResponse, isDebugEnabled) - utils.logAudit(updateDBResponse) - - String falloutHandlerRequest = "" - String requestId = execution.getVariable("UPDNETI_requestId") - String source = execution.getVariable("UPDNETI_source") - try { - execution.setVariable("UPDNETI_Success", false) - WorkflowException wfe = execution.getVariable("WorkflowException") - String errorCode = String.valueOf(wfe.getErrorCode()) - String errorMessage = wfe.getErrorMessage() - falloutHandlerRequest = - """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
- <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id> - <action>UPDATE</action> - <source>${source}</source> - </request-info> - <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage> - <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode> - </aetgt:WorkflowException> - </aetgt:FalloutHandlerRequest>""" - - utils.logAudit(falloutHandlerRequest) - execution.setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest) - utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled) - - } catch (Exception ex) { - String errorException = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage() - utils.log("DEBUG", errorException, isDebugEnabled) - falloutHandlerRequest = - """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
- <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id> - <action>UPDATE</action> - <source>${source}</source> - </request-info> - <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage> - <aetgt:ErrorCode>7000</aetgt:ErrorCode> - </aetgt:WorkflowException> - </aetgt:FalloutHandlerRequest>""" - - execution.setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest) - utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled) - - } - - } - - - public void sendSyncError (Execution execution) { - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix", Prefix) - - try { - - String requestId = execution.getVariable("mso-request-id")
- - // REST Error (for API Handler (APIH) Reply Task) - String syncError = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim() - - sendWorkflowResponse(execution, 500, syncError) - - } catch (Exception ex) { - utils.log("DEBUG", " Bpmn error encountered in UpdateNetworkInstanceInfra flow. sendSyncError() - " + ex.getMessage(), isDebugEnabled) - } - - } - - - public void processJavaException(Execution execution){ - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - execution.setVariable("prefix",Prefix) - try{ - utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled) - utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled) - utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled) - execution.setVariable("UnexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated - exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception") - - }catch(Exception e){ - utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled) - execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated - exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method") - } - utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled) - } - -} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy index d428cc33dd..5c313775dd 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; @@ -29,11 +29,11 @@ import java.io.Serializable; import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.runtime.Execution import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil -import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.json.JsonUtils;
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.openecomp.mso.bpmn.core.RollbackData
+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 { @@ -204,7 +204,7 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { 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> @@ -255,8 +255,8 @@ public class UpdateVfModule extends AbstractServiceTaskProcessor { 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> @@ -304,10 +304,10 @@ 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> 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 6d532527d0..9ca247714b 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,12 +26,12 @@ import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.runtime.Execution import org.apache.commons.lang3.* import org.springframework.web.util.UriUtils -import org.openecomp.mso.bpmn.common.scripts.AaiUtil
-import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.json.JsonUtils;
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+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 { @@ -130,7 +130,7 @@ class UpdateVfModuleVolume extends VfModuleBase { 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> @@ -238,7 +238,7 @@ class UpdateVfModuleVolume extends VfModuleBase { def requestId = execution.getVariable('UPDVfModVol_requestId') def serviceId = execution.getVariable('UPDVfModVol_serviceId') - def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ 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)) { @@ -297,7 +297,7 @@ class UpdateVfModuleVolume extends VfModuleBase { 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> @@ -340,8 +340,8 @@ class UpdateVfModuleVolume extends VfModuleBase { 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> @@ -385,10 +385,10 @@ 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> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn index fa114c5e76..dbd40c072e 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> - <bpmn2:process id="CreateServiceInstance" name="CreateServiceInstance" isExecutable="true"> + <bpmn2:process id="CreateGenericALaCarteServiceInstance" name="CreateGenericALaCarteServiceInstance" isExecutable="true"> <bpmn2:startEvent id="createSI_startEvent" name="Create SI Start Flow"> <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing> </bpmn2:startEvent> @@ -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.infrastructure.scripts.utils.* + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* ExceptionUtil ex = new ExceptionUtil() ex.processJavaException(execution)]]></bpmn2:script> </bpmn2:scriptTask> @@ -51,7 +51,7 @@ ex.processJavaException(execution)]]></bpmn2:script> <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0ktadna</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi= new CreateServiceInstance() +def csi= new CreateGenericALaCarteServiceInstance() csi.preProcessRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createSI_startEvent" targetRef="ScriptTask_0pvcr6j" /> @@ -59,7 +59,7 @@ csi.preProcessRequest(execution)]]></bpmn2:script> <bpmn2:incoming>SequenceFlow_1o4wwba</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new CreateServiceInstance() +def csi = new CreateGenericALaCarteServiceInstance() csi.prepareCompletionRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess"> @@ -87,7 +87,7 @@ csi.prepareCompletionRequest(execution)]]></bpmn2:script> <bpmn2:incoming>SequenceFlow_14eadeb</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new CreateServiceInstance() +def csi = new CreateGenericALaCarteServiceInstance() csi.prepareFalloutRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandler" calledElement="FalloutHandler"> @@ -109,7 +109,7 @@ csi.prepareFalloutRequest(execution)]]></bpmn2:script> <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_14eadeb</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new CreateServiceInstance() +def csi = new CreateGenericALaCarteServiceInstance() csi.sendSyncError(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_14eadeb" sourceRef="ScriptTask_0o4smqp" targetRef="ScriptTask_1hql91g" /> @@ -120,7 +120,7 @@ csi.sendSyncError(execution)]]></bpmn2:script> <bpmn2:incoming>SequenceFlow_0ktadna</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new CreateServiceInstance() +def csi = new CreateGenericALaCarteServiceInstance() csi.sendSyncResponse(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_0ktadna" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_1nko5zz" /> @@ -143,7 +143,7 @@ csi.sendSyncResponse(execution)]]></bpmn2:script> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateServiceInstance"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateGenericALaCarteServiceInstance"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent"> <dc:Bounds x="-6" y="79" width="36" height="36" /> <bpmndi:BPMNLabel> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn index 7b9b8212e5..a3a36529da 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn @@ -1,1203 +1,1243 @@ -<?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>
+<?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>
+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">
+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: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>
+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="CGMSNV_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>
+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>
+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" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="serviceDecomposition" target="serviceDecomposition" /> + </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>
+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="CGMSNV_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>
+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="DoCreateVnfAndModulesRollback"> + <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>
+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("CGMSNV_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>
+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>
+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 " 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>
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf() +CreateGenericMacroServiceNetworkVnf.getDataFromDecomposition(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:scriptTask id="prepareCreateService_scriptTask" name="Prepare Create Service " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0hvcwa1</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>
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf() +CreateGenericMacroServiceNetworkVnf.prepareCreateServiceInstance(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:scriptTask id="setPONR_ScriptTask" name="set PONR"> + <bpmn2:incoming>SequenceFlow_12ilko1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0afe2pg</bpmn2:outgoing> + <bpmn2:script><![CDATA[#{execution.setVariable("PONR", true)}]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_12ilko1" sourceRef="IntermediateCatchEvent_4" targetRef="setPONR_ScriptTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_0afe2pg" sourceRef="setPONR_ScriptTask" targetRef="postProcessAndCompletionRequest_ScriptTask" /> + <bpmn2: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("CGMSNV_NetworksCreatedCount") < execution.getVariable("CGMSNV_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("CGMSNV_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("CGMSNV_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>
+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("CGMSNV_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>
+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:sequenceFlow id="SequenceFlow_0hvcwa1" sourceRef="DecomposeService" targetRef="prepareCreateService_scriptTask" /> + <bpmn2:callActivity id="DecomposeService" name="DecomposeService" calledElement="DecomposeService"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_00h6hmd</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0hvcwa1</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:scriptTask id="ScriptTask_0cdtchu" name="Prepare Decompose Service " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1eu60rt</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_00h6hmd</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf() +CreateGenericMacroServiceNetworkVnf.prepareDecomposeService(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1eu60rt" sourceRef="IntermediateCatchEvent_3" targetRef="ScriptTask_0cdtchu" /> + <bpmn2:sequenceFlow id="SequenceFlow_00h6hmd" sourceRef="ScriptTask_0cdtchu" targetRef="DecomposeService" /> + </bpmn2: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="610" 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="456" y="223" width="100" height="80" /> + </bpmndi:BPMNShape> + <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="1065" y="245" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1048" 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="556" y="263" /> + <di:waypoint xsi:type="dc:Point" x="610" y="263" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="583" 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="921" y="223" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_13uceka_di" bpmnElement="SequenceFlow_13uceka"> + <di:waypoint xsi:type="dc:Point" x="1021" y="263" /> + <di:waypoint xsi:type="dc:Point" x="1065" y="263" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1043" y="248" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1qd3uwb_di" bpmnElement="ScriptTask_1qd3uwb"> + <dc:Bounds x="772" y="223" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ky2sv9_di" bpmnElement="SequenceFlow_1ky2sv9"> + <di:waypoint xsi:type="dc:Point" x="710" y="263" /> + <di:waypoint xsi:type="dc:Point" x="772" y="263" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="741" y="248" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0vj46ej_di" bpmnElement="SequenceFlow_0vj46ej"> + <di:waypoint xsi:type="dc:Point" x="872" y="263" /> + <di:waypoint xsi:type="dc:Point" x="921" y="263" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="897" y="248" 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:BPMNEdge id="SequenceFlow_0hvcwa1_di" bpmnElement="SequenceFlow_0hvcwa1"> + <di:waypoint xsi:type="dc:Point" x="407" y="263" /> + <di:waypoint xsi:type="dc:Point" x="456" y="263" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="432" y="248" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0w2alah_di" bpmnElement="DecomposeService"> + <dc:Bounds x="307" y="223" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0cdtchu_di" bpmnElement="ScriptTask_0cdtchu"> + <dc:Bounds x="171" y="223" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1eu60rt_di" bpmnElement="SequenceFlow_1eu60rt"> + <di:waypoint xsi:type="dc:Point" x="132" y="263" /> + <di:waypoint xsi:type="dc:Point" x="171" y="263" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="152" y="238" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_00h6hmd_di" bpmnElement="SequenceFlow_00h6hmd"> + <di:waypoint xsi:type="dc:Point" x="271" y="263" /> + <di:waypoint xsi:type="dc:Point" x="307" y="263" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="289" y="238" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn index 7a8133ec7f..c58fec9dd9 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn @@ -1,22 +1,42 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_pNTO8MRhEeWv36YLr7PC3Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_pNTO8MRhEeWv36YLr7PC3Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="CreateVfModuleInfra" name="CreateVfModuleInfra" isExecutable="true"> <bpmn2:startEvent id="StartEvent_1" name="Start"> <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest"/> + <bpmn2: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="CVFMI_requestId" target="msoRequestId" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:in source="isVidRequest" target="isVidRequest" /> + <camunda:in source="CVFMI_disableRollback" target="disableRollback" /> + <camunda:out source="DCVFM_vnfId" target="CVFMI_vnfId" /> + <camunda:out source="DCVFM_vfModuleId" target="CVFMI_vfModuleId" /> + <camunda:out source="RollbackData" target="RollbackData" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="WorkflowResponse" target="CVFMI_WorkflowResponse" /> + <camunda:out source="DCVFM_vfModuleName" target="CVFMI_vfModuleName" /> + <camunda:in source="CVFMI_vnfType" target="vnfType" /> + <camunda:in source="CVFMI_vnfName" target="vnfName" /> + <camunda:in source="CVFMI_vnfId" target="vnfId" /> + <camunda:in source="CVFMI_vfModuleName" target="vfModuleName" /> + <camunda:in source="CVFMI_vfModuleType" target="vfModuleType" /> + <camunda:in source="CVFMI_volumeGroupId" target="volumeGroupId" /> + <camunda:in source="CVFMI_volumeGroupName" target="volumeGroupName" /> + <camunda:in source="CVFMI_isBaseVfModule" target="isBaseVfModule" /> + <camunda:in source="CVFMI_asdcServiceModelVersion" target="asdcServiceModelVersion" /> + <camunda:in source="CVFMI_serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="CVFMI_serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="CVFMI_vnfModelInfo" target="vnfModelInfo" /> + <camunda:in source="CVFMI_globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="CVFMI_sdncVersion" target="sdncVersion" /> + <camunda:in source="CVFMI_lcpCloudRegionId" target="lcpCloudRegionId" /> + <camunda:in source="CVFMI_tenantId" target="tenantId" /> + <camunda:in source="CVFMI_vfModuleId" target="vfModuleId" /> + <camunda:in source="CVFMI_vfModuleModelInfo" target="vfModuleModelInfo" /> + <camunda:in source="CVFMI_usePreload" target="usePreload" /> + <camunda:in source="CVFMI_vfModuleInputParams" target="vfModuleInputParams" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing> @@ -28,17 +48,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,7 +69,6 @@ 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"> @@ -62,13 +81,14 @@ 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> @@ -76,15 +96,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> @@ -94,13 +114,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"> @@ -110,37 +130,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> @@ -149,19 +169,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> @@ -172,7 +192,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> @@ -181,18 +201,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> @@ -201,272 +221,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" errorCode="MSOWorkflowException" name="MSOWorkflowException"/> - <bpmn2:error id="Error_2" errorCode="RESTFault" name="REST Fault"/> + <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_2" name="REST Fault" errorCode="RESTFault" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleInfra"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1"> - <dc:Bounds height="36.0" width="36.0" x="41.0" y="231.0"/> + <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.0" y="249.0"/> - <di:waypoint xsi:type="dc:Point" x="226.0" y="249.0"/> + <di:waypoint xsi:type="dc:Point" x="77" y="249" /> + <di:waypoint xsi:type="dc:Point" x="226" y="249" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="99.0" y="249.0"/> + <dc:Bounds x="99" y="249" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest"> - <dc:Bounds height="80.0" width="100.0" x="226.0" y="209.0"/> + <dc:Bounds x="226" y="209" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="SendResponse"> - <dc:Bounds height="80.0" width="100.0" x="432.0" y="209.0"/> + <dc:Bounds x="432" y="209" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ServiceTask_86"> - <di:waypoint xsi:type="dc:Point" x="326.0" y="249.0"/> - <di:waypoint xsi:type="dc:Point" x="432.0" y="249.0"/> + <di:waypoint xsi:type="dc:Point" x="326" y="249" /> + <di:waypoint xsi:type="dc:Point" x="432" y="249" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="348.0" y="249.0"/> + <dc:Bounds x="348" y="249" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="DoCreateVfModuleSubprocess"> - <dc:Bounds height="80.0" width="145.0" x="612.0" y="209.0"/> + <dc:Bounds x="612" y="209" width="145" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_178"> - <di:waypoint xsi:type="dc:Point" x="532.0" y="249.0"/> - <di:waypoint xsi:type="dc:Point" x="612.0" y="249.0"/> + <di:waypoint xsi:type="dc:Point" x="532" y="249" /> + <di:waypoint xsi:type="dc:Point" x="612" y="249" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_47" bpmnElement="IntermediateThrowEvent_1"> - <dc:Bounds height="36.0" width="36.0" x="823.0" y="231.0"/> + <dc:Bounds x="823" y="231" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="841.0" y="272.0"/> + <dc:Bounds x="841" y="272" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_IntermediateThrowEvent_47"> - <di:waypoint xsi:type="dc:Point" x="756.0" y="249.0"/> - <di:waypoint xsi:type="dc:Point" x="823.0" y="249.0"/> + <di:waypoint xsi:type="dc:Point" x="756" y="249" /> + <di:waypoint xsi:type="dc:Point" x="823" y="249" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_32" bpmnElement="IntermediateCatchEvent_1"> - <dc:Bounds height="36.0" width="36.0" x="39.0" y="349.0"/> + <dc:Bounds x="39" y="349" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="65.0" x="25.0" y="390.0"/> + <dc:Bounds x="25" y="390" width="65" height="22" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="PrepareUpdateInfraRequest"> - <dc:Bounds height="80.0" width="100.0" x="127.0" y="327.0"/> + <dc:Bounds x="127" y="327" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_1"> - <dc:Bounds height="80.0" width="100.0" x="277.0" y="327.0"/> + <dc:Bounds x="277" y="327" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_179" bpmnElement="UpdateInfraRequestResponseCheck" isMarkerVisible="true"> - <dc:Bounds height="50.0" width="50.0" x="443.0" y="341.0"/> + <dc:Bounds x="443" y="341" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="68.0" x="435.0" y="308.0"/> + <dc:Bounds x="435" y="308" width="68" height="22" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="PrepareMSOCompletionHandler"> - <dc:Bounds height="80.0" width="100.0" x="552.0" y="327.0"/> + <dc:Bounds x="552" y="327" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="MSOCompletionHandler"> - <dc:Bounds height="80.0" width="100.0" x="708.0" y="327.0"/> + <dc:Bounds x="708" y="327" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_1"> - <dc:Bounds height="36.0" width="36.0" x="1020.0" y="349.0"/> + <dc:Bounds x="1020" y="349" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="1038.0" y="390.0"/> + <dc:Bounds x="1038" y="390" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_2"> - <dc:Bounds height="36.0" width="36.0" x="452.0" y="469.0"/> + <dc:Bounds x="452" y="469" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="470.0" y="510.0"/> + <dc:Bounds x="470" y="510" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_IntermediateCatchEvent_32" targetElement="_BPMNShape_ScriptTask_219"> - <di:waypoint xsi:type="dc:Point" x="75.0" y="367.0"/> - <di:waypoint xsi:type="dc:Point" x="127.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="75" y="367" /> + <di:waypoint xsi:type="dc:Point" x="127" y="367" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="105.0" y="367.0"/> + <dc:Bounds x="105" y="367" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_219" targetElement="_BPMNShape_ServiceTask_103"> - <di:waypoint xsi:type="dc:Point" x="227.0" y="367.0"/> - <di:waypoint xsi:type="dc:Point" x="277.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="227" y="367" /> + <di:waypoint xsi:type="dc:Point" x="277" y="367" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ExclusiveGateway_179"> - <di:waypoint xsi:type="dc:Point" x="377.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"/> + <di:waypoint xsi:type="dc:Point" x="377" y="367" /> + <di:waypoint xsi:type="dc:Point" x="410" y="367" /> + <di:waypoint xsi:type="dc:Point" x="410" y="366" /> + <di:waypoint xsi:type="dc:Point" x="443" y="366" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="407.0" y="366.0"/> + <dc:Bounds x="407" y="366" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="updateInfraRequestResponseBad" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_EndEvent_178"> - <di:waypoint xsi:type="dc:Point" x="468.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"/> + <di:waypoint xsi:type="dc:Point" x="468" y="391" /> + <di:waypoint xsi:type="dc:Point" x="469" y="421" /> + <di:waypoint xsi:type="dc:Point" x="470" y="421" /> + <di:waypoint xsi:type="dc:Point" x="470" y="469" /> <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="20.0" x="459.0" y="419.0"/> + <dc:Bounds x="459" y="419" width="20" height="22" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="updateInfraRequestResponseGood" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_ScriptTask_220"> - <di:waypoint xsi:type="dc:Point" x="493.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"/> + <di:waypoint xsi:type="dc:Point" x="493" y="366" /> + <di:waypoint xsi:type="dc:Point" x="523" y="366" /> + <di:waypoint xsi:type="dc:Point" x="523" y="367" /> + <di:waypoint xsi:type="dc:Point" x="552" y="367" /> <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="27.0" x="510.0" y="367.0"/> + <dc:Bounds x="510" y="367" width="27" height="22" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_220" targetElement="_BPMNShape_ScriptTask_221"> - <di:waypoint xsi:type="dc:Point" x="652.0" y="367.0"/> - <di:waypoint xsi:type="dc:Point" x="708.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="652" y="367" /> + <di:waypoint xsi:type="dc:Point" x="708" y="367" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="678.0" y="367.0"/> + <dc:Bounds x="678" y="367" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="ErrorHandler" isExpanded="true"> - <dc:Bounds height="385.0" width="925.0" x="48.0" y="540.0"/> + <dc:Bounds x="48" y="540" width="925" height="385" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2"> - <dc:Bounds height="36.0" width="36.0" x="72.0" y="844.0"/> + <dc:Bounds x="72" y="844" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="98.0" x="60.0" y="886.0"/> + <dc:Bounds x="60" y="886" width="98" height="22" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_222" bpmnElement="PrepareFalloutHandler"> - <dc:Bounds height="80.0" width="100.0" x="564.0" y="672.0"/> + <dc:Bounds x="564" y="672" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_223" bpmnElement="FalloutHandler"> - <dc:Bounds height="80.0" width="100.0" x="708.0" y="672.0"/> + <dc:Bounds x="708" y="672" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_3"> - <dc:Bounds height="36.0" width="36.0" x="864.0" y="694.0"/> + <dc:Bounds x="864" y="694" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="882.0" y="735.0"/> + <dc:Bounds x="882" y="735" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_44" bpmnElement="BoundaryEvent_1"> - <dc:Bounds height="36.0" width="36.0" x="955.0" y="690.0"/> + <dc:Bounds x="955" y="690" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="970.0" y="731.0"/> + <dc:Bounds x="970" y="731" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_4"> - <dc:Bounds height="36.0" width="36.0" x="1049.0" y="690.0"/> + <dc:Bounds x="1049" y="690" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="1067.0" y="731.0"/> + <dc:Bounds x="1067" y="731" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_222" targetElement="_BPMNShape_ScriptTask_223"> - <di:waypoint xsi:type="dc:Point" x="664.0" y="712.0"/> - <di:waypoint xsi:type="dc:Point" x="708.0" y="712.0"/> + <di:waypoint xsi:type="dc:Point" x="664" y="712" /> + <di:waypoint xsi:type="dc:Point" x="708" y="712" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="689.0" y="712.0"/> + <dc:Bounds x="689" y="712" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_223" targetElement="_BPMNShape_EndEvent_179"> - <di:waypoint xsi:type="dc:Point" x="808.0" y="712.0"/> - <di:waypoint xsi:type="dc:Point" x="864.0" y="712.0"/> + <di:waypoint xsi:type="dc:Point" x="808" y="712" /> + <di:waypoint xsi:type="dc:Point" x="864" y="712" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="836.0" y="712.0"/> + <dc:Bounds x="836" y="712" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_BoundaryEvent_44" targetElement="_BPMNShape_EndEvent_180"> - <di:waypoint xsi:type="dc:Point" x="991.0" y="708.0"/> - <di:waypoint xsi:type="dc:Point" x="1049.0" y="708.0"/> + <di:waypoint xsi:type="dc:Point" x="991" y="708" /> + <di:waypoint xsi:type="dc:Point" x="1049" y="708" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1015.0" y="708.0"/> + <dc:Bounds x="1015" y="708" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="SetSuccessIndicator"> - <dc:Bounds height="79.0" width="103.0" x="858.0" y="328.0"/> + <dc:Bounds x="858" y="328" width="103" height="79" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_241"> - <di:waypoint xsi:type="dc:Point" x="808.0" y="367.0"/> - <di:waypoint xsi:type="dc:Point" x="858.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="808" y="367" /> + <di:waypoint xsi:type="dc:Point" x="858" y="367" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_241" targetElement="_BPMNShape_EndEvent_177"> - <di:waypoint xsi:type="dc:Point" x="960.0" y="367.0"/> - <di:waypoint xsi:type="dc:Point" x="1020.0" y="367.0"/> + <di:waypoint xsi:type="dc:Point" x="960" y="367" /> + <di:waypoint xsi:type="dc:Point" x="1020" y="367" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true"> - <dc:Bounds height="50.0" width="50.0" x="205.0" y="836.0"/> + <dc:Bounds x="205" y="836" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="102.0" x="193.0" y="901.0"/> + <dc:Bounds x="193" y="901" width="102" height="22" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ValidateRollbackResponse"> - <dc:Bounds height="79.0" width="103.0" x="312.0" y="554.0"/> + <dc:Bounds x="312" y="554" width="103" height="79" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_25" bpmnElement="InclusiveGateway_1"> - <dc:Bounds height="50.0" width="50.0" x="459.0" y="686.0"/> + <dc:Bounds x="459" y="686" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="484.0" y="741.0"/> + <dc:Bounds x="484" y="741" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ExclusiveGateway_223"> - <di:waypoint xsi:type="dc:Point" x="108.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"/> + <di:waypoint xsi:type="dc:Point" x="108" y="862" /> + <di:waypoint xsi:type="dc:Point" x="156" y="862" /> + <di:waypoint xsi:type="dc:Point" x="156" y="861" /> + <di:waypoint xsi:type="dc:Point" x="205" y="861" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="153.0" y="862.0"/> + <dc:Bounds x="153" y="862" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="isRollbackOnNoSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_InclusiveGateway_25"> - <di:waypoint xsi:type="dc:Point" x="255.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"/> + <di:waypoint xsi:type="dc:Point" x="255" y="861" /> + <di:waypoint xsi:type="dc:Point" x="354" y="861" /> + <di:waypoint xsi:type="dc:Point" x="354" y="711" /> + <di:waypoint xsi:type="dc:Point" x="459" y="711" /> <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="20.0" x="324.0" y="866.0"/> + <dc:Bounds x="324" y="866" width="20" height="22" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_266" targetElement="_BPMNShape_InclusiveGateway_25"> - <di:waypoint xsi:type="dc:Point" x="414.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"/> + <di:waypoint xsi:type="dc:Point" x="414" y="593" /> + <di:waypoint xsi:type="dc:Point" x="484" y="593" /> + <di:waypoint xsi:type="dc:Point" x="484" y="686" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="462.0" y="593.0"/> + <dc:Bounds x="462" y="593" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_InclusiveGateway_25" targetElement="_BPMNShape_ScriptTask_222"> - <di:waypoint xsi:type="dc:Point" x="509.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"/> + <di:waypoint xsi:type="dc:Point" x="509" y="711" /> + <di:waypoint xsi:type="dc:Point" x="527" y="711" /> + <di:waypoint xsi:type="dc:Point" x="527" y="712" /> + <di:waypoint xsi:type="dc:Point" x="564" y="712" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="533.0" y="712.0"/> + <dc:Bounds x="533" y="712" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="ScriptTask_1"> - <dc:Bounds height="79.0" width="103.0" x="179.0" y="554.0"/> + <dc:Bounds x="179" y="554" width="103" height="79" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_267" targetElement="_BPMNShape_ScriptTask_266"> - <di:waypoint xsi:type="dc:Point" x="281.0" y="593.0"/> - <di:waypoint xsi:type="dc:Point" x="312.0" y="593.0"/> + <di:waypoint xsi:type="dc:Point" x="281" y="593" /> + <di:waypoint xsi:type="dc:Point" x="312" y="593" /> <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="294.0" y="593.0"/> + <dc:Bounds x="294" y="593" width="6" height="6" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_283" bpmnElement="LogAndSaveOriginalException"> - <dc:Bounds height="79.0" width="103.0" x="179.0" y="693.0"/> + <dc:Bounds x="179" y="693" width="103" height="79" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="IsRollbackOnYesSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_283"> - <di:waypoint xsi:type="dc:Point" x="230.0" y="836.0"/> - <di:waypoint xsi:type="dc:Point" x="230.0" y="771.0"/> + <di:waypoint xsi:type="dc:Point" x="230" y="836" /> + <di:waypoint xsi:type="dc:Point" x="230" y="771" /> <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="27.0" x="240.0" y="804.0"/> + <dc:Bounds x="240" y="804" width="27" height="22" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_283" targetElement="_BPMNShape_ScriptTask_267"> - <di:waypoint xsi:type="dc:Point" x="230.0" y="693.0"/> - <di:waypoint xsi:type="dc:Point" x="230.0" y="632.0"/> + <di:waypoint xsi:type="dc:Point" x="230" y="693" /> + <di:waypoint xsi:type="dc:Point" x="230" y="632" /> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions>
\ No newline at end of file +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn index e8d27b6014..b10e98b56f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn @@ -23,7 +23,7 @@ createVnf.sendSyncResponse(execution)]]></bpmn2:script> <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendResponse" targetRef="CreateVNF" /> <bpmn2:callActivity id="CreateVNF" name="Create VNF" calledElement="DoCreateVnf"> <bpmn2:extensionElements> - <camunda:in source="CREVI_requestId" target="requestId" /> + <camunda:in source="CREVI_requestId" target="msoRequestId" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> <camunda:in source="CREVI_serviceInstanceId" target="serviceInstanceId" /> <camunda:in source="CREVI_suppressRollback" target="disableRollback" /> @@ -31,12 +31,13 @@ createVnf.sendSyncResponse(execution)]]></bpmn2:script> <camunda:in source="CREVI_vnfType" target="vnfType" /> <camunda:in source="CREVI_vnfName" target="vnfName" /> <camunda:in source="CREVI_vnfId" target="vnfId" /> - <camunda:in source="CREVI_cloudConfiguration" target="cloudConfiguration" /> <camunda:in source="CREVI_serviceId" target="productFamilyId" /> <camunda:in source="CREVI_vnfInputParameters" target="vnfInputParameters" /> <camunda:out source="vnfId" target="CREVI_vnfId" /> <camunda:out source="vnfOutputParameters" target="CREVI_vnfOutputParameters" /> <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="CREVI_lcpCloudRegionId" target="lcpCloudRegionId" /> + <camunda:in source="CREVI_tenantId" target="tenandId" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0lso26t</bpmn2:outgoing> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn index 4488e8de1c..ceb0c72218 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> - <bpmn2:process id="DelServiceInstance" name="DelServiceInstance" isExecutable="true"> + <bpmn2:process id="DeleteGenericALaCarteServiceInstance" name="DeleteGenericALaCarteServiceInstance" isExecutable="true"> <bpmn2:startEvent id="deleteSI_startEvent" name="Delete SI Start Flow"> <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing> </bpmn2:startEvent> @@ -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.infrastructure.scripts.utils.* + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* ExceptionUtil ex = new ExceptionUtil() ex.processJavaException(execution)]]></bpmn2:script> </bpmn2:scriptTask> @@ -47,16 +47,16 @@ ex.processJavaException(execution)]]></bpmn2:script> <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="Pre Process Incoming Request" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0ktadna</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi= new DelServiceInstance() + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi= new DeleteGenericALaCarteServiceInstance() csi.preProcessRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="deleteSI_startEvent" targetRef="ScriptTask_0pvcr6j" /> <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_1qjygj5</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new DelServiceInstance() + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DeleteGenericALaCarteServiceInstance() csi.prepareCompletionRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess"> @@ -83,8 +83,8 @@ csi.prepareCompletionRequest(execution)]]></bpmn2:script> <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare Fallout Request" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_14eadeb</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new DelServiceInstance() + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DeleteGenericALaCarteServiceInstance() csi.prepareFalloutRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandler" calledElement="FalloutHandler"> @@ -105,8 +105,8 @@ csi.prepareFalloutRequest(execution)]]></bpmn2:script> <bpmn2:scriptTask id="ScriptTask_0o4smqp" name="Send Error Response"> <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_14eadeb</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new DelServiceInstance() + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DeleteGenericALaCarteServiceInstance() csi.sendSyncError(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_14eadeb" sourceRef="ScriptTask_0o4smqp" targetRef="ScriptTask_1hql91g" /> @@ -116,8 +116,8 @@ csi.sendSyncError(execution)]]></bpmn2:script> <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_0ktadna</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new DelServiceInstance() + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DeleteGenericALaCarteServiceInstance() csi.sendSyncResponse(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_0ktadna" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_1nko5zz" /> @@ -138,7 +138,7 @@ csi.sendSyncResponse(execution)]]></bpmn2:script> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DelServiceInstance"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteGenericALaCarteServiceInstance"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteSI_startEvent"> <dc:Bounds x="117" y="79" width="36" height="36" /> <bpmndi:BPMNLabel> @@ -328,4 +328,4 @@ csi.sendSyncResponse(execution)]]></bpmn2:script> </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/DeleteGenericMacroServiceNetworkVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn index eeb32599d3..bb2c487e8a 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn @@ -1,771 +1,773 @@ -<?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>
+<?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>
+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>
+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>
+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>
+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>
+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="vnfId" target="vnfId" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:out source="rollbackData" target="rollbackData" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="rolledBack" target="rolledBack" /> + <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" /> + <camunda:in source="tenantId" target="tenantId" /> + </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>
+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>
+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>
+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>
+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>
+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/DeleteVnfInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn index b5b10a0fda..95c0a727ce 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn @@ -129,7 +129,7 @@ deleteVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script> <bpmn2:callActivity id="Task_0ob25pp" name="Delete VNF and Modules" calledElement="DoDeleteVnfAndModules"> <bpmn2:extensionElements> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:in source="DELVI_requestId" target="requestId" /> + <camunda:in source="DELVI_requestId" target="msoRequestId" /> <camunda:in source="DELVI_vnfId" target="vnfId" /> <camunda:in source="DELVI_serviceInstanceId" target="serviceInstanceId" /> <camunda:in source="DELVI_cloudConfiguration" target="cloudConfiguration" /> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn deleted file mode 100644 index f49149b709..0000000000 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn +++ /dev/null @@ -1,1014 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn"> - <bpmn2:process id="UpdateNetworkInstanceInfra" name="UpdateNetworkInstanceInfra" isExecutable="true"> - <bpmn2:startEvent id="updateNetwork_startEvent" name="Start Flow"> - <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> - </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="updateNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/> - <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.prepareSDNCRequest(execution) -]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity"/> - <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.validateSDNCResponse(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow"> - <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming> - <bpmn2:outgoing>sdncTopoNo_SequenceFlow</bpmn2:outgoing> - <bpmn2:outgoing>sdncTopoYes_SequenceFlow</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent"/> - <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTReQuery1NetworkID_ScriptTask"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression> - </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway"/> - <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask"> - <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing> - <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2"/> - </bpmn2:boundaryEvent> - <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent"/> - <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error"> - <bpmn2:incoming>sdncTopoNo_SequenceFlow</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming> - <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_2"/> - </bpmn2:endEvent> - <bpmn2:callActivity id="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter"> - <bpmn2:extensionElements> - <camunda:in source="UPDNETI_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest"/> - <camunda:in source="mso-request-id" target="mso-request-id"/> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/> - <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_rollbackSDNCReturnCode"/> - <camunda:out source="sdncAdapterResponse" target="UPDNETI_rollbackSDNCResponse"/> - </bpmn2:extensionElements> - </bpmn2:callActivity> - <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" attachedToRef="callAssignSDNCAdapter_CallActivity"> - <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/> - </bpmn2:boundaryEvent> - <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign Adapter V1 Sub-process" calledElement="sdncAdapter"> - <bpmn2:extensionElements> - <camunda:in source="UPDNETI_changeAssignSDNCRequest" target="sdncAdapterWorkflowRequest"/> - <camunda:out source="sdncAdapterResponse" target="UPDNETI_changeAssignSDNCResponse"/> - <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_sdncReturnCode"/> - <camunda:in source="mso-request-id" target="mso-request-id"/> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/> - <camunda:out source="WorkflowException" target="UPDNETI_WorkflowException"/> - <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/> - <camunda:in variables="all"/> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing> - </bpmn2:callActivity> - <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask"/> - <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process & Completion Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/> - <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true"> - <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow"> - <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming> - <bpmn2:outgoing>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:outgoing> - <bpmn2:outgoing>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="isRollbackOn_YesNetwork_SequenceFlow" name="Yes" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_rollbackEnabled") == true}]]></bpmn2:conditionExpression> - </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="isRollbackOn_NoNetwork_SequenceFlow" name="No" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="InclusiveGateway_6"/> - <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start"> - <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing> - <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2"/> - </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="isRollbackOn_Network_ExclusiveGateway"/> - <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="isPONR?" default="isPONR_No_SequenceFlow"> - <bpmn2:incoming>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:incoming> - <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing> - <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="InclusiveGateway_6"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isPONR") == true}]]></bpmn2:conditionExpression> - </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isNetworkOk_ExclusiveGateway"/> - <bpmn2:exclusiveGateway id="isNetworkOk_ExclusiveGateway" name="is Network Ok?" default="isNetworkOk_No_SequenceFlow"> - <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming> - <bpmn2:outgoing>isNetworkOk_No_SequenceFlow</bpmn2:outgoing> - <bpmn2:outgoing>isNetworkOk_Yes_SequenceFlow</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="isNetworkOk_No_SequenceFlow" name="No" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway"/> - <bpmn2:sequenceFlow id="isNetworkOk_Yes_SequenceFlow" name="Yes" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isNetworkRollbackNeeded") == true}]]></bpmn2:conditionExpression> - </bpmn2:sequenceFlow> - <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway"> - <bpmn2:incoming>isNetworkOk_No_SequenceFlow</bpmn2:incoming> - <bpmn2:incoming>isNetworkOk_Yes_SequenceFlow</bpmn2:incoming> - <bpmn2:outgoing>sdncOk_Yeso_ExclusiveGateway</bpmn2:outgoing> - <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="prepareSDNCRollbackRequest_ScriptTask"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression> - </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="validateRollbacksResponse_ScriptTask_2"/> - <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy"> - <bpmn2:incoming>sdncOk_Yeso_ExclusiveGateway</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_53</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="sdncTopoRollback_IntermediateThrowEvent"/> - <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback"> - <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing> - <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/> - </bpmn2:intermediateThrowEvent> - <bpmn2:sequenceFlow id="SequenceFlow_55" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="validateRollbacksResponse_ScriptTask_2"/> - <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/> - <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update"> - <bpmn2:extensionElements> - <camunda:connector> - <camunda:connectorId>http-connector</camunda:connectorId> - <camunda:inputOutput> - <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter> - <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter> - <camunda:inputParameter name="headers"> - <camunda:map> - <camunda:entry key="content-type">application/soap+xml</camunda:entry> - </camunda:map> - </camunda:inputParameter> - <camunda:inputParameter name="method">POST</camunda:inputParameter> - <camunda:outputParameter name="UPDNETI_updateDBResponse">${response}</camunda:outputParameter> - <camunda:outputParameter name="UPDNETI_dbReturnCode">${statusCode}</camunda:outputParameter> - </camunda:inputOutput> - </camunda:connector> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/> - <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler"> - <bpmn2:extensionElements> - <camunda:in variables="all"/> - <camunda:out variables="all"/> - <camunda:in source="UPDNETI_FalloutHandlerRequest" target="FalloutHandlerRequest"/> - <camunda:in source="mso-request-id" target="mso-request-id"/> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/> - <camunda:out source="FH_ResponseCode" target="FH_ResponseCode"/> - <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse"/> - <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse"/> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing> - </bpmn2:callActivity> - <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/> - <bpmn2:endEvent id="EndEvent_4"> - <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming> - </bpmn2:endEvent> - <bpmn2:scriptTask id="validateRollbacksResponse_ScriptTask_2" name="Validate Rollback Responses" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming> - <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.validateRollbackResponses(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="validateRollbacksResponse_ScriptTask_2" targetRef="InclusiveGateway_6"/> - <bpmn2:inclusiveGateway id="InclusiveGateway_6"> - <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming> - <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing> - </bpmn2:inclusiveGateway> - <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="prepareDBInfraErrorRequest_ScriptTask"/> - <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def buildErrorResponse = new UpdateNetworkInstanceInfra() -buildErrorResponse.buildErrorResponse(execution) -]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/> - </bpmn2:subProcess> - <bpmn2:scriptTask id="callRESTReQuery2NetworkID_ScriptTask" name="Call REST ReQuery2 Network Id in AAI" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQuery2NetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask"/> - <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/> - <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.prepareDBRequest(execution) - -]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/> - <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update"> - <bpmn2:extensionElements> - <camunda:connector> - <camunda:connectorId>http-connector</camunda:connectorId> - <camunda:inputOutput> - <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter> - <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter> - <camunda:inputParameter name="headers"> - <camunda:map> - <camunda:entry key="content-type">application/soap+xml</camunda:entry> - </camunda:map> - </camunda:inputParameter> - <camunda:inputParameter name="method">POST</camunda:inputParameter> - <camunda:outputParameter name="UPDNETI_createDBResponse">${response}</camunda:outputParameter> - <camunda:outputParameter name="UPDNETI_dbReturnCode">${statusCode}</camunda:outputParameter> - </camunda:inputOutput> - </camunda:connector> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask"/> - <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess"> - <bpmn2:extensionElements> - <camunda:in variables="all"/> - <camunda:out variables="all"/> - <camunda:in source="UPDNETI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/> - <camunda:in source="mso-request-id" target="mso-request-id"/> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/> - <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/> - <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/> - <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing> - </bpmn2:callActivity> - <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/> - <bpmn2:endEvent id="EndEvent_3"> - <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming> - </bpmn2:endEvent> - <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> - <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.processJavaException(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/> - <bpmn2:startEvent id="StartEvent_1"> - <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing> - <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1"/> - </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/> - <bpmn2:endEvent id="EndEvent_1"> - <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming> - </bpmn2:endEvent> - </bpmn2:subProcess> - <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.preProcessRequest(execution) -]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/> - <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask"/> - <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy"> - <bpmn2:incoming>siFoundYes</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_ScriptTask"/> - <bpmn2:endEvent id="EndEvent_2"> - <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming> - <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2"/> - </bpmn2:endEvent> - <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy"> - <bpmn2:incoming>siFoundNo</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.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_28</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing> - </bpmn2:callActivity> - <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck"/> - <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance"/> - <bpmn2:scriptTask id="validateUpdatePONetwork_ScriptTask" name="Validate Update PO Network" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateUpdatePONetwork_ScriptTask" targetRef="callRESTReQuery2NetworkID_ScriptTask"/> - <bpmn2:serviceTask id="callUpdateNetwork_ServiceTask" name="Call Update Network"> - <bpmn2:extensionElements> - <camunda:connector> - <camunda:connectorId>http-connector</camunda:connectorId> - <camunda:inputOutput> - <camunda:inputParameter name="payload">${UPDNETI_updateNetworkRequest}</camunda:inputParameter> - <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}/${UPDNETI_networkId}</camunda:inputParameter> - <camunda:inputParameter name="headers"> - <camunda:map> - <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry> - <camunda:entry key="content-type">application/xml</camunda:entry> - </camunda:map> - </camunda:inputParameter> - <camunda:inputParameter name="method">PUT</camunda:inputParameter> - <camunda:outputParameter name="UPDNETI_networkReturnCode">${statusCode}</camunda:outputParameter> - <camunda:outputParameter name="UPDNETI_updateNetworkResponse">${response}</camunda:outputParameter> - </camunda:inputOutput> - </camunda:connector> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="callUpdateNetwork_ServiceTask" targetRef="validateUpdatePONetwork_ScriptTask"/> - <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(execution) -]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callUpdateNetwork_ServiceTask"/> - <bpmn2:scriptTask id="callRESTQueryNetworkTableRef_ScriptTask" name="Call REST Query Network TableRef in AAI" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask"/> - <bpmn2:scriptTask id="callRESTReQuery1NetworkID_ScriptTask" name="Call REST ReQuery1 Network Id in AAI" scriptFormat="groovy"> - <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callRESTReQuery1NetworkID_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask"/> - <bpmn2:scriptTask id="callRESTQueryVpnBinding_ScriptTask" name="Call REST Query Vpn Binding in AAI" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask"/> - <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra() -UpdateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask"/> - <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity"/> - </bpmn2:process> - <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/> - <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/> - <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkInstanceInfra"> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="updateNetwork_startEvent"> - <dc:Bounds height="36.0" width="36.0" x="192.0" y="185.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="34.0" x="193.0" y="226.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="350.0" y="163.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61"> - <di:waypoint xsi:type="dc:Point" x="228.0" y="203.0"/> - <di:waypoint xsi:type="dc:Point" x="350.0" y="203.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="249.0" y="203.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateUpdatePONetwork_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1343.0" y="1311.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity"> - <dc:Bounds height="80.0" width="100.0" x="996.0" y="806.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callUpdateNetwork_ServiceTask"> - <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1176.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1343.0" y="276.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity"> - <dc:Bounds height="80.0" width="100.0" x="137.0" y="1395.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true"> - <dc:Bounds height="567.0" width="1122.0" x="17.0" y="585.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent"> - <dc:Bounds height="36.0" width="36.0" x="48.0" y="1040.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="67.0" x="33.0" y="1081.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="756.0" y="806.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds height="50.0" width="50.0" x="1523.0" y="520.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="125.0" x="1487.0" y="569.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124"> - <di:waypoint xsi:type="dc:Point" x="1573.0" y="545.0"/> - <di:waypoint xsi:type="dc:Point" x="1682.0" y="546.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="22.0" x="1577.0" y="546.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_336"> - <di:waypoint xsi:type="dc:Point" x="1523.0" y="545.0"/> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="545.0"/> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="576.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="29.0" x="1500.0" y="545.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="347.0" y="1392.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="792.0" y="1390.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask"> - <dc:Bounds height="80.0" width="100.0" x="564.0" y="1392.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent"> - <dc:Bounds height="36.0" width="36.0" x="1682.0" y="528.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="74.0" x="1663.0" y="569.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity"> - <dc:Bounds height="80.0" width="100.0" x="1341.0" y="395.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent"> - <dc:Bounds height="36.0" width="36.0" x="1323.0" y="434.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="82.0" x="1280.0" y="474.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19"> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="356.0"/> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="374.0"/> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="374.0"/> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="395.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1389.0" y="374.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131"> - <di:waypoint xsi:type="dc:Point" x="1441.0" y="435.0"/> - <di:waypoint xsi:type="dc:Point" x="1499.0" y="435.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1473.0" y="435.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21"> - <di:waypoint xsi:type="dc:Point" x="1323.0" y="447.0"/> - <di:waypoint xsi:type="dc:Point" x="1290.0" y="438.0"/> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127"> - <di:waypoint xsi:type="dc:Point" x="450.0" y="203.0"/> - <di:waypoint xsi:type="dc:Point" x="516.0" y="203.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="481.0" y="203.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="516.0" y="163.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90"> - <di:waypoint xsi:type="dc:Point" x="84.0" y="1058.0"/> - <di:waypoint xsi:type="dc:Point" x="131.0" y="1058.0"/> - <di:waypoint xsi:type="dc:Point" x="131.0" y="1057.0"/> - <di:waypoint xsi:type="dc:Point" x="161.0" y="1057.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="96.0" y="1058.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent"> - <dc:Bounds height="36.0" width="36.0" x="470.0" y="867.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="96.0" x="440.0" y="906.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3"> - <di:waypoint xsi:type="dc:Point" x="856.0" y="846.0"/> - <di:waypoint xsi:type="dc:Point" x="996.0" y="846.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="881.0" y="846.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1499.0" y="395.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67"> - <di:waypoint xsi:type="dc:Point" x="1549.0" y="475.0"/> - <di:waypoint xsi:type="dc:Point" x="1549.0" y="492.0"/> - <di:waypoint xsi:type="dc:Point" x="1548.0" y="492.0"/> - <di:waypoint xsi:type="dc:Point" x="1548.0" y="520.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1545.0" y="503.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80"> - <di:waypoint xsi:type="dc:Point" x="564.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="447.0" y="1432.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="528.0" y="1432.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4"> - <di:waypoint xsi:type="dc:Point" x="347.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="292.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="292.0" y="1435.0"/> - <di:waypoint xsi:type="dc:Point" x="237.0" y="1435.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="290.0" y="1512.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity"> - <dc:Bounds height="80.0" width="100.0" x="1190.0" y="384.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="984.0" y="100.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQuery2NetworkID_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1176.0" y="1390.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="984.0" y="1392.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135"> - <di:waypoint xsi:type="dc:Point" x="1176.0" y="1430.0"/> - <di:waypoint xsi:type="dc:Point" x="1118.0" y="1430.0"/> - <di:waypoint xsi:type="dc:Point" x="1118.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="1084.0" y="1432.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1143.0" y="1657.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86"> - <di:waypoint xsi:type="dc:Point" x="792.0" y="1430.0"/> - <di:waypoint xsi:type="dc:Point" x="691.0" y="1430.0"/> - <di:waypoint xsi:type="dc:Point" x="691.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="664.0" y="1432.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="773.0" y="1430.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ScriptTask_83"> - <di:waypoint xsi:type="dc:Point" x="984.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="926.0" y="1432.0"/> - <di:waypoint xsi:type="dc:Point" x="926.0" y="1430.0"/> - <di:waypoint xsi:type="dc:Point" x="892.0" y="1430.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="947.0" y="1432.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1341.0" y="688.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215"> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="768.0"/> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="810.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1388.0" y="781.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63"> - <di:waypoint xsi:type="dc:Point" x="1392.0" y="1256.0"/> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="1311.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1284.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1052.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83"> - <di:waypoint xsi:type="dc:Point" x="1392.0" y="1132.0"/> - <di:waypoint xsi:type="dc:Point" x="1392.0" y="1176.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1389.0" y="1159.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds height="50.0" width="50.0" x="161.0" y="1032.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="98.0" x="138.0" y="1092.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="isRollbackOn_YesNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_215"> - <di:waypoint xsi:type="dc:Point" x="186.0" y="1032.0"/> - <di:waypoint xsi:type="dc:Point" x="186.0" y="1004.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="29.0" x="186.0" y="1020.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="isRollbackOn_NoNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_InclusiveGateway_24"> - <di:waypoint xsi:type="dc:Point" x="211.0" y="1057.0"/> - <di:waypoint xsi:type="dc:Point" x="361.0" y="1057.0"/> - <di:waypoint xsi:type="dc:Point" x="361.0" y="1004.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="22.0" x="211.0" y="1062.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1341.0" y="810.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_335"> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="890.0"/> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="926.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1388.0" y="900.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6"> - <dc:Bounds height="50.0" width="50.0" x="336.0" y="954.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="361.0" y="1009.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds height="50.0" width="50.0" x="161.0" y="954.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="60.0" x="88.0" y="969.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_InclusiveGateway_24"> - <di:waypoint xsi:type="dc:Point" x="211.0" y="979.0"/> - <di:waypoint xsi:type="dc:Point" x="336.0" y="979.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="29.0" x="204.0" y="983.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_216"> - <di:waypoint xsi:type="dc:Point" x="186.0" y="954.0"/> - <di:waypoint xsi:type="dc:Point" x="186.0" y="884.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="22.0" x="191.0" y="933.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_216" bpmnElement="isNetworkOk_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds height="50.0" width="50.0" x="161.0" y="834.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="95.0" x="68.0" y="849.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_86" bpmnElement="isNetworkOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217"> - <di:waypoint xsi:type="dc:Point" x="211.0" y="859.0"/> - <di:waypoint xsi:type="dc:Point" x="273.0" y="859.0"/> - <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/> - <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="22.0" x="211.0" y="863.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_90" bpmnElement="isNetworkOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217"> - <di:waypoint xsi:type="dc:Point" x="186.0" y="834.0"/> - <di:waypoint xsi:type="dc:Point" x="186.0" y="781.0"/> - <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/> - <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="29.0" x="192.0" y="814.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds height="50.0" width="50.0" x="336.0" y="756.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="78.0" x="323.0" y="722.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261"> - <di:waypoint xsi:type="dc:Point" x="386.0" y="781.0"/> - <di:waypoint xsi:type="dc:Point" x="438.0" y="781.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="29.0" x="386.0" y="779.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_262"> - <di:waypoint xsi:type="dc:Point" x="361.0" y="806.0"/> - <di:waypoint xsi:type="dc:Point" x="362.0" y="845.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="22.0" x="366.0" y="806.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3"> - <dc:Bounds height="36.0" width="36.0" x="169.0" y="1536.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="187.0" y="1577.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177"> - <di:waypoint xsi:type="dc:Point" x="187.0" y="1475.0"/> - <di:waypoint xsi:type="dc:Point" x="187.0" y="1536.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="184.0" y="1475.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4"> - <dc:Bounds height="36.0" width="36.0" x="1028.0" y="924.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="1046.0" y="965.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178"> - <di:waypoint xsi:type="dc:Point" x="1046.0" y="886.0"/> - <di:waypoint xsi:type="dc:Point" x="1046.0" y="924.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1043.0" y="888.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79"> - <di:waypoint xsi:type="dc:Point" x="676.0" y="846.0"/> - <di:waypoint xsi:type="dc:Point" x="756.0" y="846.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="686.0" y="846.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1"> - <dc:Bounds height="80.0" width="100.0" x="576.0" y="806.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="576.0" y="940.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97"> - <di:waypoint xsi:type="dc:Point" x="626.0" y="940.0"/> - <di:waypoint xsi:type="dc:Point" x="626.0" y="886.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="623.0" y="927.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1200.0" y="100.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67"> - <di:waypoint xsi:type="dc:Point" x="1300.0" y="140.0"/> - <di:waypoint xsi:type="dc:Point" x="1394.0" y="140.0"/> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="259.0"/> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="276.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1314.0" y="140.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4"> - <dc:Bounds height="36.0" width="36.0" x="1581.0" y="377.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124"> - <di:waypoint xsi:type="dc:Point" x="1617.0" y="395.0"/> - <di:waypoint xsi:type="dc:Point" x="1700.0" y="394.0"/> - <di:waypoint xsi:type="dc:Point" x="1700.0" y="528.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1697.0" y="467.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask"> - <dc:Bounds height="79.0" width="100.0" x="438.0" y="742.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_262" bpmnElement="validateRollbacksResponse_ScriptTask_2"> - <dc:Bounds height="80.0" width="100.0" x="312.0" y="845.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24" targetElement="_BPMNShape_ScriptTask_218"> - <di:waypoint xsi:type="dc:Point" x="386.0" y="979.0"/> - <di:waypoint xsi:type="dc:Point" x="548.0" y="979.0"/> - <di:waypoint xsi:type="dc:Point" x="548.0" y="980.0"/> - <di:waypoint xsi:type="dc:Point" x="576.0" y="980.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="393.0" y="979.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261" targetElement="_BPMNShape_IntermediateThrowEvent_24"> - <di:waypoint xsi:type="dc:Point" x="488.0" y="820.0"/> - <di:waypoint xsi:type="dc:Point" x="488.0" y="867.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="485.0" y="847.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_ScriptTask_262"> - <di:waypoint xsi:type="dc:Point" x="470.0" y="885.0"/> - <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/> - <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/> - <di:waypoint xsi:type="dc:Point" x="412.0" y="885.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="448.0" y="885.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_262" targetElement="_BPMNShape_InclusiveGateway_24"> - <di:waypoint xsi:type="dc:Point" x="362.0" y="925.0"/> - <di:waypoint xsi:type="dc:Point" x="361.0" y="954.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="358.0" y="948.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134"> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="1391.0"/> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="1430.0"/> - <di:waypoint xsi:type="dc:Point" x="1310.0" y="1430.0"/> - <di:waypoint xsi:type="dc:Point" x="1276.0" y="1430.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1425.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true"> - <dc:Bounds height="188.0" width="394.0" x="21.0" y="381.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1"> - <dc:Bounds height="36.0" width="36.0" x="54.0" y="458.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="72.0" y="499.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1"> - <dc:Bounds height="80.0" width="100.0" x="169.0" y="436.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1"> - <dc:Bounds height="36.0" width="36.0" x="330.0" y="458.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="348.0" y="499.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270"> - <di:waypoint xsi:type="dc:Point" x="90.0" y="476.0"/> - <di:waypoint xsi:type="dc:Point" x="169.0" y="476.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="129.0" y="476.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220"> - <di:waypoint xsi:type="dc:Point" x="269.0" y="476.0"/> - <di:waypoint xsi:type="dc:Point" x="330.0" y="476.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="301.0" y="476.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance"> - <dc:Bounds height="80.0" width="100.0" x="686.0" y="163.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true"> - <dc:Bounds height="50.0" width="50.0" x="836.0" y="177.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="79.0" x="891.0" y="195.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244"> - <di:waypoint xsi:type="dc:Point" x="786.0" y="203.0"/> - <di:waypoint xsi:type="dc:Point" x="805.0" y="203.0"/> - <di:waypoint xsi:type="dc:Point" x="805.0" y="202.0"/> - <di:waypoint xsi:type="dc:Point" x="836.0" y="202.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="799.0" y="203.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_133"> - <di:waypoint xsi:type="dc:Point" x="861.0" y="177.0"/> - <di:waypoint xsi:type="dc:Point" x="861.0" y="140.0"/> - <di:waypoint xsi:type="dc:Point" x="910.0" y="140.0"/> - <di:waypoint xsi:type="dc:Point" x="984.0" y="140.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="29.0" x="868.0" y="157.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2"> - <dc:Bounds height="36.0" width="36.0" x="1155.0" y="278.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="0.0" width="0.0" x="1173.0" y="319.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound"> - <dc:Bounds height="80.0" width="100.0" x="984.0" y="256.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331"> - <di:waypoint xsi:type="dc:Point" x="861.0" y="227.0"/> - <di:waypoint xsi:type="dc:Point" x="861.0" y="296.0"/> - <di:waypoint xsi:type="dc:Point" x="984.0" y="296.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="22.0" width="22.0" x="871.0" y="233.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247"> - <di:waypoint xsi:type="dc:Point" x="1084.0" y="296.0"/> - <di:waypoint xsi:type="dc:Point" x="1155.0" y="296.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1103.0" y="296.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_245"> - <di:waypoint xsi:type="dc:Point" x="1084.0" y="140.0"/> - <di:waypoint xsi:type="dc:Point" x="1200.0" y="140.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1127.0" y="140.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_72"> - <di:waypoint xsi:type="dc:Point" x="616.0" y="203.0"/> - <di:waypoint xsi:type="dc:Point" x="686.0" y="203.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="632.0" y="203.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1341.0" y="926.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_335" targetElement="_BPMNShape_ScriptTask_157"> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="1006.0"/> - <di:waypoint xsi:type="dc:Point" x="1392.0" y="1052.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1388.0" y="1028.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_336" bpmnElement="callRESTReQuery1NetworkID_ScriptTask"> - <dc:Bounds height="80.0" width="100.0" x="1343.0" y="576.0"/> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_336" targetElement="_BPMNShape_ScriptTask_156"> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="656.0"/> - <di:waypoint xsi:type="dc:Point" x="1393.0" y="672.0"/> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="672.0"/> - <di:waypoint xsi:type="dc:Point" x="1391.0" y="688.0"/> - <bpmndi:BPMNLabel> - <dc:Bounds height="6.0" width="6.0" x="1390.0" y="666.0"/> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - </bpmndi:BPMNPlane> - </bpmndi:BPMNDiagram> -</bpmn2:definitions>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn index ecd23f0ca9..5488350afc 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn @@ -623,12 +623,12 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> <dc:Bounds x="1590" y="155" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true"> - <dc:Bounds x="25" y="610" width="1266" height="686" /> + <dc:Bounds x="31" y="608" width="1266" height="686" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent"> - <dc:Bounds x="101" y="1168" width="36" height="36" /> + <dc:Bounds x="107" y="1166" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="95" y="1209" width="50" height="12" /> + <dc:Bounds x="101" y="1207" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true"> @@ -675,10 +675,10 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50"> - <di:waypoint xsi:type="dc:Point" x="137" y="1186" /> - <di:waypoint xsi:type="dc:Point" x="164" y="1186" /> + <di:waypoint xsi:type="dc:Point" x="143" y="1184" /> + <di:waypoint xsi:type="dc:Point" x="170" y="1184" /> <bpmndi:BPMNLabel> - <dc:Bounds x="151" y="1171" width="0" height="0" /> + <dc:Bounds x="157" y="1169" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask"> @@ -795,46 +795,46 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="298" y="1062" width="50" height="50" /> + <dc:Bounds x="304" y="1060" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="242" y="1080" width="46" height="12" /> + <dc:Bounds x="248" y="1078" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215"> - <di:waypoint xsi:type="dc:Point" x="348" y="1087" /> - <di:waypoint xsi:type="dc:Point" x="451" y="1087" /> - <di:waypoint xsi:type="dc:Point" x="451" y="1161" /> + <di:waypoint xsi:type="dc:Point" x="354" y="1085" /> + <di:waypoint xsi:type="dc:Point" x="457" y="1085" /> + <di:waypoint xsi:type="dc:Point" x="457" y="1159" /> <bpmndi:BPMNLabel> - <dc:Bounds x="345" y="1090" width="18" height="12" /> + <dc:Bounds x="351" y="1088" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215"> - <di:waypoint xsi:type="dc:Point" x="323" y="1062" /> - <di:waypoint xsi:type="dc:Point" x="323" y="1005" /> + <di:waypoint xsi:type="dc:Point" x="329" y="1060" /> + <di:waypoint xsi:type="dc:Point" x="329" y="1003" /> <bpmndi:BPMNLabel> - <dc:Bounds x="333" y="1053" width="14" height="12" /> + <dc:Bounds x="339" y="1051" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="521" y="847" width="50" height="50" /> + <dc:Bounds x="527" y="845" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="579" y="860" width="72" height="24" /> + <dc:Bounds x="585" y="858" width="72" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261"> - <di:waypoint xsi:type="dc:Point" x="546" y="847" /> - <di:waypoint xsi:type="dc:Point" x="546" y="778" /> - <di:waypoint xsi:type="dc:Point" x="707" y="778" /> + <di:waypoint xsi:type="dc:Point" x="552" y="845" /> + <di:waypoint xsi:type="dc:Point" x="552" y="776" /> + <di:waypoint xsi:type="dc:Point" x="713" y="776" /> <bpmndi:BPMNLabel> - <dc:Bounds x="553" y="831" width="18" height="12" /> + <dc:Bounds x="559" y="829" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217"> - <di:waypoint xsi:type="dc:Point" x="545" y="896" /> - <di:waypoint xsi:type="dc:Point" x="545" y="980" /> - <di:waypoint xsi:type="dc:Point" x="707" y="980" /> + <di:waypoint xsi:type="dc:Point" x="551" y="894" /> + <di:waypoint xsi:type="dc:Point" x="551" y="978" /> + <di:waypoint xsi:type="dc:Point" x="713" y="978" /> <bpmndi:BPMNLabel> - <dc:Bounds x="553" y="897" width="14" height="12" /> + <dc:Bounds x="559" y="895" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask"> @@ -861,7 +861,7 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask"> - <dc:Bounds x="880" y="832" width="100" height="79" /> + <dc:Bounds x="886" y="830" width="100" height="79" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134"> <di:waypoint xsi:type="dc:Point" x="1507" y="1338" /> @@ -1074,24 +1074,24 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0f9d94i_di" bpmnElement="isSDNCActivate_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="298" y="955" width="50" height="50" /> + <dc:Bounds x="304" y="953" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="204" y="968" width="84" height="24" /> + <dc:Bounds x="210" y="966" width="84" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0cly7z2_di" bpmnElement="SequenceFlow_0cly7z2"> - <di:waypoint xsi:type="dc:Point" x="323" y="955" /> - <di:waypoint xsi:type="dc:Point" x="323" y="912" /> + <di:waypoint xsi:type="dc:Point" x="329" y="953" /> + <di:waypoint xsi:type="dc:Point" x="329" y="910" /> <bpmndi:BPMNLabel> - <dc:Bounds x="329" y="939" width="18" height="12" /> + <dc:Bounds x="335" y="937" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_12tlymf_di" bpmnElement="SequenceFlow_12tlymf"> - <di:waypoint xsi:type="dc:Point" x="348" y="980" /> - <di:waypoint xsi:type="dc:Point" x="451" y="980" /> - <di:waypoint xsi:type="dc:Point" x="451" y="897" /> + <di:waypoint xsi:type="dc:Point" x="354" y="978" /> + <di:waypoint xsi:type="dc:Point" x="457" y="978" /> + <di:waypoint xsi:type="dc:Point" x="457" y="895" /> <bpmndi:BPMNLabel> - <dc:Bounds x="344" y="990" width="14" height="12" /> + <dc:Bounds x="350" y="988" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_1ts3ph0_di" bpmnElement="isSdncRpc1_ExclusiveGateway1" isMarkerVisible="true"> @@ -1133,24 +1133,24 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_00dh41t_di" bpmnElement="isSdncRpc4_ExclusiveGateway4" isMarkerVisible="true"> - <dc:Bounds x="707" y="753" width="50" height="50" /> + <dc:Bounds x="713" y="751" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="701" y="712" width="76" height="24" /> + <dc:Bounds x="707" y="710" width="76" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0suu90e_di" bpmnElement="isSdncRpc4Yes_SequenceFlow4"> - <di:waypoint xsi:type="dc:Point" x="732" y="803" /> - <di:waypoint xsi:type="dc:Point" x="732" y="832" /> + <di:waypoint xsi:type="dc:Point" x="738" y="801" /> + <di:waypoint xsi:type="dc:Point" x="738" y="830" /> <bpmndi:BPMNLabel> - <dc:Bounds x="737" y="802" width="18" height="12" /> + <dc:Bounds x="743" y="800" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0xnyl6e_di" bpmnElement="isSdncRpc4No_SequenceFlow4"> - <di:waypoint xsi:type="dc:Point" x="757" y="778" /> - <di:waypoint xsi:type="dc:Point" x="930" y="778" /> - <di:waypoint xsi:type="dc:Point" x="930" y="832" /> + <di:waypoint xsi:type="dc:Point" x="763" y="776" /> + <di:waypoint xsi:type="dc:Point" x="936" y="776" /> + <di:waypoint xsi:type="dc:Point" x="936" y="830" /> <bpmndi:BPMNLabel> - <dc:Bounds x="766" y="757" width="14" height="12" /> + <dc:Bounds x="772" y="755" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_1gghe34_di" bpmnElement="isSdncRpc2_ExclusiveGateway2" isMarkerVisible="true"> @@ -1178,7 +1178,7 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> <dc:Bounds x="1312" y="395" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_19o9l99_di" bpmnElement="Task_0q6pzpn"> - <dc:Bounds x="682" y="832" width="100" height="80" /> + <dc:Bounds x="688" y="830" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1te02c4_di" bpmnElement="EndEvent_1te02c4"> <dc:Bounds x="467" y="1426" width="36" height="36" /> @@ -1187,9 +1187,9 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1kpt4kc_di" bpmnElement="EndEvent_1kpt4kc"> - <dc:Bounds x="1154" y="1077" width="36" height="36" /> + <dc:Bounds x="1160" y="1075" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1173" y="1113" width="0" height="0" /> + <dc:Bounds x="1179" y="1111" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0ti2ctu_di" bpmnElement="EndEvent_0ti2ctu"> @@ -1211,17 +1211,17 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> <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" /> + <dc:Bounds x="688" y="1053" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0b8j5rw_di" bpmnElement="SequenceFlow_0b8j5rw"> - <di:waypoint xsi:type="dc:Point" x="373" y="872" /> - <di:waypoint xsi:type="dc:Point" x="426" y="872" /> + <di:waypoint xsi:type="dc:Point" x="379" y="870" /> + <di:waypoint xsi:type="dc:Point" x="432" y="870" /> <bpmndi:BPMNLabel> - <dc:Bounds x="400" y="857" width="0" height="0" /> + <dc:Bounds x="406" y="855" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_17adm0m_di" bpmnElement="Task_1imzwi3"> - <dc:Bounds x="273" y="832" width="100" height="80" /> + <dc:Bounds x="279" y="830" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1ipz2ze_di" bpmnElement="SequenceFlow_1ipz2ze"> <di:waypoint xsi:type="dc:Point" x="1454" y="1578" /> @@ -1233,98 +1233,98 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_1u07hp7_di" bpmnElement="CallActivity_1u07hp7"> - <dc:Bounds x="835" y="1055" width="100" height="80" /> + <dc:Bounds x="841" y="1053" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0vzsyrd_di" bpmnElement="SequenceFlow_0vzsyrd"> - <di:waypoint xsi:type="dc:Point" x="935" y="1095" /> - <di:waypoint xsi:type="dc:Point" x="1001" y="1095" /> + <di:waypoint xsi:type="dc:Point" x="941" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="1007" y="1093" /> <bpmndi:BPMNLabel> - <dc:Bounds x="968" y="1080" width="0" height="0" /> + <dc:Bounds x="974" y="1078" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0bwpkkb_di" bpmnElement="SequenceFlow_0bwpkkb"> - <di:waypoint xsi:type="dc:Point" x="732" y="912" /> - <di:waypoint xsi:type="dc:Point" x="732" y="955" /> + <di:waypoint xsi:type="dc:Point" x="738" y="910" /> + <di:waypoint xsi:type="dc:Point" x="738" y="953" /> <bpmndi:BPMNLabel> - <dc:Bounds x="747" y="924" width="0" height="0" /> + <dc:Bounds x="753" y="922" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0lndbvr_di" bpmnElement="SequenceFlow_0lndbvr"> - <di:waypoint xsi:type="dc:Point" x="930" y="911" /> - <di:waypoint xsi:type="dc:Point" x="930" y="980" /> - <di:waypoint xsi:type="dc:Point" x="757" y="980" /> + <di:waypoint xsi:type="dc:Point" x="936" y="909" /> + <di:waypoint xsi:type="dc:Point" x="936" y="978" /> + <di:waypoint xsi:type="dc:Point" x="763" y="978" /> <bpmndi:BPMNLabel> - <dc:Bounds x="945" y="946" width="0" height="0" /> + <dc:Bounds x="951" y="944" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_096tad6_di" bpmnElement="SequenceFlow_096tad6"> - <di:waypoint xsi:type="dc:Point" x="782" y="1095" /> - <di:waypoint xsi:type="dc:Point" x="835" y="1095" /> + <di:waypoint xsi:type="dc:Point" x="788" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="841" y="1093" /> <bpmndi:BPMNLabel> - <dc:Bounds x="809" y="1080" width="0" height="0" /> + <dc:Bounds x="815" y="1078" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="TextAnnotation_1py1p84_di" bpmnElement="TextAnnotation_1py1p84"> - <dc:Bounds x="1030" y="903" width="252" height="119" /> + <dc:Bounds x="1036" y="901" width="252" height="119" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Association_0nketgd_di" bpmnElement="Association_0nketgd"> - <di:waypoint xsi:type="dc:Point" x="935" y="1071" /> - <di:waypoint xsi:type="dc:Point" x="1035" y="1022" /> + <di:waypoint xsi:type="dc:Point" x="941" y="1069" /> + <di:waypoint xsi:type="dc:Point" x="1041" y="1020" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_0w2ekuz_di" bpmnElement="ScriptTask_0w2ekuz"> - <dc:Bounds x="1001" y="1055" width="100" height="80" /> + <dc:Bounds x="1007" y="1053" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1qwubew_di" bpmnElement="SequenceFlow_1qwubew"> - <di:waypoint xsi:type="dc:Point" x="1101" y="1095" /> - <di:waypoint xsi:type="dc:Point" x="1154" y="1095" /> + <di:waypoint xsi:type="dc:Point" x="1107" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="1160" y="1093" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1128" y="1070" width="0" height="0" /> + <dc:Bounds x="1134" y="1068" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_1r7vhm5_di" bpmnElement="isRollbackOn_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="298" y="1161" width="50" height="50" /> + <dc:Bounds x="304" y="1159" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="284" y="1211" width="78" height="12" /> + <dc:Bounds x="290" y="1209" width="78" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_19kcbiw_di" bpmnElement="isRollbackOn_SequenceFlow_Yes"> - <di:waypoint xsi:type="dc:Point" x="323" y="1161" /> - <di:waypoint xsi:type="dc:Point" x="323" y="1112" /> + <di:waypoint xsi:type="dc:Point" x="329" y="1159" /> + <di:waypoint xsi:type="dc:Point" x="329" y="1110" /> <bpmndi:BPMNLabel> - <dc:Bounds x="331" y="1144" width="18" height="12" /> + <dc:Bounds x="337" y="1142" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0pl3e54_di" bpmnElement="isRollbackOn_SequenceFlow_No"> - <di:waypoint xsi:type="dc:Point" x="348" y="1186" /> - <di:waypoint xsi:type="dc:Point" x="426" y="1186" /> + <di:waypoint xsi:type="dc:Point" x="354" y="1184" /> + <di:waypoint xsi:type="dc:Point" x="432" y="1184" /> <bpmndi:BPMNLabel> - <dc:Bounds x="349" y="1192" width="14" height="12" /> + <dc:Bounds x="355" y="1190" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="InclusiveGateway_0zl5xa8_di" bpmnElement="ExclusiveGateway_1qb2vwe"> - <dc:Bounds x="707" y="955" width="50" height="50" /> + <dc:Bounds x="713" y="953" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="732" y="1005" width="0" height="0" /> + <dc:Bounds x="738" y="1003" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_15sffxc_di" bpmnElement="SequenceFlow_15sffxc"> - <di:waypoint xsi:type="dc:Point" x="732" y="1005" /> - <di:waypoint xsi:type="dc:Point" x="732" y="1055" /> + <di:waypoint xsi:type="dc:Point" x="738" y="1003" /> + <di:waypoint xsi:type="dc:Point" x="738" y="1053" /> <bpmndi:BPMNLabel> - <dc:Bounds x="747" y="1030" width="0" height="0" /> + <dc:Bounds x="753" y="1028" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="InclusiveGateway_0t3i8it_di" bpmnElement="ExclusiveGateway_1bk0tqd"> - <dc:Bounds x="426" y="847" width="50" height="50" /> + <dc:Bounds x="432" y="845" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="451" y="897" width="0" height="0" /> + <dc:Bounds x="457" y="895" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0k7y7b5_di" bpmnElement="SequenceFlow_0k7y7b5"> - <di:waypoint xsi:type="dc:Point" x="476" y="872" /> - <di:waypoint xsi:type="dc:Point" x="521" y="872" /> + <di:waypoint xsi:type="dc:Point" x="482" y="870" /> + <di:waypoint xsi:type="dc:Point" x="527" y="870" /> <bpmndi:BPMNLabel> - <dc:Bounds x="499" y="847" width="0" height="0" /> + <dc:Bounds x="505" y="845" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_0p3v749_di" bpmnElement="ScriptTask_0p3v749"> @@ -1338,17 +1338,17 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="InclusiveGateway_1eochiz_di" bpmnElement="ExclusiveGateway_1umhuft"> - <dc:Bounds x="426" y="1161" width="50" height="50" /> + <dc:Bounds x="432" y="1159" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="451" y="1211" width="0" height="0" /> + <dc:Bounds x="457" y="1209" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_17nx822_di" bpmnElement="SequenceFlow_17nx822"> - <di:waypoint xsi:type="dc:Point" x="476" y="1186" /> - <di:waypoint xsi:type="dc:Point" x="1051" y="1186" /> - <di:waypoint xsi:type="dc:Point" x="1051" y="1135" /> + <di:waypoint xsi:type="dc:Point" x="482" y="1184" /> + <di:waypoint xsi:type="dc:Point" x="1057" y="1184" /> + <di:waypoint xsi:type="dc:Point" x="1057" y="1133" /> <bpmndi:BPMNLabel> - <dc:Bounds x="764" y="1171" width="0" height="0" /> + <dc:Bounds x="770" y="1169" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="TextAnnotation_1orb6o6_di" bpmnElement="TextAnnotation_1orb6o6"> @@ -1359,20 +1359,20 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script> <di:waypoint xsi:type="dc:Point" x="1621" y="1278" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="TextAnnotation_0wjpv6r_di" bpmnElement="TextAnnotation_0wjpv6r"> - <dc:Bounds x="335" y="737" width="180" height="36" /> + <dc:Bounds x="341" y="735" width="180" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Association_0eolbkz_di" bpmnElement="Association_0eolbkz"> - <di:waypoint xsi:type="dc:Point" x="446" y="852" /> - <di:waypoint xsi:type="dc:Point" x="429" y="773" /> + <di:waypoint xsi:type="dc:Point" x="452" y="850" /> + <di:waypoint xsi:type="dc:Point" x="435" y="771" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_0j3058g_di" bpmnElement="ScriptTask_0j3058g"> - <dc:Bounds x="164" y="1146" width="100" height="80" /> + <dc:Bounds x="170" y="1144" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_10ttvwn_di" bpmnElement="SequenceFlow_10ttvwn"> - <di:waypoint xsi:type="dc:Point" x="264" y="1186" /> - <di:waypoint xsi:type="dc:Point" x="298" y="1186" /> + <di:waypoint xsi:type="dc:Point" x="270" y="1184" /> + <di:waypoint xsi:type="dc:Point" x="304" y="1184" /> <bpmndi:BPMNLabel> - <dc:Bounds x="281" y="1161" width="0" height="0" /> + <dc:Bounds x="287" y="1159" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn index a770c8c11a..19fd490b9f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn @@ -1,390 +1,431 @@ -<?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>
+<?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>
+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>
+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>
+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>
+def dcsi = new DoCreateServiceInstance() +dcsi.postProcessSDNCAssign(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="CallSDNCAdapterServiceTopologyAssign" name="Call SDNC Adapter Service Topology Assign" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="sdncAssignRequest" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="serviceInstanceId" target="mso-service-instance-id" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="sdncAdapterResponse" target="sdncAdapterResponse" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:endEvent id="EndEvent_3"> + <bpmn2:incoming>SequenceFlow_01q6pl4</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="getAAICustomerById_scriptTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterServiceTopologyAssign" /> + <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="CallSDNCAdapterServiceTopologyAssign" targetRef="PostProcessSDNCAssignRequest" /> + <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="CallActivity_1707jgc" /> + <bpmn2:callActivity id="callGenericGetService" name="Call GenericGetService" calledElement="GenericGetService"> + <bpmn2:extensionElements> + <camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" /> + <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" /> + <camunda:in sourceExpression="service-instance" target="GENGS_type" /> + <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" /> + <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:callActivity id="callGenericPutService" name="Call Generic Put Service" calledElement="GenericPutService"> + <bpmn2:extensionElements> + <camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" /> + <camunda:in source="serviceInstanceId" target="GENPS_serviceInstanceId" /> + <camunda:in source="subscriptionServiceType" target="GENPS_serviceType" /> + <camunda:in sourceExpression="service-instance" target="GENPS_type" /> + <camunda:in source="serviceInstanceData" target="GENPS_payload" /> + <camunda:out source="GENPS_SuccessIndicator" target="GENPS_SuccessIndicator" /> + <camunda:in source="msoRequestId" target="GENPS_requesId" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1w01tqs</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_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>
+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>
+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>
+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>
+def ddsi = new DoCreateServiceInstance() +ddsi.postProcessAAIPUT(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1dd86x8" sourceRef="ScriptTask_0q37vn9" targetRef="ExclusiveGateway_1nk6aol" /> + <bpmn2:callActivity id="CallActivity_1707jgc" name="Call GenericGetService2" calledElement="GenericGetService"> + <bpmn2:extensionElements> + <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" /> + <camunda:in sourceExpression="service-instance" target="GENGS_type" /> + <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" /> + <camunda:in source="subscriptionServiceType" target="GENGS_serviceType" /> + <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" /> + <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="GENGS_service" target="GENGS_service" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0tx5frq</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_0tx5frq" sourceRef="CallActivity_1707jgc" targetRef="ScriptTask_1tp0fcx" /> + <bpmn2:sequenceFlow id="SequenceFlow_01q6pl4" sourceRef="ScriptTask_1tp0fcx" targetRef="EndEvent_3" /> + <bpmn2:scriptTask id="ScriptTask_1tp0fcx" name="Post Process AAI GET2" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0tx5frq</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_01q6pl4</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DoCreateServiceInstance() +dcsi.postProcessAAIGET2(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="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="1115" y="1165" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1133" y="1206" 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="1024" y="944" /> + <di:waypoint xsi:type="dc:Point" x="1024" y="994" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1039" y="969" 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:BPMNShape id="CallActivity_1707jgc_di" bpmnElement="CallActivity_1707jgc"> + <dc:Bounds x="972" y="994" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0tx5frq_di" bpmnElement="SequenceFlow_0tx5frq"> + <di:waypoint xsi:type="dc:Point" x="1022" y="1074" /> + <di:waypoint xsi:type="dc:Point" x="1022" y="1143" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1037" y="1108.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01q6pl4_di" bpmnElement="SequenceFlow_01q6pl4"> + <di:waypoint xsi:type="dc:Point" x="1072" y="1183" /> + <di:waypoint xsi:type="dc:Point" x="1115" y="1183" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1094" y="1168" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1tp0fcx_di" bpmnElement="ScriptTask_1tp0fcx"> + <dc:Bounds x="972" y="1143" width="100" height="80" /> + </bpmndi:BPMNShape> + </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 80ace28ae7..6c24696cbd 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn @@ -1,338 +1,379 @@ -<?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>
+<?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>
+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>
+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_1njogr1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1n7wade</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1x9eh33</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1n7wade" name="no" sourceRef="ExclusiveGateway_0ii31dq" targetRef="PostProcess_ScriptTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_05wu9i7" sourceRef="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 Deactivate" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="sdncDeactivate" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="serviceInstanceId" target="mso-service-instance-id" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Deactivate" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0khjo7l</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.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>
+String response = execution.getVariable("sdncDeactivateResponse") +def rbk= new DoCreateServiceInstanceRollback() +rbk.validateSDNCResponse(execution, response, "deactivate")]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0khjo7l" sourceRef="ScriptTask_1uxr0cx" targetRef="CallActivity_0ppz9nd" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_19tbjgn" name="skip Rollback" default="SequenceFlow_06aasqh"> + <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_06aasqh</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1rzlaoy</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:scriptTask id="PostProcess_ScriptTask" name="Post Process Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_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>
+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>
+def rbk= new DoCreateServiceInstanceRollback() +rbk.processRollbackJavaException(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:endEvent id="EndEvent_12e3h6k"> + <bpmn2:incoming>SequenceFlow_1pjk2ff</bpmn2:incoming> + <bpmn2:terminateEventDefinition /> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1ch4xrf" name="" sourceRef="StartEvent_1gxe17c" targetRef="ScriptTask_15yddb0" /> + <bpmn2:sequenceFlow id="SequenceFlow_1pjk2ff" name="" sourceRef="ScriptTask_15yddb0" targetRef="EndEvent_12e3h6k" /> + </bpmn2:subProcess> + <bpmn2:scriptTask id="ScriptTask_1awt1ds" name="Post Process SDNC Delete"> + <bpmn2:incoming>SequenceFlow_006g9e8</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1njogr1</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +String response = execution.getVariable("sdncDeleteResponse") +def rbk= new DoCreateServiceInstanceRollback() +rbk.validateSDNCResponse(execution, response, "delete")]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="CallActivity_0ppz9nd" name="Call SDNC Service Topology Dekete" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="sdncDelete" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="serviceInstanceId" target="mso-service-instance-id" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0khjo7l</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_006g9e8</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_006g9e8" sourceRef="CallActivity_0ppz9nd" targetRef="ScriptTask_1awt1ds" /> + <bpmn2:sequenceFlow id="SequenceFlow_1njogr1" sourceRef="ScriptTask_1awt1ds" targetRef="ExclusiveGateway_0ii31dq" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstanceRollback"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSIRollback_startEvent"> + <dc:Bounds x="151" y="79" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="146" y="120" width="48" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask"> + <dc:Bounds x="234" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61"> + <di:waypoint xsi:type="dc:Point" x="187" y="97" /> + <di:waypoint xsi:type="dc:Point" x="234" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="211" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3"> + <dc:Bounds x="1208" y="350" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1226" y="391" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true"> + <dc:Bounds x="508" y="323" width="467" height="193" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1"> + <dc:Bounds x="576" y="389" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="594" y="430" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1"> + <dc:Bounds x="869" y="389" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="887" y="430" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269"> + <di:waypoint xsi:type="dc:Point" x="612" y="407" /> + <di:waypoint xsi:type="dc:Point" x="680" y="407" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="647" y="392" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61"> + <di:waypoint xsi:type="dc:Point" x="334" y="97" /> + <di:waypoint xsi:type="dc:Point" x="366" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="350" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="callGenericDeleteService"> + <dc:Bounds x="1167" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true"> + <dc:Bounds x="448" y="72" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="433" y="129" width="79" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb"> + <di:waypoint xsi:type="dc:Point" x="498" y="97" /> + <di:waypoint xsi:type="dc:Point" x="539" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="501" y="100" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a"> + <di:waypoint xsi:type="dc:Point" x="473" y="72" /> + <di:waypoint xsi:type="dc:Point" x="473" y="-23" /> + <di:waypoint xsi:type="dc:Point" x="1071" y="-23" /> + <di:waypoint xsi:type="dc:Point" x="1071" y="72" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="751" y="-41" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_0ii31dq_di" bpmnElement="ExclusiveGateway_0ii31dq" isMarkerVisible="true"> + <dc:Bounds x="1046" y="72" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1094" y="104" width="66" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1n7wade_di" bpmnElement="SequenceFlow_1n7wade"> + <di:waypoint xsi:type="dc:Point" x="1071" y="122" /> + <di:waypoint xsi:type="dc:Point" x="1071" y="241" /> + <di:waypoint xsi:type="dc:Point" x="1176" y="241" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1081" y="124.63709677419354" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_05wu9i7_di" bpmnElement="SequenceFlow_05wu9i7"> + <di:waypoint xsi:type="dc:Point" x="1217" y="137" /> + <di:waypoint xsi:type="dc:Point" x="1217" y="201" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1232" y="169" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1x9eh33_di" bpmnElement="SequenceFlow_1x9eh33"> + <di:waypoint xsi:type="dc:Point" x="1096" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1167" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1126" y="82" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0k28xib_di" bpmnElement="SequenceFlow_0k28xib"> + <di:waypoint xsi:type="dc:Point" x="639" y="97" /> + <di:waypoint xsi:type="dc:Point" x="671" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="655" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb"> + <dc:Bounds x="539" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx"> + <dc:Bounds x="671" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0khjo7l_di" bpmnElement="SequenceFlow_0khjo7l"> + <di:waypoint xsi:type="dc:Point" x="771" y="97" /> + <di:waypoint xsi:type="dc:Point" x="796" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="784" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_19tbjgn_di" bpmnElement="ExclusiveGateway_19tbjgn" isMarkerVisible="true"> + <dc:Bounds x="366" y="72" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="358" y="54" width="65" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1"> + <dc:Bounds x="680" y="367" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219"> + <di:waypoint xsi:type="dc:Point" x="780" y="407" /> + <di:waypoint xsi:type="dc:Point" x="869" y="407" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="825" y="392" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1wk55es_di" bpmnElement="PostProcess_ScriptTask"> + <dc:Bounds x="1176" y="201" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_01l4ssl_di" bpmnElement="SequenceFlow_01l4ssl"> + <di:waypoint xsi:type="dc:Point" x="1226" y="281" /> + <di:waypoint xsi:type="dc:Point" x="1226" y="350" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1241" y="315.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_06aasqh_di" bpmnElement="SequenceFlow_06aasqh"> + <di:waypoint xsi:type="dc:Point" x="416" y="97" /> + <di:waypoint xsi:type="dc:Point" x="448" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="426" y="82" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1rzlaoy_di" bpmnElement="SequenceFlow_1rzlaoy"> + <di:waypoint xsi:type="dc:Point" x="391" y="122" /> + <di:waypoint xsi:type="dc:Point" x="391" y="268" /> + <di:waypoint xsi:type="dc:Point" x="1176" y="267" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="397" y="195" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_11bi8mc_di" bpmnElement="SubProcess_11bi8mc" isExpanded="true"> + <dc:Bounds x="325" y="576" width="419" height="150" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1gxe17c_di" bpmnElement="StartEvent_1gxe17c"> + <dc:Bounds x="360" y="628" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="378" y="669" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_15yddb0_di" bpmnElement="ScriptTask_15yddb0"> + <dc:Bounds x="468" y="606" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_12e3h6k_di" bpmnElement="EndEvent_12e3h6k"> + <dc:Bounds x="618" y="628" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="636" y="669" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ch4xrf_di" bpmnElement="SequenceFlow_1ch4xrf"> + <di:waypoint xsi:type="dc:Point" x="396" y="646" /> + <di:waypoint xsi:type="dc:Point" x="468" y="646" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="421" y="646" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1pjk2ff_di" bpmnElement="SequenceFlow_1pjk2ff"> + <di:waypoint xsi:type="dc:Point" x="568" y="646" /> + <di:waypoint xsi:type="dc:Point" x="618" y="646" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="593" y="646" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1awt1ds_di" bpmnElement="ScriptTask_1awt1ds"> + <dc:Bounds x="921" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0ppz9nd_di" bpmnElement="CallActivity_0ppz9nd"> + <dc:Bounds x="796" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_006g9e8_di" bpmnElement="SequenceFlow_006g9e8"> + <di:waypoint xsi:type="dc:Point" x="896" y="97" /> + <di:waypoint xsi:type="dc:Point" x="921" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="909" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1njogr1_di" bpmnElement="SequenceFlow_1njogr1"> + <di:waypoint xsi:type="dc:Point" x="1021" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1046" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1034" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn index 5e88527676..8411c56bef 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn @@ -9,7 +9,7 @@ <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()
+DoCreateVnf createVnf = new DoCreateVnf() createVnf.preProcessRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="callGetService" /> @@ -42,7 +42,7 @@ exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found <bpmn2:outgoing>found</bpmn2:outgoing> </bpmn2:exclusiveGateway> <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceInstanceFound" targetRef="buildWorkflowException" /> - <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="serviceInstanceFound" targetRef="callGetVnf"> + <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="serviceInstanceFound" targetRef="ExclusiveGateway_0j73e7c"> <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true && execution.getVariable("GENGS_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> <bpmn2:exclusiveGateway id="vnfExist" name="Vnf Already Exist?" default="vnfExistYes"> @@ -64,7 +64,7 @@ exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> </bpmn2:extensionElements> - <bpmn2:incoming>found</bpmn2:incoming> + <bpmn2:incoming>VnfNameSpecified1</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing> </bpmn2:callActivity> <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="callGetVnf" targetRef="vnfExist" /> @@ -86,9 +86,10 @@ exceptionUtil.buildWorkflowException(execution, 5000, "Generic Vnf Already Exist </bpmn2:endEvent> <bpmn2:scriptTask id="prepareCreateGenericVnf" name="Prepare Create Vnf Payload" scriptFormat="groovy"> <bpmn2:incoming>vnfExistNo</bpmn2:incoming> + <bpmn2:incoming>VnfNameNotSpecified1</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-DoCreateVnf createVnf = new DoCreateVnf()
+DoCreateVnf createVnf = new DoCreateVnf() createVnf.prepareCreateGenericVnf(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareCreateGenericVnf" targetRef="callPutVnf" /> @@ -123,21 +124,20 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script> <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_2" targetRef="processJavaError" /> </bpmn2:subProcess> <bpmn2:endEvent id="EndEvent_3"> - <bpmn2:incoming>SequenceFlow_15z3gpq</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_0ay5l4b</bpmn2:incoming> + <bpmn2:incoming>SdncInteractionNotEnabled</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0bj7c4s</bpmn2:incoming> <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" /> </bpmn2:endEvent> <bpmn2:sequenceFlow id="SequenceFlow_1q6udwm" sourceRef="preProcessSDNCAssignRequest" targetRef="callSDNCAdapterVNFTopologyAssign" /> <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="callSDNCAdapterVNFTopologyAssign" targetRef="postProcessSDNCAssignRequest" /> - <bpmn2:sequenceFlow id="SequenceFlow_0c5h00o" sourceRef="postProcessSDNCAssignRequest" targetRef="preProcessSDNCActivateRequest" /> <bpmn2:sequenceFlow id="SequenceFlow_1lalmvp" sourceRef="preProcessSDNCActivateRequest" targetRef="callSDNCAdapterVNFTopologyActivate" /> <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="callSDNCAdapterVNFTopologyActivate" targetRef="postProcessSDNCActivateRequest" /> - <bpmn2:sequenceFlow id="SequenceFlow_15z3gpq" sourceRef="postProcessSDNCActivateRequest" targetRef="EndEvent_3" /> + <bpmn2:sequenceFlow id="SequenceFlow_15z3gpq" sourceRef="postProcessSDNCActivateRequest" targetRef="Task_053tb0h" /> <bpmn2:scriptTask id="preProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_0ttqcwx</bpmn2:incoming> + <bpmn2:incoming>SdncInteractionEnabled</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1q6udwm</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-DoCreateVnf createVnf = new DoCreateVnf()
+DoCreateVnf createVnf = new DoCreateVnf() createVnf.preProcessSDNCAssignRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:callActivity id="callSDNCAdapterVNFTopologyAssign" name="Call SDNC Adapter VNF Topology Assign" calledElement="sdncAdapter"> @@ -155,19 +155,20 @@ createVnf.preProcessSDNCAssignRequest(execution)]]></bpmn2:script> </bpmn2:callActivity> <bpmn2:scriptTask id="postProcessSDNCAssignRequest" name="PostProcess SDNC Assign Request" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0c5h00o</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-
-String response = execution.getVariable("DoCVNF_assignSDNCAdapterResponse")
-
-def createVnfInfra = new DoCreateVnf()
+ <bpmn2:outgoing>SequenceFlow_0lnh79j</bpmn2:outgoing> + +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:incoming>SequenceFlow_1q1poly</bpmn2:incoming> + <bpmn2:incoming>VnfNameSpecified2</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1lalmvp</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-DoCreateVnf createVnf = new DoCreateVnf()
+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,30 +188,102 @@ createVnf.preProcessSDNCActivateRequest(execution)]]></bpmn2:script> <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()
+ +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:exclusiveGateway id="ExclusiveGateway_045rm8i" name="Is SDNC Interaction Enabled?" default="SdncInteractionNotEnabled"> <bpmn2:incoming>SequenceFlow_1gc18ih</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0ttqcwx</bpmn2:outgoing> - <bpmn2:outgoing>SequenceFlow_0ay5l4b</bpmn2:outgoing> + <bpmn2:outgoing>SdncInteractionEnabled</bpmn2:outgoing> + <bpmn2:outgoing>SdncInteractionNotEnabled</bpmn2:outgoing> </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="SequenceFlow_0ttqcwx" name="yes" sourceRef="ExclusiveGateway_045rm8i" targetRef="preProcessSDNCAssignRequest"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion" ) == '1707'}]]></bpmn2:conditionExpression> + <bpmn2:sequenceFlow id="SdncInteractionEnabled" name="Yes" sourceRef="ExclusiveGateway_045rm8i" targetRef="preProcessSDNCAssignRequest"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoCVNF_sdncVersion" ) != '1702'}]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="SequenceFlow_0ay5l4b" name="no" sourceRef="ExclusiveGateway_045rm8i" targetRef="EndEvent_3" /> + <bpmn2:sequenceFlow id="SdncInteractionNotEnabled" 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()
+DoCreateVnf createVnf = new DoCreateVnf() createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script> </bpmn2:scriptTask> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0j73e7c" name="Vnf-name specified?" default="VnfNameSpecified1"> + <bpmn2:incoming>found</bpmn2:incoming> + <bpmn2:outgoing>VnfNameNotSpecified1</bpmn2:outgoing> + <bpmn2:outgoing>VnfNameSpecified1</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="VnfNameNotSpecified1" name="No" sourceRef="ExclusiveGateway_0j73e7c" targetRef="prepareCreateGenericVnf"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoCVNF_vnfName" ) == null}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="VnfNameSpecified1" name="Yes" sourceRef="ExclusiveGateway_0j73e7c" targetRef="callGetVnf" /> + <bpmn2:sequenceFlow id="SequenceFlow_1h9jdgr" sourceRef="PreProcessSDNCGetRequest" targetRef="CallSDNCAdapterVNFTopologyGet" /> + <bpmn2:sequenceFlow id="SequenceFlow_14xac2y" sourceRef="CallSDNCAdapterVNFTopologyGet" targetRef="PostProcessSDNCGetRequest" /> + <bpmn2:sequenceFlow id="SequenceFlow_1q1poly" sourceRef="PostProcessSDNCGetRequest" targetRef="preProcessSDNCActivateRequest" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0qnhlm1" name="Vnf-name specified?" default="VnfNameSpecified2"> + <bpmn2:incoming>SequenceFlow_0lnh79j</bpmn2:incoming> + <bpmn2:outgoing>VnfNameNotSpecified2</bpmn2:outgoing> + <bpmn2:outgoing>VnfNameSpecified2</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0lnh79j" sourceRef="postProcessSDNCAssignRequest" targetRef="ExclusiveGateway_0qnhlm1" /> + <bpmn2:sequenceFlow id="VnfNameNotSpecified2" name="No" sourceRef="ExclusiveGateway_0qnhlm1" targetRef="PreProcessSDNCGetRequest"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoCVNF_vnfName" ) == null}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="VnfNameSpecified2" name="Yes" sourceRef="ExclusiveGateway_0qnhlm1" targetRef="preProcessSDNCActivateRequest" /> + <bpmn2:scriptTask id="PreProcessSDNCGetRequest" name="PreProcess SDNC Get Request" scriptFormat="groovy"> + <bpmn2:incoming>VnfNameNotSpecified2</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1h9jdgr</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +DoCreateVnf createVnf = new DoCreateVnf() +createVnf.preProcessSDNCGetRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="CallSDNCAdapterVNFTopologyGet" name="Call SDNC Adapter VNF Topology Get" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="DoCVNF_getSDNCRequest" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="sdncAdapterResponse" target="DoCVNF_getSDNCAdapterResponse" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1h9jdgr</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_14xac2y</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:scriptTask id="PostProcessSDNCGetRequest" name="PostProcess SDNC Get Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_14xac2y</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1q1poly</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* + +String response = execution.getVariable("DoCVNF_getSDNCAdapterResponse") + +def createVnfInfra = new DoCreateVnf() +createVnfInfra.validateSDNCResponse(execution, response, "get")]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0bj7c4s" sourceRef="UpdateAAIOrchestrationStatus" targetRef="EndEvent_3" /> + <bpmn2:callActivity id="UpdateAAIOrchestrationStatus" name="Update AAI Orchestration Status to Active" calledElement="UpdateAAIGenericVnf"> + <bpmn2:extensionElements> + <camunda:in source="DoCVNF_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-id" target="mso-service-id" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0nhsdmj</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0bj7c4s</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_0nhsdmj" sourceRef="Task_053tb0h" targetRef="UpdateAAIOrchestrationStatus" /> + <bpmn2:scriptTask id="Task_053tb0h" name="Prepare Update AAI Generic VNF" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_15z3gpq</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0nhsdmj</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def doCreateVnf = new DoCreateVnf() +doCreateVnf.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script> + </bpmn2:scriptTask> </bpmn2:process> <bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" /> <bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> @@ -243,27 +316,27 @@ createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script> <dc:Bounds x="406" y="200" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="serviceInstanceFound" isMarkerVisible="true"> - <dc:Bounds x="642" y="214" width="50" height="50" /> + <dc:Bounds x="552" y="215" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="678" y="244" width="148" height="22" /> + <dc:Bounds x="536" y="267" width="82" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229"> <di:waypoint xsi:type="dc:Point" x="506" y="240" /> - <di:waypoint xsi:type="dc:Point" x="642" y="239" /> + <di:waypoint xsi:type="dc:Point" x="552" y="240" /> <bpmndi:BPMNLabel> - <dc:Bounds x="574" y="224.5" width="0" height="0" /> + <dc:Bounds x="529" y="225" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException"> <dc:Bounds x="720" y="115" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293"> - <di:waypoint xsi:type="dc:Point" x="667" y="214" /> - <di:waypoint xsi:type="dc:Point" x="667" y="155" /> + <di:waypoint xsi:type="dc:Point" x="577" y="215" /> + <di:waypoint xsi:type="dc:Point" x="577" y="155" /> <di:waypoint xsi:type="dc:Point" x="720" y="155" /> <bpmndi:BPMNLabel> - <dc:Bounds x="666" y="174" width="22" height="22" /> + <dc:Bounds x="580" y="174.4237288135593" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1"> @@ -280,11 +353,10 @@ createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_CallActivity_60"> - <di:waypoint xsi:type="dc:Point" x="667" y="264" /> - <di:waypoint xsi:type="dc:Point" x="667" y="328" /> - <di:waypoint xsi:type="dc:Point" x="720" y="328" /> + <di:waypoint xsi:type="dc:Point" x="602" y="240" /> + <di:waypoint xsi:type="dc:Point" x="646" y="240" /> <bpmndi:BPMNLabel> - <dc:Bounds x="666" y="282" width="29" height="22" /> + <dc:Bounds x="614" y="216.01288698145387" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="callGetVnf"> @@ -339,9 +411,9 @@ createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3"> - <dc:Bounds x="1126" y="537" width="36" height="36" /> + <dc:Bounds x="1765" y="537" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1144" y="578" width="0" height="0" /> + <dc:Bounds x="1783" y="578" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300" targetElement="_BPMNShape_CallActivity_61"> @@ -400,32 +472,25 @@ createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script> <dc:Bounds x="470" y="540" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o"> - <di:waypoint xsi:type="dc:Point" x="593" y="555" /> - <di:waypoint xsi:type="dc:Point" x="640" y="555" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="617" y="540" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1lalmvp_di" bpmnElement="SequenceFlow_1lalmvp"> - <di:waypoint xsi:type="dc:Point" x="740" y="555" /> - <di:waypoint xsi:type="dc:Point" x="794" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1100" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1156" y="555" /> <bpmndi:BPMNLabel> - <dc:Bounds x="767" y="540" width="0" height="0" /> + <dc:Bounds x="1128" y="540" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb"> - <di:waypoint xsi:type="dc:Point" x="894" y="555" /> - <di:waypoint xsi:type="dc:Point" x="949" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1256" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1304" y="555" /> <bpmndi:BPMNLabel> - <dc:Bounds x="922" y="540" width="0" height="0" /> + <dc:Bounds x="1280" y="540" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_15z3gpq_di" bpmnElement="SequenceFlow_15z3gpq"> - <di:waypoint xsi:type="dc:Point" x="1049" y="555" /> - <di:waypoint xsi:type="dc:Point" x="1126" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1404" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1445" y="555" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1088" y="540" width="0" height="0" /> + <dc:Bounds x="1425" y="540" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_01h1rx2_di" bpmnElement="preProcessSDNCAssignRequest"> @@ -438,36 +503,37 @@ createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script> <dc:Bounds x="493" y="515" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1rr2xrc_di" bpmnElement="preProcessSDNCActivateRequest"> - <dc:Bounds x="640" y="515" width="100" height="80" /> + <dc:Bounds x="1000" y="515" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="callSDNCAdapterVNFTopologyActivate"> - <dc:Bounds x="794" y="515" width="100" height="80" /> + <dc:Bounds x="1156" y="515" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCActivateRequest"> - <dc:Bounds x="949" y="515" width="100" height="80" /> + <dc:Bounds x="1304" y="515" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_045rm8i_di" bpmnElement="ExclusiveGateway_045rm8i" isMarkerVisible="true"> - <dc:Bounds x="1336" y="215" width="50" height="50" /> + <dc:Bounds x="1758" y="215" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1334" y="163" width="54" height="36" /> + <dc:Bounds x="1756" y="163" width="54" height="36" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ttqcwx_di" bpmnElement="SequenceFlow_0ttqcwx"> - <di:waypoint xsi:type="dc:Point" x="1361" y="265" /> - <di:waypoint xsi:type="dc:Point" x="1361" y="475" /> + <bpmndi:BPMNEdge id="SequenceFlow_0ttqcwx_di" bpmnElement="SdncInteractionEnabled"> + <di:waypoint xsi:type="dc:Point" x="1783" y="265" /> + <di:waypoint xsi:type="dc:Point" x="1783" y="475" /> <di:waypoint xsi:type="dc:Point" x="106" y="475" /> <di:waypoint xsi:type="dc:Point" x="106" y="555" /> <di:waypoint xsi:type="dc:Point" x="206" y="555" /> <bpmndi:BPMNLabel> - <dc:Bounds x="726" y="460" width="18" height="12" /> + <dc:Bounds x="941" y="460" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0ay5l4b_di" bpmnElement="SequenceFlow_0ay5l4b"> - <di:waypoint xsi:type="dc:Point" x="1361" y="265" /> - <di:waypoint xsi:type="dc:Point" x="1361" y="555" /> - <di:waypoint xsi:type="dc:Point" x="1162" y="555" /> + <bpmndi:BPMNEdge id="SequenceFlow_0ay5l4b_di" bpmnElement="SdncInteractionNotEnabled"> + <di:waypoint xsi:type="dc:Point" x="1783" y="265" /> + <di:waypoint xsi:type="dc:Point" x="1783" y="401" /> + <di:waypoint xsi:type="dc:Point" x="1783" y="401" /> + <di:waypoint xsi:type="dc:Point" x="1783" y="537" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1400" y="398" width="12" height="12" /> + <dc:Bounds x="1812" y="431.09791911764705" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0seif8n_di" bpmnElement="SequenceFlow_0seif8n"> @@ -479,14 +545,114 @@ createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script> </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" /> + <di:waypoint xsi:type="dc:Point" x="1758" y="240" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1325" y="225" width="0" height="0" /> + <dc:Bounds x="1536" 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:BPMNShape id="ExclusiveGateway_0j73e7c_di" bpmnElement="ExclusiveGateway_0j73e7c" isMarkerVisible="true"> + <dc:Bounds x="646" y="215" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="653" y="184" width="51" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0k2oavy_di" bpmnElement="VnfNameNotSpecified1"> + <di:waypoint xsi:type="dc:Point" x="696" y="240" /> + <di:waypoint xsi:type="dc:Point" x="935" y="240" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="809" y="215" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1pwgmrg_di" bpmnElement="VnfNameSpecified1"> + <di:waypoint xsi:type="dc:Point" x="671" y="265" /> + <di:waypoint xsi:type="dc:Point" x="671" y="328" /> + <di:waypoint xsi:type="dc:Point" x="720" y="328" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="677" y="286.5" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1h9jdgr_di" bpmnElement="SequenceFlow_1h9jdgr"> + <di:waypoint xsi:type="dc:Point" x="777" y="693" /> + <di:waypoint xsi:type="dc:Point" x="799" y="693" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="788" y="678" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_14xac2y_di" bpmnElement="SequenceFlow_14xac2y"> + <di:waypoint xsi:type="dc:Point" x="899" y="693" /> + <di:waypoint xsi:type="dc:Point" x="926" y="693" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="913" y="678" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1q1poly_di" bpmnElement="SequenceFlow_1q1poly"> + <di:waypoint xsi:type="dc:Point" x="1026" y="693" /> + <di:waypoint xsi:type="dc:Point" x="1050" y="693" /> + <di:waypoint xsi:type="dc:Point" x="1050" y="595" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1038" y="678" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_0qnhlm1_di" bpmnElement="ExclusiveGateway_0qnhlm1" isMarkerVisible="true"> + <dc:Bounds x="625" y="530" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="624" y="495" width="51" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0lnh79j_di" bpmnElement="SequenceFlow_0lnh79j"> + <di:waypoint xsi:type="dc:Point" x="593" y="555" /> + <di:waypoint xsi:type="dc:Point" x="625" y="555" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="609" y="530" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1mh1y3w_di" bpmnElement="VnfNameNotSpecified2"> + <di:waypoint xsi:type="dc:Point" x="650" y="580" /> + <di:waypoint xsi:type="dc:Point" x="650" y="693" /> + <di:waypoint xsi:type="dc:Point" x="677" y="693" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="626" y="622" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_175qbtt_di" bpmnElement="VnfNameSpecified2"> + <di:waypoint xsi:type="dc:Point" x="675" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1000" y="555" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="829" y="530" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1cpb0sg_di" bpmnElement="PreProcessSDNCGetRequest"> + <dc:Bounds x="677" y="653" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0h8tpji_di" bpmnElement="CallSDNCAdapterVNFTopologyGet"> + <dc:Bounds x="799" y="653" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1orism0_di" bpmnElement="PostProcessSDNCGetRequest"> + <dc:Bounds x="926" y="653" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0bj7c4s_di" bpmnElement="SequenceFlow_0bj7c4s"> + <di:waypoint xsi:type="dc:Point" x="1700" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1765" y="555" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1733" y="540" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0a4a9lx_di" bpmnElement="UpdateAAIOrchestrationStatus"> + <dc:Bounds x="1600" y="515" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0nhsdmj_di" bpmnElement="SequenceFlow_0nhsdmj"> + <di:waypoint xsi:type="dc:Point" x="1545" y="555" /> + <di:waypoint xsi:type="dc:Point" x="1600" y="555" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1573" y="540" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0aonzix_di" bpmnElement="Task_053tb0h"> + <dc:Bounds x="1445" y="515" width="100" height="80" /> + </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn index 433957572d..be54119bda 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn @@ -13,7 +13,7 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script> </bpmn:scriptTask> <bpmn:callActivity id="CreateBaseVfModule" name="Create Base VF Module" calledElement="DoCreateVfModule"> <bpmn:extensionElements> - <camunda:in source="requestId" target="requestId" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> <camunda:in source="disableRollback" target="disableRollback" /> <camunda:in source="vnfType" target="vnfType" /> @@ -36,6 +36,9 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script> <camunda:in source="vnfModelInfo" target="vnfModelInfo" /> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" /> + <camunda:in source="tenantId" target="tenantId" /> + <camunda:in source="false" target="usePreload" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1hf7k7q</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1ixcnb6</bpmn:outgoing> @@ -44,7 +47,7 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script> <bpmn:sequenceFlow id="SequenceFlow_1xd3ri5" sourceRef="PreProcessRequest" targetRef="CreateVNF" /> <bpmn:callActivity id="CreateAddOnVfModule" name="Create Add-On VF Module" calledElement="DoCreateVfModule"> <bpmn:extensionElements> - <camunda:in source="requestId" target="requestId" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> <camunda:in source="disableRollback" target="disableRollback" /> <camunda:in source="vnfType" target="vnfType" /> @@ -67,6 +70,9 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script> <camunda:in source="vnfModelInfo" target="vnfModelInfo" /> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" /> + <camunda:in source="tenantId" target="tenantId" /> + <camunda:in source="false" target="usePreload" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1lh21yl</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1llbx0k</bpmn:outgoing> @@ -97,7 +103,7 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script> <bpmn:sequenceFlow id="SequenceFlow_132bohl" name="No" sourceRef="ExclusiveGateway_1vyqr5o" targetRef="EndEvent_0v6povc" /> <bpmn:callActivity id="CreateVNF" name="Create VNF" calledElement="DoCreateVnf"> <bpmn:extensionElements> - <camunda:in source="requestId" target="requestId" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> <camunda:in source="disableRollback" target="disableRollback" /> <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> @@ -105,7 +111,6 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script> <camunda:in source="vnfType" target="vnfType" /> <camunda:in source="vnfName" target="vnfName" /> <camunda:in source="vnfId" target="vnfId" /> - <camunda:in source="cloudConfiguration" target="cloudConfiguration" /> <camunda:in source="vnfInputParameters" target="vnfInputParameters" /> <camunda:in source="productFamilyId" target="productFamilyId" /> <camunda:out source="vnfId" target="vnfId" /> @@ -115,6 +120,9 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script> <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:out source="vnfName" target="vnfName" /> + <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" /> + <camunda:in source="tenantId" target="tenantId" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1xd3ri5</bpmn:incoming> <bpmn:outgoing>SequenceFlow_08i3uo6</bpmn:outgoing> @@ -141,10 +149,10 @@ doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script> <bpmn:outgoing>SequenceFlow_1vrogpr</bpmn:outgoing> </bpmn:exclusiveGateway> <bpmn:sequenceFlow id="SequenceFlow_0jz6bqn" name="yes" sourceRef="ExclusiveGateway_1vyqr5o" targetRef="PreProcessAddOnModule"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[![CDATA[#{execution.getVariable("addOnModulesDeployed") < execution.getVariable("addOnModulesToDeploy")}]]]]></bpmn:conditionExpression> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("addOnModulesDeployed") < execution.getVariable("addOnModulesToDeploy")}]]></bpmn:conditionExpression> </bpmn:sequenceFlow> <bpmn:sequenceFlow id="SequenceFlow_0kld3qt" name="yes" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="GenerateAddOnModuleName"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[![CDATA[#{execution.getVariable("instancesOfThisModuleDeployed") < execution.getVariable("initialCount")}]]]]></bpmn:conditionExpression> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("instancesOfThisModuleDeployed") < execution.getVariable("initialCount")}]]></bpmn:conditionExpression> </bpmn:sequenceFlow> <bpmn:sequenceFlow id="SequenceFlow_1mguf2m" sourceRef="Task_1lfmdks" targetRef="ExclusiveGateway_1hx9s0y" /> <bpmn:sequenceFlow id="SequenceFlow_1vrogpr" name="no" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="FinishProcessingInitialCountDeployment" /> @@ -159,6 +167,7 @@ doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script> <camunda:in source="basePersonaModelId" target="personaModelId" /> <camunda:out source="vfModuleName" target="baseVfModuleName" /> <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1ifw9tw</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1hf7k7q</bpmn:outgoing> @@ -171,6 +180,7 @@ doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script> <camunda:in source="addOnPersonaModelId" target="personaModelId" /> <camunda:out source="vfModuleName" target="addOnVfModuleName" /> <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_0kld3qt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1lh21yl</bpmn:outgoing> @@ -193,7 +203,27 @@ doCreateVnfAndModules.finisthProcessingInitialCountDeployment(execution)]]></bpm def doCreateVnfAndModules = new DoCreateVnfAndModules() doCreateVnfAndModules.validateBaseModule(execution)]]></bpmn:script> </bpmn:scriptTask> + <bpmn:subProcess id="SubProcess_1ktx0cx" name="Java Exception Handling Sub Process" triggeredByEvent="true"> + <bpmn:scriptTask id="processJavaError" name="Process Error" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_11bmhi4</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1kjlzrn</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* +ExceptionUtil exceptionUtil = new ExceptionUtil() +exceptionUtil.processJavaException(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:endEvent id="EndEvent_2"> + <bpmn:incoming>SequenceFlow_1kjlzrn</bpmn:incoming> + </bpmn:endEvent> + <bpmn:startEvent id="StartEvent_2"> + <bpmn:outgoing>SequenceFlow_11bmhi4</bpmn:outgoing> + <bpmn:errorEventDefinition errorRef="Error_1" /> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_11bmhi4" name="" sourceRef="StartEvent_2" targetRef="processJavaError" /> + <bpmn:sequenceFlow id="SequenceFlow_1kjlzrn" name="" sourceRef="processJavaError" targetRef="EndEvent_2" /> + </bpmn:subProcess> </bpmn:process> + <bpmn:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" /> + <bpmn:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModules"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"> @@ -374,6 +404,38 @@ doCreateVnfAndModules.validateBaseModule(execution)]]></bpmn:script> <bpmndi:BPMNShape id="ScriptTask_1obevnp_di" bpmnElement="Task_054rz9i"> <dc:Bounds x="1030" y="125" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_1ktx0cx_di" bpmnElement="SubProcess_1ktx0cx" isExpanded="true"> + <dc:Bounds x="208" y="438" width="313" height="169" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1j93kr8_di" bpmnElement="processJavaError"> + <dc:Bounds x="316" y="484" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1s63ccl_di" bpmnElement="EndEvent_2"> + <dc:Bounds x="461" y="506" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="479" y="547" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_028j51v_di" bpmnElement="StartEvent_2"> + <dc:Bounds x="233" y="506" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="251" y="547" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_11bmhi4_di" bpmnElement="SequenceFlow_11bmhi4"> + <di:waypoint xsi:type="dc:Point" x="269" y="524" /> + <di:waypoint xsi:type="dc:Point" x="316" y="524" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="290" y="524" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1kjlzrn_di" bpmnElement="SequenceFlow_1kjlzrn"> + <di:waypoint xsi:type="dc:Point" x="416" y="524" /> + <di:waypoint xsi:type="dc:Point" x="461" y="524" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="436" y="524" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn index 9d21cc8301..49274bd8a6 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn @@ -1,332 +1,373 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.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>
+<?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="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>
+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_0riudmc</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0znbzxu</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 Deactivate" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="sdncDeactivate" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="serviceInstanceId" target="mso-service-instance-id" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0rtflal</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Deactivate" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1w8ao21</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.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>
+ +String response = execution.getVariable("sdncDeactivateResponse") +def ddsi = new DoDeleteServiceInstance() +ddsi.postProcessSDNCDelete(execution, response, "deactivate")]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0jfgn05" sourceRef="deleteSI_startEven" targetRef="preProcessRequest_ScriptTask" /> + <bpmn2:scriptTask id="ScriptTask_0xxwbdq" name="PreProcess SDNC Delete" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1dwch0k</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_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>
+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="CallActivity_1c5wru8" /> + <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>
+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>
+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>
+ExceptionUtil ex = new ExceptionUtil() +ex.processJavaException(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0u33vy6" name="" sourceRef="StartEvent_1antv0y" targetRef="ScriptTask_1va95un" /> + <bpmn2:sequenceFlow id="SequenceFlow_0hevfee" name="" sourceRef="ScriptTask_1va95un" targetRef="EndEvent_03iywf6" /> + </bpmn2:subProcess> + <bpmn2:callActivity id="CallActivity_1c5wru8" name="Call SDNC Service Topology Delete" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="sdncDelete" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="serviceInstanceId" target="mso-service-instance-id" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1w8ao21</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_14x55db</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:scriptTask id="ScriptTask_0lc115e" name="Post Process SDNC Delete" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_14x55db</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0znbzxu</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* + +String response = execution.getVariable("sdncDeleteResponse") +def ddsi = new DoDeleteServiceInstance() +ddsi.postProcessSDNCDelete(execution, response, "delete")]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_14x55db" sourceRef="CallActivity_1c5wru8" targetRef="ScriptTask_0lc115e" /> + <bpmn2:sequenceFlow id="SequenceFlow_0znbzxu" sourceRef="ScriptTask_0lc115e" targetRef="callGenericDeleteService" /> + </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="1202" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_05wu9i7_di" bpmnElement="SequenceFlow_05wu9i7"> + <di:waypoint xsi:type="dc:Point" x="1302" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1352" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1327" 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="738" y="97" /> + <di:waypoint xsi:type="dc:Point" x="776" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="757" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb"> + <dc:Bounds x="638" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx"> + <dc:Bounds x="776" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0jfgn05_di" bpmnElement="SequenceFlow_0jfgn05"> + <di:waypoint xsi:type="dc:Point" x="-298" y="97" /> + <di:waypoint xsi:type="dc:Point" x="-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="492" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0rtflal_di" bpmnElement="SequenceFlow_0rtflal"> + <di:waypoint xsi:type="dc:Point" x="592" y="97" /> + <di:waypoint xsi:type="dc:Point" x="638" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="615" 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="403" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="384" y="99" width="18" height="12" /> + </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="876" y="97" /> + <di:waypoint xsi:type="dc:Point" x="917" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="897" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_1mrh7us_di" bpmnElement="ExclusiveGateway_1mrh7us" isMarkerVisible="true"> + <dc:Bounds x="403" y="72" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="390" y="122" width="75" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0riudmc_di" bpmnElement="SequenceFlow_0riudmc"> + <di:waypoint xsi:type="dc:Point" x="428" y="72" /> + <di:waypoint xsi:type="dc:Point" x="428" y="-20" /> + <di:waypoint xsi:type="dc:Point" x="1252" y="-20" /> + <di:waypoint xsi:type="dc:Point" x="1252" y="57" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="834" y="-35" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1dwch0k_di" bpmnElement="SequenceFlow_1dwch0k"> + <di:waypoint xsi:type="dc:Point" x="453" y="97" /> + <di:waypoint xsi:type="dc:Point" x="492" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="464" y="73" width="12" height="12" /> + </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:BPMNShape id="CallActivity_1c5wru8_di" bpmnElement="CallActivity_1c5wru8"> + <dc:Bounds x="917" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0lc115e_di" bpmnElement="ScriptTask_0lc115e"> + <dc:Bounds x="1058" y="57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_14x55db_di" bpmnElement="SequenceFlow_14x55db"> + <di:waypoint xsi:type="dc:Point" x="1017" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1058" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1038" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0znbzxu_di" bpmnElement="SequenceFlow_0znbzxu"> + <di:waypoint xsi:type="dc:Point" x="1158" y="97" /> + <di:waypoint xsi:type="dc:Point" x="1202" y="97" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1180" y="82" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn index ab0812343b..b8c6aa32a4 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_Wblj8GyfEeWUWLTvug7ZOg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="DoDeleteVfModule" name="DoDeleteVfModule" isExecutable="true"> - <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule - Prep" scriptFormat="groovy"> + <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule
Prep" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_0fp1wqz</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* @@ -10,8 +9,7 @@ def dvm = new DoDeleteVfModule() dvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="UpdateAAIVfModulePrep" targetRef="InvokeUpdateAAIVfModule" /> - <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke - 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" /> @@ -21,8 +19,7 @@ dvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script> <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing> </bpmn2:callActivity> <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="InvokeUpdateAAIVfModule" targetRef="SDNCAdapterPrep2" /> - <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" /> @@ -34,8 +31,7 @@ dvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script> <bpmn2:outgoing>SequenceFlow_1j9dvfx</bpmn2:outgoing> </bpmn2:callActivity> <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1" /> - <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke - 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" /> @@ -49,16 +45,14 @@ dvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script> <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing> </bpmn2:callActivity> <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="InvokeSDNCAdapterV1_2" targetRef="validateSDNCResponse" /> - <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter - Prep" scriptFormat="groovy"> + <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter
Prep" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_1j9dvfx</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* def dvm = new DoDeleteVfModule() dvm.prepVNFAdapterRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter - Prep" scriptFormat="groovy"> + <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter
Prep" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* @@ -66,8 +60,7 @@ def dvm = new DoDeleteVfModule() dvm.prepSDNCAdapterRequest(execution, "delete")]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="InvokeSDNCAdapterV1_2" /> - <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke - 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" /> @@ -82,8 +75,7 @@ dvm.prepSDNCAdapterRequest(execution, "delete")]]></bpmn2:script> <bpmn2:endEvent id="EndEvent_9"> <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming> </bpmn2:endEvent> - <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" /> @@ -94,8 +86,7 @@ dvm.prepSDNCAdapterRequest(execution, "delete")]]></bpmn2:script> <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing> </bpmn2:callActivity> <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="InvokeDeleteAAIVfModule" targetRef="EndEvent_9" /> - <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule - Prep" scriptFormat="groovy"> + <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule
Prep" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn index 127030d789..078e0107ba 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn @@ -36,22 +36,24 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script> </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:incoming>SequenceFlow_1tt31qu</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1fccvli</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1qrkdn3</bpmn2:outgoing> <bpmn2:outgoing>SequenceFlow_1936oc0</bpmn2:outgoing> </bpmn2:exclusiveGateway> <bpmn2:callActivity id="DeleteVNF" name="Delete VNF" calledElement="DoDeleteVnf"> <bpmn2:extensionElements> - <camunda:in source="IsDebugLogEnabled" target="IsDebugLogEnabled" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="vnfId" target="vnfId" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_05ujwz8</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1x25m7t</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1uqlr6b</bpmn2:outgoing> </bpmn2:callActivity> <bpmn2:sequenceFlow id="SequenceFlow_08nd69s" sourceRef="intialization" targetRef="QueryVnf" /> <bpmn2:sequenceFlow id="SequenceFlow_1qrkdn3" name="yes" sourceRef="ExclusiveGateway_1amun4k" targetRef="PrepareModuleList"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DDVAM_nextModule") < execution.getVariable("DDVAM_modulesSize")]]></bpmn2:conditionExpression> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DDVAM_nextModule") < execution.getVariable("DDVAM_moduleCount")]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> <bpmn2:callActivity id="DeleteVFModule" name="Delete VF Module" calledElement="DoDeleteVfModule"> <bpmn2:extensionElements> @@ -63,20 +65,22 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script> <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="DDVAM_sdncVersion" target="sdncVersion" /> <camunda:in source=""true"" target="isVidRequest" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_1qoor0l</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1xujrk5</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1p4ycii</bpmn2:outgoing> </bpmn2:callActivity> - <bpmn2:exclusiveGateway id="ExclusiveGateway_0189gqf"> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0189gqf" name="Is SDNC Interaction Enabled?" default="SequenceFlow_05ujwz8"> <bpmn2:incoming>SequenceFlow_1936oc0</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_05ujwz8</bpmn2:outgoing> + <bpmn2:outgoing>SDNCInteractionEnabled2</bpmn2:outgoing> </bpmn2:exclusiveGateway> <bpmn2:sequenceFlow id="SequenceFlow_1p4ycii" sourceRef="DeleteVFModule" targetRef="PostProcessDeleteVfModule" /> <bpmn2:sequenceFlow id="SequenceFlow_0t4yszi" sourceRef="PostProcessDeleteVfModule" targetRef="ExclusiveGateway_1amun4k" /> <bpmn2:sequenceFlow id="SequenceFlow_1936oc0" name="no" sourceRef="ExclusiveGateway_1amun4k" targetRef="ExclusiveGateway_0189gqf" /> - <bpmn2:sequenceFlow id="SequenceFlow_05ujwz8" sourceRef="ExclusiveGateway_0189gqf" targetRef="DeleteVNF" /> + <bpmn2:sequenceFlow id="SequenceFlow_05ujwz8" name="no" sourceRef="ExclusiveGateway_0189gqf" targetRef="DeleteVNF" /> <bpmn2:sequenceFlow id="SequenceFlow_1uqlr6b" sourceRef="DeleteVNF" targetRef="EndEvent_2" /> <bpmn2:scriptTask id="QueryVnf" name="Query VNF" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_08nd69s</bpmn2:incoming> @@ -92,15 +96,115 @@ ddvam.queryAAIVfModule(execution)]]></bpmn2:script> 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:sequenceFlow id="SequenceFlow_0lu7b1v" sourceRef="QueryVnf" targetRef="ExclusiveGateway_027lai5" /> + <bpmn2:sequenceFlow id="SequenceFlow_1qoor0l" sourceRef="PrepareModuleList" targetRef="ExclusiveGateway_0b36mti" /> + <bpmn2:scriptTask id="PostProcessDeleteVfModule" name="PostProcess Delete VF Module" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_1p4ycii</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0xl033m</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0t4yszi</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -int nextModule = execution.getVariable("nextModule") - execution.setVariable("nextModule", nextModule + 1)]]></bpmn2:script> +int nextModule = execution.getVariable("DDVAM_nextModule") + execution.setVariable("DDVAM_nextModule", nextModule + 1)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:exclusiveGateway id="ExclusiveGateway_027lai5" name="Is SDNC Interaction Enabled?" default="SequenceFlow_1tt31qu"> + <bpmn2:incoming>SequenceFlow_0lu7b1v</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1tt31qu</bpmn2:outgoing> + <bpmn2:outgoing>SDNCInteractionEnabled1</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1tt31qu" name="no" sourceRef="ExclusiveGateway_027lai5" targetRef="ExclusiveGateway_1amun4k" /> + <bpmn2:sequenceFlow id="SDNCInteractionEnabled1" name="yes" sourceRef="ExclusiveGateway_027lai5" targetRef="preProcessSDNCDeactivateRequest"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DDVAM_sdncVersion" ) != '1702'}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_0fhhsyo" sourceRef="preProcessSDNCDeactivateRequest" targetRef="callSDNCAdapterTopologyDeactivate" /> + <bpmn2:sequenceFlow id="SequenceFlow_0qdn8k4" sourceRef="callSDNCAdapterTopologyDeactivate" targetRef="postProcessSDNCDeactivateRequest" /> + <bpmn2:sequenceFlow id="SequenceFlow_1fccvli" sourceRef="postProcessSDNCDeactivateRequest" targetRef="ExclusiveGateway_1amun4k" /> + <bpmn2:scriptTask id="preProcessSDNCDeactivateRequest" name="PreProcess SDNC Deactivate Request" scriptFormat="groovy"> + <bpmn2:incoming>SDNCInteractionEnabled1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0fhhsyo</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddvam = new DoDeleteVnfAndModules() +ddvam.preProcessSDNCDeactivateRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> + <bpmn2:scriptTask id="postProcessSDNCDeactivateRequest" name="PostProcess SDNC Deactivate Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0qdn8k4</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1fccvli</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddvam = new DoDeleteVnfAndModules() +String response = execution.getVariable("DDVAM_deactivateSDNCAdapterResponse") +ddvam.validateSDNCResponse(execution, response, "deactivate")]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="callSDNCAdapterTopologyDeactivate" name="Call SDNC Adapter Topology Deactivate" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="DDVAM_deactivateSDNCRequest" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="sdncAdapterResponse" target="DDVAM_deactivateSDNCAdapterResponse" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0fhhsyo</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0qdn8k4</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SDNCInteractionEnabled2" name="yes" sourceRef="ExclusiveGateway_0189gqf" targetRef="preProcessSDNCUnassignRequest"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DDVAM_sdncVersion" ) != '1702'}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_001uxa1" sourceRef="preProcessSDNCUnassignRequest" targetRef="callSDNCAdapterTopologyUnassign" /> + <bpmn2:sequenceFlow id="SequenceFlow_1x29mht" sourceRef="callSDNCAdapterTopologyUnassign" targetRef="postProcessSDNCUnassignRequest" /> + <bpmn2:sequenceFlow id="SequenceFlow_1x25m7t" sourceRef="postProcessSDNCUnassignRequest" targetRef="DeleteVNF" /> + <bpmn2:scriptTask id="preProcessSDNCUnassignRequest" name="PreProcess SDNC Unassign Request" scriptFormat="groovy"> + <bpmn2:incoming>SDNCInteractionEnabled2</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_001uxa1</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddvam = new DoDeleteVnfAndModules() +ddvam.preProcessSDNCUnassignRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="callSDNCAdapterTopologyUnassign" name="Call SDNC Adapter Topology Unassign" calledElement="sdncAdapter"> + <bpmn2:extensionElements> + <camunda:in source="DDVAM_unassignSDNCRequest" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="sdncAdapterResponse" target="DDVAM_unassignSDNCAdapterResponse" /> + <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_001uxa1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1x29mht</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:scriptTask id="postProcessSDNCUnassignRequest" name="PostProcess SDNC Unassign Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1x29mht</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1x25m7t</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddvam = new DoDeleteVnfAndModules() +String response = execution.getVariable("DDVAM_unassignSDNCAdapterResponse") +ddvam.validateSDNCResponse(execution, response, "unassign")]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0b36mti" name="Is SDNC Interaction Enabled?" default="SequenceFlow_1xujrk5"> + <bpmn2:incoming>SequenceFlow_1qoor0l</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1xujrk5</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1laeenc</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:callActivity id="DoDeleteVfModuleFromVnf" name="Deiete VF Module From VNF" calledElement="DoDeleteVfModuleFromVnf"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="vnfId" target="vnfId" /> + <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" /> + <camunda:in source="tenantId" target="tenantId" /> + <camunda:in source="DDVAM_sdncVersion" target="sdncVersion" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="DDVAM_vfModuleId" target="vfModuleId" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1laeenc</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0xl033m</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_1xujrk5" name="no" sourceRef="ExclusiveGateway_0b36mti" targetRef="DeleteVFModule" /> + <bpmn2:sequenceFlow id="SequenceFlow_1laeenc" name="yes" sourceRef="ExclusiveGateway_0b36mti" targetRef="DoDeleteVfModuleFromVnf"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DDVAM_sdncVersion" ) != '1702'}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_0xl033m" sourceRef="DoDeleteVfModuleFromVnf" targetRef="PostProcessDeleteVfModule" /> </bpmn2:process> <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" /> @@ -123,51 +227,51 @@ int nextModule = execution.getVariable("nextModule") </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2"> - <dc:Bounds x="1605" y="209" width="36" height="36" /> + <dc:Bounds x="1983" y="372" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1623" y="250" width="0" height="0" /> + <dc:Bounds x="2001" y="413" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true"> - <dc:Bounds x="226" y="401" width="431" height="157" /> + <dc:Bounds x="229" y="616" 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" /> + <dc:Bounds x="377" y="677" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="392" y="503" width="0" height="0" /> + <dc:Bounds x="395" y="718" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4"> - <dc:Bounds x="590" y="462" width="36" height="36" /> + <dc:Bounds x="593" y="677" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="608" y="503" width="0" height="0" /> + <dc:Bounds x="611" y="718" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException"> - <dc:Bounds x="444" y="440" width="100" height="80" /> + <dc:Bounds x="447" y="655" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319"> - <di:waypoint xsi:type="dc:Point" x="410" y="480" /> - <di:waypoint xsi:type="dc:Point" x="444" y="480" /> + <di:waypoint xsi:type="dc:Point" x="413" y="695" /> + <di:waypoint xsi:type="dc:Point" x="447" y="695" /> <bpmndi:BPMNLabel> - <dc:Bounds x="427" y="465" width="0" height="0" /> + <dc:Bounds x="430" y="680" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239"> - <di:waypoint xsi:type="dc:Point" x="544" y="480" /> - <di:waypoint xsi:type="dc:Point" x="590" y="480" /> + <di:waypoint xsi:type="dc:Point" x="547" y="695" /> + <di:waypoint xsi:type="dc:Point" x="593" y="695" /> <bpmndi:BPMNLabel> - <dc:Bounds x="567" y="465" width="0" height="0" /> + <dc:Bounds x="570" y="680" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_1amun4k_di" bpmnElement="ExclusiveGateway_1amun4k" isMarkerVisible="true"> - <dc:Bounds x="691" y="202" width="50" height="50" /> + <dc:Bounds x="1271" y="200" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="683" y="252" width="65" height="36" /> + <dc:Bounds x="1263" y="250" width="65" height="36" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0laaqvh_di" bpmnElement="DeleteVNF"> - <dc:Bounds x="1436" y="187" width="100" height="80" /> + <dc:Bounds x="1812" y="350" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_08nd69s_di" bpmnElement="SequenceFlow_08nd69s"> <di:waypoint xsi:type="dc:Point" x="444" y="227" /> @@ -177,87 +281,208 @@ int nextModule = execution.getVariable("nextModule") </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" /> + <di:waypoint xsi:type="dc:Point" x="1296" y="200" /> + <di:waypoint xsi:type="dc:Point" x="1296" y="102" /> + <di:waypoint xsi:type="dc:Point" x="1368" y="102" /> <bpmndi:BPMNLabel> - <dc:Bounds x="722" y="156.4750449879038" width="18" height="12" /> + <dc:Bounds x="1302" y="154" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_0qmp9y5_di" bpmnElement="DeleteVFModule"> - <dc:Bounds x="962" y="64" width="100" height="80" /> + <dc:Bounds x="1648" y="-9" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0189gqf_di" bpmnElement="ExclusiveGateway_0189gqf" isMarkerVisible="true"> - <dc:Bounds x="1304" y="202" width="50" height="50" /> + <dc:Bounds x="1271" y="365" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1329" y="252" width="0" height="0" /> + <dc:Bounds x="1302" y="319" width="54" height="36" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1p4ycii_di" bpmnElement="SequenceFlow_1p4ycii"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="1748" y="31" /> + <di:waypoint xsi:type="dc:Point" x="1904" y="31" /> + <di:waypoint xsi:type="dc:Point" x="1904" y="62" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1111" y="104" width="0" height="0" /> + <dc:Bounds x="1826" y="16" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0t4yszi_di" bpmnElement="SequenceFlow_0t4yszi"> - <di:waypoint xsi:type="dc:Point" x="1177" y="144" /> - <di:waypoint xsi:type="dc:Point" x="1177" y="227" /> - <di:waypoint xsi:type="dc:Point" x="741" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1904" y="142" /> + <di:waypoint xsi:type="dc:Point" x="1904" y="225" /> + <di:waypoint xsi:type="dc:Point" x="1321" y="225" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1192" y="185.5" width="0" height="0" /> + <dc:Bounds x="1919" y="183.5" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1936oc0_di" bpmnElement="SequenceFlow_1936oc0"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="1296" y="250" /> + <di:waypoint xsi:type="dc:Point" x="1296" y="365" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1017" y="286" width="12" height="12" /> + <dc:Bounds x="1270" y="305.40625" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_05ujwz8_di" bpmnElement="SequenceFlow_05ujwz8"> - <di:waypoint xsi:type="dc:Point" x="1354" y="227" /> - <di:waypoint xsi:type="dc:Point" x="1436" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1321" y="390" /> + <di:waypoint xsi:type="dc:Point" x="1812" y="390" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1395" y="202" width="0" height="0" /> + <dc:Bounds x="1361" y="362" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1uqlr6b_di" bpmnElement="SequenceFlow_1uqlr6b"> - <di:waypoint xsi:type="dc:Point" x="1536" y="227" /> - <di:waypoint xsi:type="dc:Point" x="1605" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1912" y="390" /> + <di:waypoint xsi:type="dc:Point" x="1983" y="390" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1571" y="212" width="0" height="0" /> + <dc:Bounds x="1948" y="375" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_12xsp2f_di" bpmnElement="QueryVnf"> <dc:Bounds x="512" y="187" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_01c9qas_di" bpmnElement="PrepareModuleList"> - <dc:Bounds x="788" y="64" width="100" height="80" /> + <dc:Bounds x="1368" y="62" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0lu7b1v_di" bpmnElement="SequenceFlow_0lu7b1v"> <di:waypoint xsi:type="dc:Point" x="612" y="227" /> - <di:waypoint xsi:type="dc:Point" x="691" y="227" /> + <di:waypoint xsi:type="dc:Point" x="701" y="227" /> <bpmndi:BPMNLabel> - <dc:Bounds x="652" y="202" width="0" height="0" /> + <dc:Bounds x="657" y="212" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1qoor0l_di" bpmnElement="SequenceFlow_1qoor0l"> - <di:waypoint xsi:type="dc:Point" x="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" /> + <di:waypoint xsi:type="dc:Point" x="1468" y="102" /> + <di:waypoint xsi:type="dc:Point" x="1525" y="102" /> <bpmndi:BPMNLabel> - <dc:Bounds x="943" y="104" width="0" height="0" /> + <dc:Bounds x="1497" y="87" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_11i0rnd_di" bpmnElement="PostProcessDeleteVfModule"> - <dc:Bounds x="1127" y="64" width="100" height="80" /> + <dc:Bounds x="1854" y="62" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_027lai5_di" bpmnElement="ExclusiveGateway_027lai5" isMarkerVisible="true"> + <dc:Bounds x="701" y="202" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="699" y="145" width="54" height="36" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1tt31qu_di" bpmnElement="SequenceFlow_1tt31qu"> + <di:waypoint xsi:type="dc:Point" x="751" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1271" y="225" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1005" y="201" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_04lnhgt_di" bpmnElement="SDNCInteractionEnabled1"> + <di:waypoint xsi:type="dc:Point" x="726" y="252" /> + <di:waypoint xsi:type="dc:Point" x="726" y="337" /> + <di:waypoint xsi:type="dc:Point" x="776" y="337" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="694" y="280.5" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0fhhsyo_di" bpmnElement="SequenceFlow_0fhhsyo"> + <di:waypoint xsi:type="dc:Point" x="876" y="337" /> + <di:waypoint xsi:type="dc:Point" x="926" y="337" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="901" y="322" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0qdn8k4_di" bpmnElement="SequenceFlow_0qdn8k4"> + <di:waypoint xsi:type="dc:Point" x="1026" y="337" /> + <di:waypoint xsi:type="dc:Point" x="1070" y="337" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1048" y="322" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1fccvli_di" bpmnElement="SequenceFlow_1fccvli"> + <di:waypoint xsi:type="dc:Point" x="1170" y="337" /> + <di:waypoint xsi:type="dc:Point" x="1225" y="337" /> + <di:waypoint xsi:type="dc:Point" x="1225" y="225" /> + <di:waypoint xsi:type="dc:Point" x="1271" y="225" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1240" y="281" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1cj4pgd_di" bpmnElement="preProcessSDNCDeactivateRequest"> + <dc:Bounds x="776" y="297" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1nug5hb_di" bpmnElement="postProcessSDNCDeactivateRequest"> + <dc:Bounds x="1070" y="297" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0sl24xf_di" bpmnElement="callSDNCAdapterTopologyDeactivate"> + <dc:Bounds x="926" y="297" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ftrgor_di" bpmnElement="SDNCInteractionEnabled2"> + <di:waypoint xsi:type="dc:Point" x="1296" y="415" /> + <di:waypoint xsi:type="dc:Point" x="1296" y="501" /> + <di:waypoint xsi:type="dc:Point" x="1356" y="501" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1266" y="445.36046511627904" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_001uxa1_di" bpmnElement="SequenceFlow_001uxa1"> + <di:waypoint xsi:type="dc:Point" x="1456" y="501" /> + <di:waypoint xsi:type="dc:Point" x="1517" y="501" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1487" y="486" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1x29mht_di" bpmnElement="SequenceFlow_1x29mht"> + <di:waypoint xsi:type="dc:Point" x="1617" y="501" /> + <di:waypoint xsi:type="dc:Point" x="1678" y="501" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1648" y="486" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1x25m7t_di" bpmnElement="SequenceFlow_1x25m7t"> + <di:waypoint xsi:type="dc:Point" x="1778" y="501" /> + <di:waypoint xsi:type="dc:Point" x="1862" y="501" /> + <di:waypoint xsi:type="dc:Point" x="1862" y="430" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1820" y="486" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_167oslm_di" bpmnElement="preProcessSDNCUnassignRequest"> + <dc:Bounds x="1356" y="461" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0cv258c_di" bpmnElement="callSDNCAdapterTopologyUnassign"> + <dc:Bounds x="1517" y="461" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1gb4lqf_di" bpmnElement="postProcessSDNCUnassignRequest"> + <dc:Bounds x="1678" y="461" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0b36mti_di" bpmnElement="ExclusiveGateway_0b36mti" isMarkerVisible="true"> + <dc:Bounds x="1525" y="77" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1581" y="84" width="54" height="36" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1y4alqc_di" bpmnElement="DoDeleteVfModuleFromVnf"> + <dc:Bounds x="1648" y="121" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1xujrk5_di" bpmnElement="SequenceFlow_1xujrk5"> + <di:waypoint xsi:type="dc:Point" x="1550" y="77" /> + <di:waypoint xsi:type="dc:Point" x="1550" y="31" /> + <di:waypoint xsi:type="dc:Point" x="1648" y="31" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1524" y="42" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1laeenc_di" bpmnElement="SequenceFlow_1laeenc"> + <di:waypoint xsi:type="dc:Point" x="1550" y="127" /> + <di:waypoint xsi:type="dc:Point" x="1550" y="161" /> + <di:waypoint xsi:type="dc:Point" x="1648" y="161" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1523" y="135" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0xl033m_di" bpmnElement="SequenceFlow_0xl033m"> + <di:waypoint xsi:type="dc:Point" x="1748" y="161" /> + <di:waypoint xsi:type="dc:Point" x="1828" y="161" /> + <di:waypoint xsi:type="dc:Point" x="1828" y="102" /> + <di:waypoint xsi:type="dc:Point" x="1854" y="102" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1843" y="131.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> |