diff options
author | seshukm <seshu.kumar.m@huawei.com> | 2017-10-10 12:15:10 +0530 |
---|---|---|
committer | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-10-10 08:29:57 +0000 |
commit | a1a6cb4726910b72c231e96ae54cf48bb0b5577d (patch) | |
tree | 85a93c1d8654f662cf06d56902f1d44314d2013c /bpmn | |
parent | 7b501309195e1ef87e86a8fcc6775ff10708987c (diff) |
Adding BPMN and Groovy for E2E Svc
IssueId: SO-200
Change-Id: Idf3f9d0f64d0942ca6d004928b788c14a1605a77
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'bpmn')
4 files changed, 1564 insertions, 0 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy new file mode 100644 index 0000000000..7a047d4992 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy @@ -0,0 +1,375 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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>DelE2EServiceInstance.bpmn</class> process.
+ *
+ */
+public class DeleteCustomE2EServiceInstance 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)
+ }
+
+ /*
+ * Extracting User Parameters from incoming Request and converting into a Map
+ */
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+
+ Map reqMap = jsonSlurper.parseText(siRequest)
+
+ //InputParams
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> inputMap = [:]
+ if (userParams) {
+ userParams.each {
+ userParam -> inputMap.put(userParam.name, userParam.value)
+ }
+ }
+
+ utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
+ execution.setVariable("serviceInputParams", inputMap)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ }
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncError *** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareCompletionRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareCompletion *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:status-message>E2E Service Instance was deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>DeleteCustomE2EServiceInstance</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareFalloutRequest *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
+ String errorException = " Bpmn error encountered in CreateServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ utils.log("DEBUG", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
+ }
+
+
+ // *******************************
+ // Build DB request Section
+ // *******************************
+ public void prepareDBRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDBRequest of DeleteCustomE2EServiceInstance ***** ", isDebugEnabled)
+
+ String requestId = execution.getVariable("DELSI_requestId")
+ String statusMessage = "E2E 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 DeleteCustomE2EServiceInstance 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 DeleteCustomE2EServiceInstance ***** ", 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 DeleteCustomE2EServiceInstance 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 DeleteCustomE2EServiceInstance 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/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy new file mode 100644 index 0000000000..041ff62aca --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy @@ -0,0 +1,476 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 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.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>DoDeleteE2EServiceInstance.bpmn</class> process. + * + * Inputs: + * @param - msoRequestId + * @param - globalSubscriberId - O + * @param - subscriptionServiceType - O + * @param - serviceInstanceId + * @param - serviceInstanceName - O + * @param - serviceModelInfo - O + * @param - productFamilyId + * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM) + * @param - sdncVersion + * @param - failNotFound - TODO + * @param - serviceInputParams - TODO + * + * Outputs: + * @param - WorkflowException + * + * Rollback - Deferred + */ +public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor { + + String Prefix="DDELSI_" + ExceptionUtil exceptionUtil = new ExceptionUtil() + JsonUtils jsonUtil = new JsonUtils() + + 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) + + StringBuilder sbParams = new StringBuilder() + Map<String, String> paramsMap = execution.getVariable("serviceInputParams") + if (paramsMap != null) + { + sbParams.append("<service-input-parameters>") + for (Map.Entry<String, String> entry : paramsMap.entrySet()) { + String paramsXml + String paramName = entry.getKey() + String paramValue = entry.getValue() + paramsXml = + """ <param> + <name>${paramName}</name> + <value>${paramValue}</value> + </param> + """ + sbParams.append(paramsXml) + } + sbParams.append("</service-input-parameters>") + } + String siParamsXml = sbParams.toString() + if (siParamsXml == null) + siParamsXml = "" + execution.setVariable("siParamsXml", siParamsXml) + + } 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 preProcessVFCDelete (Execution execution) { + } + + public void postProcessVFCDelete(Execution execution, String response, String method) { + } + + public void preProcessSDNCDelete (Execution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("DEBUG"," ***** preProcessSDNCDelete *****", isDebugEnabled) + String msg = "" + + try { + def serviceInstanceId = execution.getVariable("serviceInstanceId") + def serviceInstanceName = execution.getVariable("serviceInstanceName") + def callbackURL = execution.getVariable("sdncCallbackUrl") + def requestId = execution.getVariable("msoRequestId") + def serviceId = execution.getVariable("productFamilyId") + def subscriptionServiceType = execution.getVariable("subscriptionServiceType") + def globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId + + String serviceModelInfo = execution.getVariable("serviceModelInfo") + def modelInvariantUuid = "" + def modelVersion = "" + def modelUuid = "" + def modelName = "" + if (!isBlank(serviceModelInfo)) + { + modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid") + modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion") + modelUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelUuid") + modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName") + + if (modelInvariantUuid == null) { + modelInvariantUuid = "" + } + if (modelVersion == null) { + modelVersion = "" + } + if (modelUuid == null) { + modelUuid = "" + } + if (modelName == null) { + modelName = "" + } + } + if (serviceInstanceName == null) { + serviceInstanceName = "" + } + if (serviceId == null) { + serviceId = "" + } + + def siParamsXml = execution.getVariable("siParamsXml") + def serviceType = execution.getVariable("serviceType") + if (serviceType == null) + { + serviceType = "" + } + + 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:MsoAction>${serviceType}</sdncadapter:MsoAction> + </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>${modelInvariantUuid}</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> + ${siParamsXml} + </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") + String serviceType = "" + + 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 subscriptionServiceType = execution.getVariable("subscriptionServiceType") + if(isBlank(subscriptionServiceType)){ + int serviceStart = siRelatedLink.indexOf("service-subscription/") + int serviceEnd = siRelatedLink.indexOf("/service-instances/") + String serviceTypeEncoded = siRelatedLink.substring(serviceStart + 21, serviceEnd) + subscriptionServiceType = UriUtils.decode(serviceTypeEncoded, "UTF-8") + execution.setVariable("subscriptionServiceType", subscriptionServiceType) + } + + if (isBlank(globalSubscriberId) || isBlank(subscriptionServiceType)) + { + msg = "Could not retrive global-customer-id & subscription-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) + serviceType = utils.getNodeText1(siData,"service-type") + execution.setVariable("serviceType", serviceType) + execution.setVariable("serviceRole", utils.getNodeText1(siData,"service-role")) + String orchestrationStatus = utils.getNodeText1(siData,"orchestration-status") + + //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") || e.equals("allotted-resource") ){ + utils.log("DEBUG", "ServiceInstance still has relationship(s) to generic-vnfs, l3-networks or allotted-resources", 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) + } + } + } + } + + if ("TRANSPORT".equalsIgnoreCase(serviceType)) + { + if ("PendingDelete".equals(orchestrationStatus)) + { + execution.setVariable("skipDeactivate", true) + } + else + { + msg = "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status:" + orchestrationStatus + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) + } + + } + } + }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 DoDeleteE2EServiceInstance.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 DoDeleteE2EServiceInstance.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/resources/process/DeleteCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn new file mode 100644 index 0000000000..6b1099e043 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn @@ -0,0 +1,329 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2"> + <bpmn:process id="Process_1" isExecutable="true"> + <bpmn:startEvent id="StartEvent_00m8zen" name="Delete SI Start Flow"> + <bpmn:outgoing>SequenceFlow_1wxumid</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:subProcess id="SubProcess_0amn8vu" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> + <bpmn:scriptTask id="ScriptTask_1c6ogpt" name="Handle Unexpected Error" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0guajy5</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0dbt753</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* +ExceptionUtil ex = new ExceptionUtil() +ex.processJavaException(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:startEvent id="StartEvent_121296y"> + <bpmn:outgoing>SequenceFlow_0guajy5</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_1dw3dwx"> + <bpmn:incoming>SequenceFlow_0dbt753</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0guajy5" name="" sourceRef="StartEvent_121296y" targetRef="ScriptTask_1c6ogpt" /> + <bpmn:sequenceFlow id="SequenceFlow_0dbt753" name="" sourceRef="ScriptTask_1c6ogpt" targetRef="EndEvent_1dw3dwx" /> + </bpmn:subProcess> + <bpmn:callActivity id="CallActivity_1vyx9hu" name="Call DoCustomDeleteE2EServiceInstance " calledElement="DoCustomDeleteE2EServiceInstance"> + <bpmn:extensionElements> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="serviceInstanceName" target="serviceInstanceName" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="productFamilyId" target="productFamilyId" /> + <camunda:in source="disableRollback" target="disableRollback" /> + <camunda:in source="serviceInputParams" target="serviceInputParams" /> + <camunda:in source="failIfExists" target="failIfExists" /> + <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> + <camunda:in sourceExpression="1610" target="sdncVersion" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0zf2qyk</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_07hrbs0</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:endEvent id="EndEvent_0db8bs6" name="End"> + <bpmn:incoming>SequenceFlow_1ab5l2q</bpmn:incoming> + </bpmn:endEvent> + <bpmn:scriptTask id="ScriptTask_0a63hms" name="Pre Process Incoming Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1wxumid</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0yowshs</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def csi= new DeleteCustomE2EServiceInstance() +csi.preProcessRequest(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_1fzpbop" name="Prepare Completion Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_04urx2e</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ii935p</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def csi = new DeleteCustomE2EServiceInstance() +csi.prepareCompletionRequest(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:callActivity id="CallActivity_1wx4ihe" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess"> + <bpmn:extensionElements> + <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" /> + <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" /> + <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1ii935p</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ab5l2q</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:subProcess id="SubProcess_1vbcima" name="Sub-process for FalloutHandler " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_0jybicw"> + <bpmn:outgoing>SequenceFlow_0for83z</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_1jegbhy"> + <bpmn:incoming>SequenceFlow_0hrazlh</bpmn:incoming> + </bpmn:endEvent> + <bpmn:scriptTask id="ScriptTask_0so3xj0" name="Prepare Fallout Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1s1cbgf</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1py6yqz</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def csi = new DeleteCustomE2EServiceInstance() +csi.prepareFalloutRequest(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:callActivity id="CallActivity_1qhekgt" name="Call FalloutHandler" calledElement="FalloutHandler"> + <bpmn:extensionElements> + <camunda:in source="falloutRequest" target="FalloutHandlerRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" /> + <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" /> + <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1py6yqz</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0hrazlh</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:scriptTask id="ScriptTask_006nty7" name="Send Error Response"> + <bpmn:incoming>SequenceFlow_0for83z</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1s1cbgf</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def csi = new DeleteCustomE2EServiceInstance() +csi.sendSyncError(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0for83z" sourceRef="StartEvent_0jybicw" targetRef="ScriptTask_006nty7" /> + <bpmn:sequenceFlow id="SequenceFlow_0hrazlh" sourceRef="CallActivity_1qhekgt" targetRef="EndEvent_1jegbhy" /> + <bpmn:sequenceFlow id="SequenceFlow_1s1cbgf" sourceRef="ScriptTask_006nty7" targetRef="ScriptTask_0so3xj0" /> + <bpmn:sequenceFlow id="SequenceFlow_1py6yqz" sourceRef="ScriptTask_0so3xj0" targetRef="CallActivity_1qhekgt" /> + </bpmn:subProcess> + <bpmn:scriptTask id="ScriptTask_1mao77y" name="Send Sync Ack Response" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0yowshs</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0zf2qyk</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def csi = new DeleteCustomE2EServiceInstance() +csi.sendSyncResponse(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:exclusiveGateway id="ExclusiveGateway_0vu8gx6" name="Success?" default="SequenceFlow_1t6ekab"> + <bpmn:incoming>SequenceFlow_07hrbs0</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_04urx2e</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1t6ekab</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:endEvent id="EndEvent_1i1g9s6"> + <bpmn:incoming>SequenceFlow_1t6ekab</bpmn:incoming> + <bpmn:errorEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wxumid" sourceRef="StartEvent_00m8zen" targetRef="ScriptTask_0a63hms" /> + <bpmn:sequenceFlow id="SequenceFlow_0zf2qyk" sourceRef="ScriptTask_1mao77y" targetRef="CallActivity_1vyx9hu" /> + <bpmn:sequenceFlow id="SequenceFlow_07hrbs0" sourceRef="CallActivity_1vyx9hu" targetRef="ExclusiveGateway_0vu8gx6" /> + <bpmn:sequenceFlow id="SequenceFlow_1ab5l2q" sourceRef="CallActivity_1wx4ihe" targetRef="EndEvent_0db8bs6" /> + <bpmn:sequenceFlow id="SequenceFlow_0yowshs" sourceRef="ScriptTask_0a63hms" targetRef="ScriptTask_1mao77y" /> + <bpmn:sequenceFlow id="SequenceFlow_04urx2e" name="yes" sourceRef="ExclusiveGateway_0vu8gx6" targetRef="ScriptTask_1fzpbop"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_1ii935p" sourceRef="ScriptTask_1fzpbop" targetRef="CallActivity_1wx4ihe" /> + <bpmn:sequenceFlow id="SequenceFlow_1t6ekab" name="no" sourceRef="ExclusiveGateway_0vu8gx6" targetRef="EndEvent_1i1g9s6" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"> + <bpmndi:BPMNShape id="StartEvent_00m8zen_di" bpmnElement="StartEvent_00m8zen"> + <dc:Bounds x="577" y="209" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="560" y="250" width="70" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_0amn8vu_di" bpmnElement="SubProcess_0amn8vu" isExpanded="true"> + <dc:Bounds x="834" y="660" width="394" height="188" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1vyx9hu_di" bpmnElement="CallActivity_1vyx9hu"> + <dc:Bounds x="1121" y="187" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0db8bs6_di" bpmnElement="EndEvent_0db8bs6"> + <dc:Bounds x="1646" y="304" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1657" y="340" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0a63hms_di" bpmnElement="ScriptTask_0a63hms"> + <dc:Bounds x="741" y="187" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1fzpbop_di" bpmnElement="ScriptTask_1fzpbop"> + <dc:Bounds x="1453" y="187" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1wx4ihe_di" bpmnElement="CallActivity_1wx4ihe"> + <dc:Bounds x="1614" y="187" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_1vbcima_di" bpmnElement="SubProcess_1vbcima" isExpanded="true"> + <dc:Bounds x="736" y="374" width="679" height="194" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1mao77y_di" bpmnElement="ScriptTask_1mao77y"> + <dc:Bounds x="920" y="187" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0vu8gx6_di" bpmnElement="ExclusiveGateway_0vu8gx6" isMarkerVisible="true"> + <dc:Bounds x="1318" y="202" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1318" y="174" width="49" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1i1g9s6_di" bpmnElement="EndEvent_1i1g9s6"> + <dc:Bounds x="1325" y="304" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1298" y="340" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wxumid_di" bpmnElement="SequenceFlow_1wxumid"> + <di:waypoint xsi:type="dc:Point" x="613" y="227" /> + <di:waypoint xsi:type="dc:Point" x="741" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="587" y="212" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0zf2qyk_di" bpmnElement="SequenceFlow_0zf2qyk"> + <di:waypoint xsi:type="dc:Point" x="1020" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1073" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1073" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1121" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1043" y="227" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_07hrbs0_di" bpmnElement="SequenceFlow_07hrbs0"> + <di:waypoint xsi:type="dc:Point" x="1221" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1318" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1225.5" y="212" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ab5l2q_di" bpmnElement="SequenceFlow_1ab5l2q"> + <di:waypoint xsi:type="dc:Point" x="1664" y="267" /> + <di:waypoint xsi:type="dc:Point" x="1664" y="304" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1634" y="279.5" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0yowshs_di" bpmnElement="SequenceFlow_0yowshs"> + <di:waypoint xsi:type="dc:Point" x="841" y="227" /> + <di:waypoint xsi:type="dc:Point" x="920" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="835.5" y="206" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_04urx2e_di" bpmnElement="SequenceFlow_04urx2e"> + <di:waypoint xsi:type="dc:Point" x="1368" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1453" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1370.25" y="203" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ii935p_di" bpmnElement="SequenceFlow_1ii935p"> + <di:waypoint xsi:type="dc:Point" x="1553" y="227" /> + <di:waypoint xsi:type="dc:Point" x="1614" y="227" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1495" y="212" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1t6ekab_di" bpmnElement="SequenceFlow_1t6ekab"> + <di:waypoint xsi:type="dc:Point" x="1343" y="252" /> + <di:waypoint xsi:type="dc:Point" x="1343" y="277" /> + <di:waypoint xsi:type="dc:Point" x="1343" y="277" /> + <di:waypoint xsi:type="dc:Point" x="1343" y="304" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1352" y="277" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1c6ogpt_di" bpmnElement="ScriptTask_1c6ogpt"> + <dc:Bounds x="982" y="715" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_121296y_di" bpmnElement="StartEvent_121296y"> + <dc:Bounds x="867" y="737" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="795" y="778" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1dw3dwx_di" bpmnElement="EndEvent_1dw3dwx"> + <dc:Bounds x="1143" y="737" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1071" y="778" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_0jybicw_di" bpmnElement="StartEvent_0jybicw"> + <dc:Bounds x="752" y="460" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="680" y="501" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1jegbhy_di" bpmnElement="EndEvent_1jegbhy"> + <dc:Bounds x="1331" y="460" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1259" y="501" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0so3xj0_di" bpmnElement="ScriptTask_0so3xj0"> + <dc:Bounds x="1010" y="438" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1qhekgt_di" bpmnElement="CallActivity_1qhekgt"> + <dc:Bounds x="1187" y="438" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_006nty7_di" bpmnElement="ScriptTask_006nty7"> + <dc:Bounds x="832" y="438" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0guajy5_di" bpmnElement="SequenceFlow_0guajy5"> + <di:waypoint xsi:type="dc:Point" x="903" y="755" /> + <di:waypoint xsi:type="dc:Point" x="982" y="755" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="856" y="755" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0dbt753_di" bpmnElement="SequenceFlow_0dbt753"> + <di:waypoint xsi:type="dc:Point" x="1082" y="755" /> + <di:waypoint xsi:type="dc:Point" x="1143" y="755" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1028" y="755" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0for83z_di" bpmnElement="SequenceFlow_0for83z"> + <di:waypoint xsi:type="dc:Point" x="788" y="478" /> + <di:waypoint xsi:type="dc:Point" x="810" y="478" /> + <di:waypoint xsi:type="dc:Point" x="810" y="478" /> + <di:waypoint xsi:type="dc:Point" x="831" y="478" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="735" y="478" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0hrazlh_di" bpmnElement="SequenceFlow_0hrazlh"> + <di:waypoint xsi:type="dc:Point" x="1287" y="478" /> + <di:waypoint xsi:type="dc:Point" x="1331" y="478" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1219" y="463" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1s1cbgf_di" bpmnElement="SequenceFlow_1s1cbgf"> + <di:waypoint xsi:type="dc:Point" x="932" y="478" /> + <di:waypoint xsi:type="dc:Point" x="959" y="478" /> + <di:waypoint xsi:type="dc:Point" x="959" y="478" /> + <di:waypoint xsi:type="dc:Point" x="1010" y="478" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="884" y="478" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1py6yqz_di" bpmnElement="SequenceFlow_1py6yqz"> + <di:waypoint xsi:type="dc:Point" x="1110" y="478" /> + <di:waypoint xsi:type="dc:Point" x="1187" y="478" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1060" y="463" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn new file mode 100644 index 0000000000..3bdb8146d4 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn @@ -0,0 +1,384 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2"> + <bpmn:process id="Process_1" isExecutable="true"> + <bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow"> + <bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:scriptTask id="ScriptTask_06phzgv" name="PreProcess Incoming Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0vz7cd9</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_11e6bfy</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.preProcessRequest(execution) +]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:endEvent id="EndEvent_1uqzt26"> + <bpmn:incoming>SequenceFlow_0e7inkl</bpmn:incoming> + </bpmn:endEvent> + <bpmn:callActivity id="CallActivity_06izbke" name="Call AAI GenericDelete Service " calledElement="GenericDeleteService"> + <bpmn: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" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0ph3iin</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0uhpfcl</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0g6bxqw</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:exclusiveGateway id="ExclusiveGateway_0c6gz3v" name="SI found in AAI" default="SequenceFlow_0g20hqr"> + <bpmn:incoming>SequenceFlow_0vi0sv6</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1pcmc9e</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0g20hqr</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:endEvent id="EndEvent_0123yz3"> + <bpmn:incoming>SequenceFlow_0g20hqr</bpmn:incoming> + </bpmn:endEvent> + <bpmn:exclusiveGateway id="ExclusiveGateway_0veiutm" name="sdncVersion is 1610 "> + <bpmn:incoming>SequenceFlow_1pcmc9e</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1av166w</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0uhpfcl</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:callActivity id="CallActivity_0x2ulh3" name="Call AAI Generic GetService" calledElement="GenericGetService"> + <bpmn: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" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0sj8yc8</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:scriptTask id="ScriptTask_1rtnsh8" name="Post Process AAI GET" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0sj8yc8</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0vi0sv6</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.postProcessAAIGET(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_01erufg" name="Post Process AAI Delete" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0g6bxqw</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0e7inkl</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.postProcessAAIDEL(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:subProcess id="SubProcess_1u8zt9i" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_0sf5lpt"> + <bpmn:outgoing>SequenceFlow_1921mo3</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_06utmg4"> + <bpmn:incoming>SequenceFlow_18vlzfo</bpmn:incoming> + </bpmn:endEvent> + <bpmn:scriptTask id="ScriptTask_0nha3pr" name="Log / Print Unexpected Error" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1921mo3</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_18vlzfo</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* +ExceptionUtil ex = new ExceptionUtil() +ex.processJavaException(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1921mo3" name="" sourceRef="StartEvent_0sf5lpt" targetRef="ScriptTask_0nha3pr" /> + <bpmn:sequenceFlow id="SequenceFlow_18vlzfo" name="" sourceRef="ScriptTask_0nha3pr" targetRef="EndEvent_06utmg4" /> + </bpmn:subProcess> + <bpmn:sequenceFlow id="SequenceFlow_0vz7cd9" sourceRef="StartEvent_0212h2r" targetRef="ScriptTask_06phzgv" /> + <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="CallActivity_0x2ulh3" /> + <bpmn:sequenceFlow id="SequenceFlow_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="EndEvent_1uqzt26" /> + <bpmn:sequenceFlow id="SequenceFlow_0g6bxqw" sourceRef="CallActivity_06izbke" targetRef="ScriptTask_01erufg" /> + <bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="ExclusiveGateway_0c6gz3v" /> + <bpmn:sequenceFlow id="SequenceFlow_1pcmc9e" name="yes" sourceRef="ExclusiveGateway_0c6gz3v" targetRef="ExclusiveGateway_0veiutm"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0g20hqr" name="no" sourceRef="ExclusiveGateway_0c6gz3v" targetRef="EndEvent_0123yz3" /> + <bpmn:sequenceFlow id="SequenceFlow_0sj8yc8" sourceRef="CallActivity_0x2ulh3" targetRef="ScriptTask_1rtnsh8" /> + <bpmn:callActivity id="CallActivity_Del_VFC" name="Call Custom Delete VFC" calledElement="CustomVFCDelete"> + <bpmn: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" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1wmjau1</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0qquvgc</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_1av166w" sourceRef="ExclusiveGateway_0veiutm" targetRef="ScriptTask_0vcz9mj" /> + <bpmn:callActivity id="CallActivity_Del_SDNC_cust" name="Call Custom Delete SDNC" calledElement="CustomSDNCDelete"> + <bpmn: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" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1dza4q4</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0rpu756</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_0qquvgc" sourceRef="CallActivity_Del_VFC" targetRef="ScriptTask_0mdub03" /> + <bpmn:sequenceFlow id="SequenceFlow_0ph3iin" sourceRef="ScriptTask_1g0tsto" targetRef="CallActivity_06izbke" /> + <bpmn:scriptTask id="ScriptTask_0vcz9mj" name="PreProcess VFC Delete" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1av166w</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1wmjau1</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.preProcessVFCDelete(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1wmjau1" sourceRef="ScriptTask_0vcz9mj" targetRef="CallActivity_Del_VFC" /> + <bpmn:scriptTask id="ScriptTask_0mdub03" name="Post Process VFC Delete" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0qquvgc</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01o68xa</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* + +String response = execution.getVariable("vfcDeleteResponse") +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.postProcessVFCDelete(execution, response, "delete")]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_1g0tsto" name="Post Process SDNC Delete" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0rpu756</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ph3iin</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* + +String response = execution.getVariable("sdncDeleteResponse") +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.postProcessSDNCDelete(execution, response, "delete")]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_0z30dax" name="PreProcess SDNC Delete" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_01o68xa</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1dza4q4</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.preProcessSDNCDelete(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_01o68xa" sourceRef="ScriptTask_0mdub03" targetRef="ScriptTask_0z30dax" /> + <bpmn:sequenceFlow id="SequenceFlow_1dza4q4" sourceRef="ScriptTask_0z30dax" targetRef="CallActivity_Del_SDNC_cust" /> + <bpmn:sequenceFlow id="SequenceFlow_0rpu756" sourceRef="CallActivity_Del_SDNC_cust" targetRef="ScriptTask_1g0tsto" /> + <bpmn:sequenceFlow id="SequenceFlow_0uhpfcl" name="yes" sourceRef="ExclusiveGateway_0veiutm" targetRef="CallActivity_06izbke"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{ execution.getVariable("sdncVersion" ) == "1610" }]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"> + <bpmndi:BPMNShape id="StartEvent_0212h2r_di" bpmnElement="StartEvent_0212h2r"> + <dc:Bounds x="-224" y="-35" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-230" y="6" width="50" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_06phzgv_di" bpmnElement="ScriptTask_06phzgv"> + <dc:Bounds x="-155" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1uqzt26_di" bpmnElement="EndEvent_1uqzt26"> + <dc:Bounds x="1660" y="107" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1588" y="148" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_06izbke_di" bpmnElement="CallActivity_06izbke"> + <dc:Bounds x="1470" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0c6gz3v_di" bpmnElement="ExclusiveGateway_0c6gz3v" isMarkerVisible="true"> + <dc:Bounds x="260" y="-42" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="250" y="-63" width="71" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0123yz3_di" bpmnElement="EndEvent_0123yz3"> + <dc:Bounds x="267" y="107" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="240" y="148" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0veiutm_di" bpmnElement="ExclusiveGateway_0veiutm" isMarkerVisible="true"> + <dc:Bounds x="346" y="-42" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="339" y="12" width="72" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0x2ulh3_di" bpmnElement="CallActivity_0x2ulh3"> + <dc:Bounds x="-11" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1rtnsh8_di" bpmnElement="ScriptTask_1rtnsh8"> + <dc:Bounds x="130" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_01erufg_di" bpmnElement="ScriptTask_01erufg"> + <dc:Bounds x="1628" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_1u8zt9i_di" bpmnElement="SubProcess_1u8zt9i" isExpanded="true"> + <dc:Bounds x="351" y="210" width="467" height="193" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0vz7cd9_di" bpmnElement="SequenceFlow_0vz7cd9"> + <di:waypoint xsi:type="dc:Point" x="-188" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="-155" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-215.5" y="-32" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_11e6bfy_di" bpmnElement="SequenceFlow_11e6bfy"> + <di:waypoint xsi:type="dc:Point" x="-55" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="-11" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-78" y="-32" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl"> + <di:waypoint xsi:type="dc:Point" x="1678" y="23" /> + <di:waypoint xsi:type="dc:Point" x="1678" y="61" /> + <di:waypoint xsi:type="dc:Point" x="1678" y="107" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1648" y="36" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0g6bxqw_di" bpmnElement="SequenceFlow_0g6bxqw"> + <di:waypoint xsi:type="dc:Point" x="1570" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="1628" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1554" y="-38" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0vi0sv6_di" bpmnElement="SequenceFlow_0vi0sv6"> + <di:waypoint xsi:type="dc:Point" x="230" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="260" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="200" y="-32" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1pcmc9e_di" bpmnElement="SequenceFlow_1pcmc9e"> + <di:waypoint xsi:type="dc:Point" x="310" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="346" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="332" y="-15" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0g20hqr_di" bpmnElement="SequenceFlow_0g20hqr"> + <di:waypoint xsi:type="dc:Point" x="285" y="8" /> + <di:waypoint xsi:type="dc:Point" x="285" y="107" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="266" y="24" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0sj8yc8_di" bpmnElement="SequenceFlow_0sj8yc8"> + <di:waypoint xsi:type="dc:Point" x="89" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="130" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="65.5" y="-32" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="StartEvent_0sf5lpt_di" bpmnElement="StartEvent_0sf5lpt"> + <dc:Bounds x="419" y="277" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="347" y="318" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_06utmg4_di" bpmnElement="EndEvent_06utmg4"> + <dc:Bounds x="712" y="277" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="640" y="318" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0nha3pr_di" bpmnElement="ScriptTask_0nha3pr"> + <dc:Bounds x="523" y="255" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1921mo3_di" bpmnElement="SequenceFlow_1921mo3"> + <di:waypoint xsi:type="dc:Point" x="455" y="295" /> + <di:waypoint xsi:type="dc:Point" x="523" y="295" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="399" y="280" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_18vlzfo_di" bpmnElement="SequenceFlow_18vlzfo"> + <di:waypoint xsi:type="dc:Point" x="623" y="295" /> + <di:waypoint xsi:type="dc:Point" x="712" y="295" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="579" y="280" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1x56smn_di" bpmnElement="CallActivity_Del_VFC"> + <dc:Bounds x="619" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1av166w_di" bpmnElement="SequenceFlow_1av166w"> + <di:waypoint xsi:type="dc:Point" x="396" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="459" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="382.5" y="-38" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1lb0hcm_di" bpmnElement="CallActivity_Del_SDNC_cust"> + <dc:Bounds x="1138" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0qquvgc_di" bpmnElement="SequenceFlow_0qquvgc"> + <di:waypoint xsi:type="dc:Point" x="719" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="787" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="708" y="-38" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0ph3iin_di" bpmnElement="SequenceFlow_0ph3iin"> + <di:waypoint xsi:type="dc:Point" x="1400" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="1470" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1390" y="-38" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0vcz9mj_di" bpmnElement="ScriptTask_0vcz9mj"> + <dc:Bounds x="459" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wmjau1_di" bpmnElement="SequenceFlow_1wmjau1"> + <di:waypoint xsi:type="dc:Point" x="559" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="619" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="589" y="-38" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0mdub03_di" bpmnElement="ScriptTask_0mdub03"> + <dc:Bounds x="787" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1g0tsto_di" bpmnElement="ScriptTask_1g0tsto"> + <dc:Bounds x="1300" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0z30dax_di" bpmnElement="ScriptTask_0z30dax"> + <dc:Bounds x="962" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_01o68xa_di" bpmnElement="SequenceFlow_01o68xa"> + <di:waypoint xsi:type="dc:Point" x="887" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="962" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="924.5" y="-38" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1dza4q4_di" bpmnElement="SequenceFlow_1dza4q4"> + <di:waypoint xsi:type="dc:Point" x="1062" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="1138" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1100" y="-38" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0rpu756_di" bpmnElement="SequenceFlow_0rpu756"> + <di:waypoint xsi:type="dc:Point" x="1238" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="1300" y="-17" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1269" y="-38" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0uhpfcl_di" bpmnElement="SequenceFlow_0uhpfcl"> + <di:waypoint xsi:type="dc:Point" x="371" y="-42" /> + <di:waypoint xsi:type="dc:Point" x="371" y="-134" /> + <di:waypoint xsi:type="dc:Point" x="1520" y="-134" /> + <di:waypoint xsi:type="dc:Point" x="1520" y="-57" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="884.6283985846136" y="-160" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> |