summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy429
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy263
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy322
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCommunicationService.bpmn523
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn332
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn115
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn205
7 files changed, 2189 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
new file mode 100644
index 0000000000..00b0b37b18
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
@@ -0,0 +1,429 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR 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.onap.so.bpmn.infrastructure.scripts
+
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.Relationship
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aai.domain.yang.CommunicationServiceProfile
+import org.onap.aai.domain.yang.CommunicationServiceProfiles
+import org.onap.logging.filter.base.ONAPComponents
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.RequestDBUtil
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.HttpClient
+import org.onap.so.client.HttpClientFactory
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.db.request.beans.OperationStatus
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+import javax.ws.rs.NotFoundException
+import javax.ws.rs.core.Response
+
+import static org.apache.commons.lang3.StringUtils.isBlank
+
+class DeleteCommunicationService extends AbstractServiceTaskProcessor {
+ private final String PREFIX ="DeleteCommunicationService"
+ private final Long TIMEOUT = 60 * 60 * 1000
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ private RequestDBUtil requestDBUtil = new RequestDBUtil()
+ private static final Logger LOGGER = LoggerFactory.getLogger(DeleteCommunicationService.class)
+
+ @Override
+ void preProcessRequest(DelegateExecution execution) {
+ execution.setVariable("prefix",PREFIX)
+ String msg = ""
+
+ LOGGER.trace("Starting preProcessRequest")
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ execution.setVariable("operationType", "DELETE")
+
+ //communication service id
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "communication-service id is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ LOGGER.info("Input Request: ${siRequest}, reqId: ${requestId}, serviceInstanceId: ${serviceInstanceId}")
+
+ //requestParameters
+ checkAndSetRequestParam(siRequest,"globalSubscriberId",false,execution)
+ checkAndSetRequestParam(siRequest,"serviceType",false,execution)
+ checkAndSetRequestParam(siRequest,"operationId",false,execution)
+
+ } catch (BpmnError e) {
+ throw e
+ } catch (any) {
+ msg = "Exception in preProcessRequest " + any.getCause()
+ LOGGER.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.trace("Exit preProcessRequest")
+ }
+
+
+ /**
+ * prepare update operation status
+ * @param execution
+ */
+ void preInitUpdateOperationStatus(DelegateExecution execution){
+ LOGGER.trace(" ======== STARTED initUpdateOperationStatus Process ======== ")
+ try{
+ execution.setVariable("result","processing")
+ execution.setVariable("progress","0")
+ execution.setVariable("operationContent","delete communication service operation start")
+ setOperationStatus(execution)
+
+ }catch(Exception e){
+ LOGGER.error("Exception Occured Processing initUpdateOperationStatus. Exception is:\n" + e)
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during initUpdateOperationStatus Method:\n" + e.getMessage())
+ }
+ LOGGER.trace("======== COMPLETED initUpdateOperationStatus Process ======== ")
+ }
+
+ /**
+ * send sync response
+ * @param execution
+ */
+ void sendSyncResponse(DelegateExecution execution) {
+ LOGGER.debug("Begin sendSyncResponse")
+
+ try {
+ String operationId = execution.getVariable("operationId")
+ String syncResponse = """{"operationId":"${operationId}"}""".trim()
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.debug("Exit sendSyncResponse")
+ }
+
+ /**
+ * query CommunicationSerive from AAI
+ * save e2eslice-service instance id and service name
+ * @param execution
+ */
+ private void queryCommunicationSeriveFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" ***** begin queryCommunicationSeriveFromAAI *****")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String errorMsg = "query communication service from aai failed"
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+ Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
+ if(si.isPresent())
+ {
+ String serviceInstName = si.get()?.getServiceInstanceName()
+ String e2eSliceServiceInstId
+ if(si.isPresent())
+ {
+ List<Relationship> relationshipList = si.get().getRelationshipList()?.getRelationship()
+ for (Relationship relationship : relationshipList)
+ {
+ String relatedTo = relationship.getRelatedTo()
+ if (relatedTo == "service-instance")
+ {
+ String relatedLink = relationship.getRelatedLink()?:""
+ e2eSliceServiceInstId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : ""
+ break
+ }
+ }
+ }
+ execution.setVariable("e2eSliceServiceInstanceId", e2eSliceServiceInstId)
+ execution.setVariable("serviceInstanceName", serviceInstName ?: "")
+ LOGGER.info("communication-service Id: ${serviceInstanceId}, e2eslice-service Id: ${e2eSliceServiceInstId}, serviceName: ${serviceInstName}")
+ }
+ LOGGER.debug(" ***** Exit queryCommunicationSeriveFromAAI *****")
+ }
+
+ /**
+ * query AAI
+ * @param execution
+ * @param aaiObjectType
+ * @param instanceId
+ * @return AAIResultWrapper
+ */
+ private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg)
+ {
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId)
+ if (!resourceClient.exists(resourceUri)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
+ }
+ AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class)
+ return wrapper
+ }
+
+
+ /**
+ * 再次调用deleteE2EServiceInstance接口,然后获取到operationid,
+ */
+ void sendRequest2NSMFWF(DelegateExecution execution) {
+ LOGGER.trace("begin preRequestSend2NSMF")
+ try {
+ //url:/onap/so/infra/e2eServiceInstances/v3/{serviceInstanceId}"
+ def NSMF_endpoint = UrnPropertiesReader.getVariable("mso.infra.endpoint.url", execution)
+ String url = "${NSMF_endpoint}/e2eServiceInstances/v3/${execution.getVariable("e2eSliceServiceInstanceId")}"
+
+ String requestBody = """
+ {
+ "globalSubscriberId": "${execution.getVariable("globalSubscriberId")}",
+ "serviceType": "${execution.getVariable("serviceType")}"
+ }
+ """
+ requestBody.replaceAll("\\s+", "")
+
+ String basicAuthValue = UrnPropertiesReader.getVariable("mso.infra.endpoint.auth", execution)
+ HttpClient httpClient = new HttpClientFactory().newJsonClient(new URL(url), ONAPComponents.SO)
+ httpClient.addAdditionalHeader("Authorization", basicAuthValue)
+ httpClient.addAdditionalHeader("Accept", "application/json")
+ Response httpResponse = httpClient.delete(requestBody)
+ handleNSSMFWFResponse(httpResponse, execution)
+
+ } catch (BpmnError e) {
+ throw e
+ } catch (any) {
+ String msg = "Exception in DeleteCommunicationService.preRequestSend2NSMF. " + any.getCause()
+ LOGGER.error(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+
+ LOGGER.trace("exit preRequestSend2NSMF")
+ }
+
+ /**
+ * prepare to call sub process
+ * @param execution
+ */
+ void prepareCallCheckProcessStatus(DelegateExecution execution)
+ {
+ LOGGER.debug(PREFIX + "prepareCallCheckProcessStatus Start")
+
+ def successConditions = new ArrayList<>()
+ successConditions.add("finished")
+ execution.setVariable("successConditions", successConditions)
+
+ def errorConditions = new ArrayList<>()
+ errorConditions.add("error")
+ execution.setVariable("errorConditions", errorConditions)
+
+ execution.setVariable("processServiceType", "communication service")
+ execution.setVariable("subOperationType", "DELETE")
+ execution.setVariable("initProgress", 20)
+ execution.setVariable("endProgress",90)
+
+ execution.setVariable("timeOut", TIMEOUT)
+
+ LOGGER.debug(PREFIX + "prepareCallCheckProcessStatus Exit")
+ }
+
+ /**
+ * delete communication profile from AAI
+ * @param execution
+ */
+ void delCSProfileFromAAI(DelegateExecution execution)
+ {
+ LOGGER.debug("start delete communication service profile from AAI")
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String profileId
+ try
+ {
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_PROFILE_ALL, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class)
+ Optional<CommunicationServiceProfiles> csProfilesOpt = wrapper.asBean(CommunicationServiceProfiles.class)
+ if(csProfilesOpt.isPresent()){
+ CommunicationServiceProfiles csProf
+ iles = csProfilesOpt.get()
+ CommunicationServiceProfile csProfile = csProfiles.getCommunicationServiceProfile().get(0)
+ profileId = csProfile ? csProfile.getProfileId() : ""
+ }
+ resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_SERVICE_PROFILE, globalSubscriberId, serviceType, serviceInstanceId, profileId)
+ if (!resourceClient.exists(resourceUri)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "communication service profile was not found in aai")
+ }
+
+ resourceClient.delete(resourceUri)
+ LOGGER.debug("end delete communication service profile from AAI")
+ }
+ catch (any)
+ {
+ String msg = "delete communication service profile from aai failed! cause-"+any.getCause()
+ LOGGER.error(any.printStackTrace())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
+ }
+
+ }
+
+ /**
+ * delete communication service from AAI
+ * @param execution
+ */
+ void delCSFromAAI(DelegateExecution execution)
+ {
+ try
+ {
+ LOGGER.debug("start delete communication service from AAI")
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), execution.getVariable("serviceInstanceId"))
+ resourceClient.delete(serviceInstanceUri)
+
+ execution.setVariable("progress", "100")
+ execution.setVariable("result", "finished")
+ execution.setVariable("operationContent", "CSMF completes service terminated.")
+ setOperationStatus(execution)
+ LOGGER.debug("end delete communication service from AAI")
+ }
+ catch (any)
+ {
+ LOGGER.error("Error occured within delCSFromAAI method, cause: ${any.getCause()} ")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Error occured during delete communication service from aai")
+ }
+ }
+
+ void sendSyncError(DelegateExecution execution)
+ {
+ LOGGER.debug("Starting sendSyncError")
+
+ 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.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ LOGGER.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ LOGGER.error("Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+ }
+
+ /**
+ * prepare update operation status
+ * @param execution
+ */
+ void preFailedOperationStatus(DelegateExecution execution)
+ {
+ LOGGER.debug(" ======== STARTED preFailedOperationStatus Process ======== ")
+
+ execution.setVariable("progress", "100")
+ execution.setVariable("result", "error")
+ execution.setVariable("operationContent", "terminate service failure")
+
+ WorkflowException wfex = execution.getVariable("WorkflowException") as WorkflowException
+ String errorMessage = wfex.getErrorMessage()
+ errorMessage = errorMessage.length() > 200 ? errorMessage.substring(0,200) + "......" : errorMessage
+ execution.setVariable("reason", errorMessage)
+ setOperationStatus(execution)
+
+ LOGGER.debug("======== COMPLETED prepareEndOperationStatus Process ======== ")
+ }
+
+ /**
+ * prepare Operation status
+ * @param execution
+ * @param operationType
+ */
+ private void setOperationStatus(DelegateExecution execution)
+ {
+ OperationStatus operationStatus = new OperationStatus()
+ operationStatus.setServiceId(execution.getVariable("serviceInstanceId"))
+ operationStatus.setOperationId(execution.getVariable("operationId"))
+ operationStatus.setUserId(execution.getVariable("globalSubscriberId"))
+ //interface not support update
+ operationStatus.setServiceName(execution.getVariable("serviceInstanceName"))
+ operationStatus.setResult(execution.getVariable("result"))
+ operationStatus.setProgress(execution.getVariable("progress"))
+ operationStatus.setOperationContent(execution.getVariable("operationContent"))
+ operationStatus.setReason(execution.getVariable("reason")?:"")
+ operationStatus.setOperation("DELETE")
+
+ requestDBUtil.prepareUpdateOperationStatus(execution, operationStatus)
+ }
+
+ void prepareFailureStatus(DelegateExecution execution)
+ {
+ execution.setVariable("progress", "100")
+ execution.setVariable("operationContent", "terminate service failure.")
+ setOperationStatus(execution)
+ LOGGER.debug("${PREFIX}-prepareFailureStatus,result:${execution.getVariable("result")}, reason: ${execution.getVariable("reason")}")
+ }
+
+ /**
+ * check request json and save parameter to execution
+ * @param siRequest
+ * @param paraName
+ * @param isErrorException
+ * @param execution
+ */
+ private void checkAndSetRequestParam(String siRequest, String paraName, boolean isErrorException, DelegateExecution execution)
+ {
+ String msg = ""
+ String paramValue = jsonUtil.getJsonValue(siRequest, paraName)
+ if (isBlank(paramValue)) {
+ msg = "Input ${paraName} is null"
+ LOGGER.error(msg)
+ if(isErrorException)
+ {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ } else {
+ execution.setVariable(paraName, paramValue)
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy
new file mode 100644
index 0000000000..f0d43cf8d7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy
@@ -0,0 +1,263 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.ServiceProfile
+import org.onap.aai.domain.yang.ServiceProfiles
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.RequestDBUtil
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.db.request.beans.OperationStatus
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+import javax.ws.rs.NotFoundException
+
+import static org.apache.commons.lang3.StringUtils.isBlank
+
+class DeleteSliceService extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELSS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ private RequestDBUtil requestDBUtil = new RequestDBUtil()
+
+ private static final Logger logger = LoggerFactory.getLogger( DeleteSliceService.class)
+
+ @Override
+ void preProcessRequest(DelegateExecution execution) {
+ execution.setVariable("prefix", Prefix)
+ String msg = ""
+
+ logger.trace("Starting preProcessRequest")
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ //e2eslice-service instance id
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "e2eslice-service id is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ logger.info("Input Request: ${siRequest}, reqId: ${requestId}, e2eslice-service: ${serviceInstanceId}")
+
+ //subscriberInfo
+ checkAndSetRequestParam(siRequest,"globalSubscriberId",false, execution)
+ checkAndSetRequestParam(siRequest,"serviceType",false, execution)
+ checkAndSetRequestParam(siRequest,"operationId",false, execution)
+
+ //prepare init operation status
+ execution.setVariable("progress", "0")
+ execution.setVariable("result", "processing")
+ execution.setVariable("operationType", "DELETE")
+ execution.setVariable("operationContent", "Prepare init service")
+ updateServiceOperationStatus(execution)
+
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception ex) {
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ logger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ logger.trace("Exit preProcessRequest")
+ }
+
+ /**
+ * send asynchronous response
+ * @param execution
+ */
+ void sendAsyncResponse(DelegateExecution execution) {
+ logger.trace("Staring sendSyncResponse")
+
+ try {
+ String operationId = execution.getVariable("operationId")
+ String syncResponse = """{"operationId":"${operationId}"}""".trim()
+ logger.info("sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ logger.trace("Exit sendSyncResponse")
+ }
+
+ /**
+ * Deletes the slice service instance in aai
+ */
+ void deleteSliceServiceInstance(DelegateExecution execution) {
+ logger.trace("Entered deleteSliceServiceInstance")
+ try {
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), execution.getVariable("serviceInstanceId"))
+ resourceClient.delete(serviceInstanceUri)
+
+ execution.setVariable("progress", "100")
+ execution.setVariable("result", "finished")
+ execution.setVariable("operationContent", "NSMF completes slicing service termination.")
+ updateServiceOperationStatus(execution)
+
+ logger.trace("Exited deleteSliceServiceInstance")
+ }catch(Exception e){
+ logger.debug("Error occured within deleteSliceServiceInstance method: " + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Error occured during deleteSliceServiceInstance from aai")
+ }
+ }
+
+ /**
+ * update operation status
+ * @param execution
+ */
+ private void updateServiceOperationStatus(DelegateExecution execution){
+
+ OperationStatus operationStatus = new OperationStatus()
+ operationStatus.setServiceId(execution.getVariable("serviceInstanceId"))
+ operationStatus.setOperationId(execution.getVariable("operationId"))
+ operationStatus.setUserId(execution.getVariable("globalSubscriberId"))
+ operationStatus.setResult(execution.getVariable("result"))
+ operationStatus.setProgress(execution.getVariable("progress"))
+ operationStatus.setOperationContent(execution.getVariable("operationContent"))
+ operationStatus.setReason(execution.getVariable("reason"))
+ operationStatus.setOperation(execution.getVariable("operationType"))
+
+ requestDBUtil.prepareUpdateOperationStatus(execution, operationStatus)
+ }
+
+ /**
+ * delete service profile from aai
+ * @param execution
+ */
+ private void delServiceProfileFromAAI(DelegateExecution execution)
+ {
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String profileId = ""
+
+ try
+ {
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE_ALL, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class)
+ Optional<ServiceProfiles> serviceProfilesOpt =wrapper.asBean(ServiceProfiles.class)
+ if(serviceProfilesOpt.isPresent()){
+ ServiceProfiles serviceProfiles = serviceProfilesOpt.get()
+ ServiceProfile serviceProfile = serviceProfiles.getServiceProfile().get(0)
+ profileId = serviceProfile ? serviceProfile.getProfileId() : ""
+ }
+ resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE, globalSubscriberId, serviceType, serviceInstanceId, profileId)
+ if (!resourceClient.exists(resourceUri)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
+ }
+ resourceClient.delete(resourceUri)
+ }
+ catch (any)
+ {
+ String msg = "delete service profile from aai failed! cause-"+any.getCause()
+ logger.error(any.printStackTrace())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
+ }
+ }
+
+ void sendSyncError(DelegateExecution execution) {
+ logger.info("Starting sendSyncError")
+
+ 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.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ logger.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ logger.error("Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+
+ }
+
+ void prepareEndOperationStatus(DelegateExecution execution){
+ logger.debug(" ======== STARTED prepareEndOperationStatus Process ======== ")
+
+ execution.setVariable("progress", "100")
+ execution.setVariable("result", "error")
+ execution.setVariable("operationContent", "NSSMF Terminate service failure")
+
+ WorkflowException wfex = execution.getVariable("WorkflowException") as WorkflowException
+ String errorMessage = wfex.getErrorMessage()
+ errorMessage = errorMessage.length() > 200 ? errorMessage.substring(0,200) + "......" : errorMessage
+ execution.setVariable("reason",errorMessage)
+ updateServiceOperationStatus(execution)
+
+ logger.debug("======== COMPLETED prepareEndOperationStatus Process ======== ")
+ }
+
+ /**
+ * check parameters from request body
+ * set to execution
+ * @param siRequest
+ * @param paraName
+ * @param isErrorException
+ * @param execution
+ */
+ private void checkAndSetRequestParam(String siRequest, String paraName, boolean isErrorException, DelegateExecution execution)
+ {
+ String msg = ""
+ String paramValue = jsonUtil.getJsonValue(siRequest, paraName)
+ if (isBlank(paramValue)) {
+ msg = "Input ${paraName} is null"
+ logger.error(msg)
+ if(isErrorException)
+ {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ } else {
+ execution.setVariable(paraName, paramValue)
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy
new file mode 100644
index 0000000000..7c2a2be6ac
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy
@@ -0,0 +1,322 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR 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.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.AllottedResource
+import org.onap.aai.domain.yang.AllottedResources
+import org.onap.aai.domain.yang.Relationship
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aai.domain.yang.SliceProfiles
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+import javax.ws.rs.NotFoundException
+
+import static org.apache.commons.lang3.StringUtils.isBlank
+
+/**
+ * This groovy class supports the <class>DoDeleteSliceService.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ *
+ */
+class DoDeleteSliceService extends AbstractServiceTaskProcessor {
+ private final String PREFIX ="DoDeleteSliceService"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ private static final Logger LOGGER = LoggerFactory.getLogger( DoDeleteSliceService.class)
+
+ @Override
+ void preProcessRequest(DelegateExecution execution) {
+ LOGGER.debug(" *****${PREFIX} preProcessRequest *****")
+ String msg = ""
+
+ try {
+ //String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix",PREFIX)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT
+ execution.getVariable("globalSubscriberId") ?: execution.setVariable("globalSubscriberId", "")
+
+ //requestDetails.requestParameters. for AAI PUT
+ execution.getVariable("serviceType") ?: execution.setVariable("serviceType", "")
+
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ LOGGER.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ LOGGER.error(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.debug("*****${PREFIX} Exit preProcessRequest *****")
+ }
+
+ /**
+ * query E2ESliceService from AAI
+ * save snssai
+ * @param execution
+ */
+ void queryE2ESliceSeriveFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start queryE2ESliceSeriveFromAAI *****")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String errorMsg = "query e2e slice service from aai failed"
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+ Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
+ if(si.isPresent())
+ {
+ String snssai = si.get()?.getEnvironmentContext()
+ execution.setVariable("snssai", snssai ?: "")
+ LOGGER.info("serviceInstanceId: ${serviceInstanceId}, snssai: ${snssai}")
+ }
+ LOGGER.trace(" *****${PREFIX} Exit queryE2ESliceSeriveFromAAI *****")
+ }
+
+ /**
+ * get allotted resource from AAI
+ * save nsi id
+ * @param execution
+ */
+ void getAllottedResFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start getAllottedResFromAAI *****")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ try
+ {
+ String errorMsg = "query allotted resource from aai failed."
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.ALLOTTED_RESOURCE_ALL, serviceInstanceId, errorMsg)
+ Optional<AllottedResources> ars = wrapper?.asBean(AllottedResources.class)
+ if(ars.isPresent() && ars.get().getAllottedResource())
+ {
+ List<AllottedResource> allottedResourceList = ars.get().getAllottedResource()
+ AllottedResource ar = allottedResourceList.first()
+ String relatedLink = ar?.getRelationshipList()?.getRelationship()?.first()?.getRelatedLink()
+ String nsiId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : ""
+ execution.setVariable("nsiId", nsiId)
+ LOGGER.info("serviceInstanceId: ${serviceInstanceId}, nsiId:${nsiId}")
+ }
+ }
+ catch(BpmnError e){
+ throw e
+ }
+ catch (Exception ex){
+ String msg = "Exception in getAllottedResFromAAI " + ex.getMessage()
+ LOGGER.error(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.trace(" *****${PREFIX} Exit getAllottedResFromAAI *****")
+ }
+
+ /**
+ * get nsi service instance from aai
+ * save nssi id
+ * @param execution
+ */
+ void getNSIFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start getNSIFromAAI *****")
+ String nsiId = execution.getVariable("nsiId")
+ try
+ {
+ String errorMsg = "query nsi from aai failed."
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, nsiId, errorMsg)
+ Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
+ List<String> nssiIdList = []
+ String msg = "nsiId:${nsiId},nssiIdList:"
+ if(si.isPresent())
+ {
+ List<Relationship> relationshipList = si.get().getRelationshipList()?.getRelationship()
+ for (Relationship relationship : relationshipList)
+ {
+ String relatedTo = relationship.getRelatedTo()
+ if (relatedTo == "service-instance")
+ {
+ String relatedLink = relationship.getRelatedLink()?:""
+ String nssiId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : ""
+ nssiIdList.add(nssiId)
+ msg+="${nssiId}, "
+ }
+ }
+ }
+ LOGGER.info(msg)
+ execution.setVariable("nssiIdList", nssiIdList)
+ }
+ catch(BpmnError e){
+ throw e
+ }
+ catch (Exception ex){
+ String msg = "Exception in getNSIFromAAI " + ex.getMessage()
+ LOGGER.error(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.trace(" *****${PREFIX} Exit getNSIFromAAI *****")
+ }
+
+ /**
+ * get nssi service from AAI
+ * prepare list
+ * @param execution
+ */
+ void getNSSIListFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace("*****${PREFIX} Start getNSSIListFromAAI *****")
+ List<String> nssiIdList = execution.getVariable("nssiIdList")
+ List<ServiceInstance> nssiInstanceList = []
+ String errorMsg = "query nssi list from aai failed"
+ for(String nssiId : nssiIdList)
+ {
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, nssiId, errorMsg)
+ Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
+ if(si.isPresent())
+ {
+ nssiInstanceList.add(si.get())
+ }
+ }
+ int size = nssiInstanceList.size()
+ int proportion = size >0 ?((90/size) as int) : 90
+ execution.setVariable("nssiInstanceList", nssiInstanceList)
+ execution.setVariable("currentNSSIIndex", 0)
+ execution.setVariable("proportion", proportion)
+ String msg ="nssiInstanceList size: ${nssiInstanceList.size()}, proportion:${proportion}"
+ LOGGER.info(msg)
+ LOGGER.trace(" *****${PREFIX} Exit getNSSIListFromAAI *****")
+ }
+
+ /**
+ * get current NSSI
+ * @param execution
+ */
+ void getCurrentNSSI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start getCurrentNSSI *****")
+ List<ServiceInstance> nssiInstanceList = execution.getVariable("nssiInstanceList")
+ int currentIndex = execution.getVariable("currentNSSIIndex") as int
+ ServiceInstance nssi = nssiInstanceList?.get(currentIndex)
+ def currentNSSI = [:]
+ currentNSSI['nssiServiceInstanceId'] = nssi?.getServiceInstanceId()
+ currentNSSI['modelInvariantId'] = nssi?.getModelInvariantId()
+ currentNSSI['modelVersionId'] = nssi?.getModelVersionId()
+ currentNSSI['snssai'] = execution.getVariable("snssai") ?: ""
+ currentNSSI['nsiServiceInstanceId'] = execution.getVariable("nsiId") ?: ""
+ currentNSSI['operationId'] = execution.getVariable("operationId") ?: ""
+ currentNSSI['e2eServiceInstanceId'] = execution.getVariable("serviceInstanceId") ?: ""
+ currentNSSI['msoRequestId'] = execution.getVariable("msoRequestId") ?: ""
+ currentNSSI['globalSubscriberId'] = execution.getVariable("globalSubscriberId") ?: ""
+ currentNSSI['serviceType'] = execution.getVariable("serviceType") ?: ""
+ currentNSSI['serviceModelInfo'] = execution.getVariable("serviceModelInfo") ?: ""
+ currentNSSI['proportion'] = (execution.getVariable("proportion") as int)*(currentIndex+1)
+ execution.setVariable("currentNSSI", currentNSSI)
+ String msg = "Now we deal with nssiServiceInstanceId: ${currentNSSI['nssiServiceInstanceId']}, current Index: ${currentIndex}, current proportion:${currentNSSI['proportion']}"
+ LOGGER.info(msg)
+ LOGGER.trace(" *****${PREFIX} Exit getCurrentNSSI *****")
+ }
+
+ /**
+ * parse next nssi
+ * @param execution
+ */
+ void parseNextNSSI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start parseNextNSSI *****")
+ if(execution.getVariable("WorkflowException") != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "current job failure!")
+ }
+ def currentIndex = execution.getVariable("currentNSSIIndex")
+ List<ServiceInstance> nssiInstanceList = execution.getVariable("nssiInstanceList")
+ def nextIndex = ++currentIndex
+ LOGGER.info("nextIndex: ${nextIndex}")
+ if(nextIndex >= nssiInstanceList.size()){
+ execution.setVariable("isAllNSSIFinished", "true")
+ }else{
+ execution.setVariable("isAllNSSIFinished", "false")
+ execution.setVariable("currentNSSIIndex", nextIndex)
+ }
+ LOGGER.trace(" *****${PREFIX} Exit parseNextNSSI *****")
+ }
+
+
+ /**
+ * query sliceProfile from AAI
+ * save profileId
+ * @param execution
+ */
+ void querySliceProfileFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start querySliceProfileFromAAI *****")
+ def currentNSSI = execution.getVariable("currentNSSI")
+ String nssiId = currentNSSI['nssiServiceInstanceId']
+ String errorMsg = "query slice profile failed"
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SLICE_PROFILE_ALL, nssiId, errorMsg)
+ Optional<SliceProfiles> sliceProfiles =wrapper.asBean(SliceProfiles.class)
+ if(sliceProfiles.isPresent())
+ {
+ String profileId = sliceProfiles.get().getSliceProfile()?.get(0)?.getProfileId()
+ currentNSSI['profileId'] = profileId ?: ""
+ LOGGER.info("nssiId: ${nssiId}, profileId: ${profileId}")
+ }
+ execution.setVariable("currentNSSI", currentNSSI)
+ LOGGER.trace(" *****${PREFIX} Exit querySliceProfileFromAAI *****")
+ }
+
+ /**
+ * query AAI
+ * @param execution
+ * @param aaiObjectType
+ * @param instanceId
+ * @return AAIResultWrapper
+ */
+ private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg)
+ {
+ LOGGER.trace(" *****${PREFIX} Start queryAAI *****")
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId)
+ if (!resourceClient.exists(resourceUri)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
+ }
+ AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class)
+ LOGGER.trace(" *****${PREFIX} Exit queryAAI *****")
+ return wrapper
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCommunicationService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCommunicationService.bpmn
new file mode 100644
index 0000000000..58a69621d3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCommunicationService.bpmn
@@ -0,0 +1,523 @@
+<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1nvjixd" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="DeleteCommunicationService" name="DeleteCommunicationService" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_1kjqnil</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1kjqnil" sourceRef="StartEvent_1" targetRef="Task_1mqm4nb" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ogievs" sourceRef="Task_1mqm4nb" targetRef="Task_0q2v7qe" />
+ <bpmn:sequenceFlow id="SequenceFlow_192yyii" sourceRef="Task_0q2v7qe" targetRef="Task_0zaekmn" />
+ <bpmn:serviceTask id="Task_0zaekmn" name="Init Service Operation Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_192yyii</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xvoume</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:scriptTask id="Task_0q2v7qe" name="Init Service Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0ogievs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_192yyii</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs= new DeleteCommunicationService()
+dcs.preInitUpdateOperationStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1mqm4nb" name="PreProcessRequest" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1kjqnil</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ogievs</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs= new DeleteCommunicationService()
+dcs.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_1k5stey" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xvoume</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_017qgen</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.sendSyncResponse(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0xvoume" sourceRef="Task_0zaekmn" targetRef="ScriptTask_1k5stey" />
+ <bpmn:sequenceFlow id="SequenceFlow_017qgen" sourceRef="ScriptTask_1k5stey" targetRef="Task_0ux5uk1" />
+ <bpmn:serviceTask id="Task_1kizznk" name="Update Service Operation Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0jrbkau</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ssiyug</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="Task_0xwjycr" name="update operation status completed">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/json</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_00g94pg</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_16ewagx</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1amyd7h</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_10g2pnj</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:endEvent id="EndEvent_0ixagvk" name="end">
+ <bpmn:incoming>SequenceFlow_10g2pnj</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_10g2pnj" sourceRef="Task_0xwjycr" targetRef="EndEvent_0ixagvk" />
+ <bpmn:scriptTask id="Task_0ux5uk1" name="Query CommunicationSerive From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_017qgen</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1j0e2po</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.queryCommunicationSeriveFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0ce724z" name="Go to Query delete progress">
+ <bpmn:incoming>SequenceFlow_0bmtfxq</bpmn:incoming>
+ <bpmn:linkEventDefinition name="QueryDeleteProgress" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_11i33ob" name="QueryDeleteProgress">
+ <bpmn:outgoing>SequenceFlow_1tcgzv0</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="QueryDeleteProgress" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:scriptTask id="Task_0qg5gn6" name="send request to NSMF WF" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_12xn3kz</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0bmtfxq</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.sendRequest2NSMFWF(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0bmtfxq" sourceRef="Task_0qg5gn6" targetRef="IntermediateThrowEvent_0ce724z" />
+ <bpmn:scriptTask id="Task_0qvxmnh" name="Delete CS Profile From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0s7s7zk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0arvpzv</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.delCSProfileFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0arvpzv" sourceRef="Task_0qvxmnh" targetRef="Task_0b5j6rg" />
+ <bpmn:scriptTask id="Task_0b5j6rg" name="Delete CS From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0arvpzv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_00g94pg</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.delCSFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:subProcess id="SubProcess_0p6namq" name="Exception Handling Sub-Process" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_1843894">
+ <bpmn:outgoing>SequenceFlow_1u5ko4h</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1u5ko4h" sourceRef="StartEvent_1843894" targetRef="Task_1spbb2x" />
+ <bpmn:scriptTask id="Task_1spbb2x" name="Send Error Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1u5ko4h</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_05yfw7t</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.sendSyncError(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_05yfw7t" sourceRef="Task_1spbb2x" targetRef="Task_0yqtfvh" />
+ <bpmn:scriptTask id="Task_0yqtfvh" name="Pre update Failed Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_05yfw7t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0c0btia</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.preFailedOperationStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0c0btia" sourceRef="Task_0yqtfvh" targetRef="Task_1s3l3fc" />
+ <bpmn:serviceTask id="Task_1s3l3fc" name="Update Service Operation Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0c0btia</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1w55zo7</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:endEvent id="EndEvent_1fsful5">
+ <bpmn:incoming>SequenceFlow_1w55zo7</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1w55zo7" sourceRef="Task_1s3l3fc" targetRef="EndEvent_1fsful5" />
+ </bpmn:subProcess>
+ <bpmn:sequenceFlow id="SequenceFlow_1tcgzv0" sourceRef="IntermediateThrowEvent_11i33ob" targetRef="ExclusiveGateway_16tdrty" />
+ <bpmn:subProcess id="SubProcess_1l7gd5k" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0zc2hnn">
+ <bpmn:outgoing>SequenceFlow_0mifi3x</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0mifi3x" sourceRef="StartEvent_0zc2hnn" targetRef="Task_01va9ms" />
+ <bpmn:endEvent id="EndEvent_052gdjz">
+ <bpmn:incoming>SequenceFlow_073yxs4</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_073yxs4" sourceRef="Task_01va9ms" targetRef="EndEvent_052gdjz" />
+ <bpmn:scriptTask id="Task_01va9ms" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0mifi3x</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_073yxs4</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:subProcess>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1lyw619" name="Is NSMF timeout?" default="SequenceFlow_0s7s7zk">
+ <bpmn:incoming>SequenceFlow_0xipbpr</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1sah9so</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0s7s7zk</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0bqfbxf</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0s7s7zk" sourceRef="ExclusiveGateway_1lyw619" targetRef="Task_0qvxmnh" />
+ <bpmn:sequenceFlow id="SequenceFlow_00g94pg" sourceRef="Task_0b5j6rg" targetRef="Task_0xwjycr" />
+ <bpmn:sequenceFlow id="SequenceFlow_0bqfbxf" name="yes" sourceRef="ExclusiveGateway_1lyw619" targetRef="Task_1ovewjr">
+ <bpmn:documentation>#{(execution.getVariable("isTimeOut") == "YES")}</bpmn:documentation>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isTimeOut") == "YES")}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_16tdrty" name="is NSMF Async Succeed?" default="SequenceFlow_0jrbkau">
+ <bpmn:incoming>SequenceFlow_1tcgzv0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0jrbkau</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_16ewagx</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0jrbkau" sourceRef="ExclusiveGateway_16tdrty" targetRef="Task_1kizznk" />
+ <bpmn:sequenceFlow id="SequenceFlow_16ewagx" name="no" sourceRef="ExclusiveGateway_16tdrty" targetRef="Task_0xwjycr">
+ <bpmn:documentation>#{(execution.getVariable("isNSMFWFRspSucceed" ) == "no")}</bpmn:documentation>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSMFWFRspSucceed" ) == "no")}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0icj4go" name="Is E2E Slice Service Instance Id Exist?" default="SequenceFlow_12xn3kz">
+ <bpmn:incoming>SequenceFlow_1j0e2po</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12xn3kz</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0xipbpr</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1j0e2po" sourceRef="Task_0ux5uk1" targetRef="ExclusiveGateway_0icj4go" />
+ <bpmn:sequenceFlow id="SequenceFlow_12xn3kz" sourceRef="ExclusiveGateway_0icj4go" targetRef="Task_0qg5gn6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0xipbpr" name="no" sourceRef="ExclusiveGateway_0icj4go" targetRef="ExclusiveGateway_1lyw619">
+ <bpmn:documentation>#{(execution.getVariable("e2eSliceServiceInstanceId") == null)}</bpmn:documentation>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("e2eSliceServiceInstanceId") == null)}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:callActivity id="Task_1ff6flk" name="CallCheckServiceProcessStatus" calledElement="CheckServiceProcessStatus">
+ <bpmn:extensionElements>
+ <camunda:in source="e2eSliceServiceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="e2eOperationId" target="operationId" />
+ <camunda:in source="successConditions" target="successConditions" />
+ <camunda:in source="errorConditions" target="errorConditions" />
+ <camunda:in source="processServiceType" target="processServiceType" />
+ <camunda:in source="timeOut" target="timeOut" />
+ <camunda:out source="operationStatus" target="result" />
+ <camunda:out source="operationContent" target="reason" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="isTimeOut" target="isTimeOut" />
+ <camunda:in source="subOperationType" target="operationType" />
+ <camunda:in source="initProgress" target="initProgress" />
+ <camunda:in source="endProgress" target="endProgress" />
+ <camunda:in source="serviceInstanceId" target="parentServiceInstanceId" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="operationId" target="parentOperationId" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0thr8dc</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1sah9so</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_1ovewjr" name="Prepare update operation status error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0bqfbxf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1amyd7h</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.prepareFailureStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1amyd7h" sourceRef="Task_1ovewjr" targetRef="Task_0xwjycr" />
+ <bpmn:sequenceFlow id="SequenceFlow_1sah9so" sourceRef="Task_1ff6flk" targetRef="ExclusiveGateway_1lyw619" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ssiyug" sourceRef="Task_1kizznk" targetRef="Task_0y1n9ls" />
+ <bpmn:sequenceFlow id="SequenceFlow_0thr8dc" sourceRef="Task_0y1n9ls" targetRef="Task_1ff6flk" />
+ <bpmn:scriptTask id="Task_0y1n9ls" name="Prepare Call CheckServiceProcessStatus" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ssiyug</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0thr8dc</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.prepareCallCheckProcessStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteCommunicationService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="159" y="145" width="23" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kjqnil_di" bpmnElement="SequenceFlow_1kjqnil">
+ <di:waypoint x="188" y="120" />
+ <di:waypoint x="240" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ogievs_di" bpmnElement="SequenceFlow_0ogievs">
+ <di:waypoint x="340" y="120" />
+ <di:waypoint x="390" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_192yyii_di" bpmnElement="SequenceFlow_192yyii">
+ <di:waypoint x="490" y="120" />
+ <di:waypoint x="560" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_104igd7_di" bpmnElement="Task_0zaekmn">
+ <dc:Bounds x="560" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0tqibrd_di" bpmnElement="Task_0q2v7qe">
+ <dc:Bounds x="390" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_18pflck_di" bpmnElement="Task_1mqm4nb">
+ <dc:Bounds x="240" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1k5stey_di" bpmnElement="ScriptTask_1k5stey">
+ <dc:Bounds x="740" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xvoume_di" bpmnElement="SequenceFlow_0xvoume">
+ <di:waypoint x="660" y="120" />
+ <di:waypoint x="740" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_017qgen_di" bpmnElement="SequenceFlow_017qgen">
+ <di:waypoint x="840" y="120" />
+ <di:waypoint x="910" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_17pxrcl_di" bpmnElement="Task_1kizznk">
+ <dc:Bounds x="330" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0ucwm85_di" bpmnElement="Task_0xwjycr">
+ <dc:Bounds x="1250" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ixagvk_di" bpmnElement="EndEvent_0ixagvk">
+ <dc:Bounds x="1432" y="332" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1441" y="375" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10g2pnj_di" bpmnElement="SequenceFlow_10g2pnj">
+ <di:waypoint x="1350" y="350" />
+ <di:waypoint x="1432" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_05zxl7j_di" bpmnElement="Task_0ux5uk1">
+ <dc:Bounds x="910" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1go0jt1_di" bpmnElement="IntermediateThrowEvent_0ce724z">
+ <dc:Bounds x="1432" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1417" y="145" width="76" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_09w3u1d_di" bpmnElement="IntermediateThrowEvent_11i33ob">
+ <dc:Bounds x="152" y="332" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="127" y="375" width="86" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0me3crz_di" bpmnElement="Task_0qg5gn6">
+ <dc:Bounds x="1220" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bmtfxq_di" bpmnElement="SequenceFlow_0bmtfxq">
+ <di:waypoint x="1320" y="120" />
+ <di:waypoint x="1432" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_14svlaf_di" bpmnElement="Task_0qvxmnh">
+ <dc:Bounds x="900" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0arvpzv_di" bpmnElement="SequenceFlow_0arvpzv">
+ <di:waypoint x="1000" y="350" />
+ <di:waypoint x="1060" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0q6s59r_di" bpmnElement="Task_0b5j6rg">
+ <dc:Bounds x="1060" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_04znyto_di" bpmnElement="SubProcess_0p6namq" isExpanded="true">
+ <dc:Bounds x="480" y="650" width="730" height="210" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1qti4dg_di" bpmnElement="StartEvent_1843894">
+ <dc:Bounds x="520" y="742" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1u5ko4h_di" bpmnElement="SequenceFlow_1u5ko4h">
+ <di:waypoint x="556" y="760" />
+ <di:waypoint x="610" y="760" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0xdbw5d_di" bpmnElement="Task_1spbb2x">
+ <dc:Bounds x="610" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05yfw7t_di" bpmnElement="SequenceFlow_05yfw7t">
+ <di:waypoint x="710" y="760" />
+ <di:waypoint x="770" y="760" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0hmczex_di" bpmnElement="Task_0yqtfvh">
+ <dc:Bounds x="770" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c0btia_di" bpmnElement="SequenceFlow_0c0btia">
+ <di:waypoint x="870" y="760" />
+ <di:waypoint x="930" y="760" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0ra7dbt_di" bpmnElement="Task_1s3l3fc">
+ <dc:Bounds x="930" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fsful5_di" bpmnElement="EndEvent_1fsful5">
+ <dc:Bounds x="1092" y="742" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w55zo7_di" bpmnElement="SequenceFlow_1w55zo7">
+ <di:waypoint x="1030" y="760" />
+ <di:waypoint x="1092" y="760" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tcgzv0_di" bpmnElement="SequenceFlow_1tcgzv0">
+ <di:waypoint x="188" y="350" />
+ <di:waypoint x="235" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0dwywjh_di" bpmnElement="SubProcess_1l7gd5k" isExpanded="true">
+ <dc:Bounds x="660" y="950" width="350" height="200" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_18u3hph_di" bpmnElement="StartEvent_0zc2hnn">
+ <dc:Bounds x="700" y="1032" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mifi3x_di" bpmnElement="SequenceFlow_0mifi3x">
+ <di:waypoint x="736" y="1050" />
+ <di:waypoint x="790" y="1050" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_052gdjz_di" bpmnElement="EndEvent_052gdjz">
+ <dc:Bounds x="952" y="1032" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_073yxs4_di" bpmnElement="SequenceFlow_073yxs4">
+ <di:waypoint x="890" y="1050" />
+ <di:waypoint x="952" y="1050" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lzly9f_di" bpmnElement="Task_01va9ms">
+ <dc:Bounds x="790" y="1010" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1lyw619_di" bpmnElement="ExclusiveGateway_1lyw619" isMarkerVisible="true">
+ <dc:Bounds x="785" y="325" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786.5" y="384.5" width="47" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0s7s7zk_di" bpmnElement="SequenceFlow_0s7s7zk">
+ <di:waypoint x="835" y="350" />
+ <di:waypoint x="900" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00g94pg_di" bpmnElement="SequenceFlow_00g94pg">
+ <di:waypoint x="1160" y="350" />
+ <di:waypoint x="1250" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bqfbxf_di" bpmnElement="SequenceFlow_0bqfbxf">
+ <di:waypoint x="810" y="325" />
+ <di:waypoint x="810" y="250" />
+ <di:waypoint x="900" y="250" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="846" y="232" width="17" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_16tdrty_di" bpmnElement="ExclusiveGateway_16tdrty" isMarkerVisible="true">
+ <dc:Bounds x="235" y="325" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="226" y="295" width="77" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jrbkau_di" bpmnElement="SequenceFlow_0jrbkau">
+ <di:waypoint x="285" y="350" />
+ <di:waypoint x="330" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16ewagx_di" bpmnElement="SequenceFlow_16ewagx">
+ <di:waypoint x="260" y="375" />
+ <di:waypoint x="260" y="500" />
+ <di:waypoint x="1300" y="500" />
+ <di:waypoint x="1300" y="390" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="774" y="482" width="13" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0icj4go_di" bpmnElement="ExclusiveGateway_0icj4go" isMarkerVisible="true">
+ <dc:Bounds x="1085" y="95" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1069" y="50" width="82" height="40" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j0e2po_di" bpmnElement="SequenceFlow_1j0e2po">
+ <di:waypoint x="1010" y="120" />
+ <di:waypoint x="1085" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12xn3kz_di" bpmnElement="SequenceFlow_12xn3kz">
+ <di:waypoint x="1135" y="120" />
+ <di:waypoint x="1220" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xipbpr_di" bpmnElement="SequenceFlow_0xipbpr">
+ <di:waypoint x="1110" y="145" />
+ <di:waypoint x="1110" y="190" />
+ <di:waypoint x="810" y="190" />
+ <di:waypoint x="810" y="325" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="946" y="172" width="13" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1knnc2k_di" bpmnElement="Task_1ff6flk">
+ <dc:Bounds x="630" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1r84j75_di" bpmnElement="Task_1ovewjr">
+ <dc:Bounds x="900" y="210" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1amyd7h_di" bpmnElement="SequenceFlow_1amyd7h">
+ <di:waypoint x="1000" y="250" />
+ <di:waypoint x="1300" y="250" />
+ <di:waypoint x="1300" y="310" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sah9so_di" bpmnElement="SequenceFlow_1sah9so">
+ <di:waypoint x="730" y="350" />
+ <di:waypoint x="785" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ssiyug_di" bpmnElement="SequenceFlow_1ssiyug">
+ <di:waypoint x="430" y="350" />
+ <di:waypoint x="480" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0thr8dc_di" bpmnElement="SequenceFlow_0thr8dc">
+ <di:waypoint x="580" y="350" />
+ <di:waypoint x="630" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0r8ad9j_di" bpmnElement="Task_0y1n9ls">
+ <dc:Bounds x="480" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn
new file mode 100644
index 0000000000..6d9df5240d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn
@@ -0,0 +1,332 @@
+<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0prw6yo" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="DeleteSliceService" name="DeleteSliceService" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_1ti9sxe</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0xmiev9" sourceRef="Task_1f3k0gq" targetRef="Task_0gsr9fu" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ti9sxe" sourceRef="StartEvent_1" targetRef="Task_1f3k0gq" />
+ <bpmn:scriptTask id="Task_1f3k0gq" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ti9sxe</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xmiev9</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss= new DeleteSliceService()
+dss.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="Task_0gsr9fu" name="Init Service Operation Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="NSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="NSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0xmiev9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0uehx9h</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0uehx9h" sourceRef="Task_0gsr9fu" targetRef="Task_0walqr6" />
+ <bpmn:scriptTask id="Task_0walqr6" name="Send Async Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0uehx9h</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_16lh6o6</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss= new DeleteSliceService()
+dss.sendAsyncResponse(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_16lh6o6" sourceRef="Task_0walqr6" targetRef="Task_04n2tl9" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1mcgr3m" name="success?">
+ <bpmn:incoming>SequenceFlow_0nl4kfh</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0wel7ie</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0eqx2y2</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0nl4kfh" sourceRef="Task_04n2tl9" targetRef="ExclusiveGateway_1mcgr3m" />
+ <bpmn:sequenceFlow id="SequenceFlow_0wel7ie" name="yes" sourceRef="ExclusiveGateway_1mcgr3m" targetRef="Task_01siwzc">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("WorkflowException") == null}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0eqx2y2" name="no" sourceRef="ExclusiveGateway_1mcgr3m" targetRef="EndEvent_02ix4tc" />
+ <bpmn:endEvent id="EndEvent_02ix4tc">
+ <bpmn:incoming>SequenceFlow_0eqx2y2</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_1jz8wj7" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_18oizb2" sourceRef="Task_0k1pi3g" targetRef="Task_1vklzip" />
+ <bpmn:scriptTask id="Task_0k1pi3g" name="Delete slice service From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0wel7ie</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18oizb2</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss= new DeleteSliceService()
+dss.deleteSliceServiceInstance(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="Task_1vklzip" name="Update Service Operation Status to Success">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">${UrnPropertiesReader.getVariable("mso.adapters.requestDb.auth", execution)}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_18oizb2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1oxmm7d</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:endEvent id="EndEvent_0tyqdpw" name="End">
+ <bpmn:incoming>SequenceFlow_1oxmm7d</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1oxmm7d" sourceRef="Task_1vklzip" targetRef="EndEvent_0tyqdpw" />
+ <bpmn:callActivity id="Task_04n2tl9" name="Do Delete SliceServiceV1" calledElement="DoDeleteSliceServiceV1">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_16lh6o6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0nl4kfh</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_01siwzc" name="Delete Service Profile From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0wel7ie</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_142j1q2</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss= new DeleteSliceService()
+dss.delServiceProfileFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_142j1q2" sourceRef="Task_01siwzc" targetRef="Task_0k1pi3g" />
+ <bpmn:subProcess id="SubProcess_07kf25g" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_1qskwib">
+ <bpmn:outgoing>SequenceFlow_0x8msq9</bpmn:outgoing>
+ <bpmn:errorEventDefinition id="ErrorEventDefinition_1mmlos4" />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_086jahv">
+ <bpmn:incoming>SequenceFlow_10lwgo7</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0x8msq9" sourceRef="StartEvent_1qskwib" targetRef="ScriptTask_19sjlk2" />
+ <bpmn:scriptTask id="ScriptTask_19sjlk2" name="Send Error Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0x8msq9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ihiv5k</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss = new DeleteCustomE2EServiceInstance()
+dss.sendSyncError(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1ihiv5k" sourceRef="ScriptTask_19sjlk2" targetRef="Task_1fxg7am" />
+ <bpmn:sequenceFlow id="SequenceFlow_0zvzs12" sourceRef="Task_1fxg7am" targetRef="ServiceTask_17jq3cx" />
+ <bpmn:scriptTask id="Task_1fxg7am" name="Termination Service Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ihiv5k</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0zvzs12</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss = new DeleteSliceService()
+dss.prepareEndOperationStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_17jq3cx" name="Update Service Operation Status To Terminate">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0zvzs12</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_10lwgo7</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_10lwgo7" sourceRef="ServiceTask_17jq3cx" targetRef="EndEvent_086jahv" />
+ </bpmn:subProcess>
+ <bpmn:subProcess id="SubProcess_0so7l00" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_1jknl5k">
+ <bpmn:outgoing>SequenceFlow_0rasmiu</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0rasmiu" sourceRef="StartEvent_1jknl5k" targetRef="Task_0c422xd" />
+ <bpmn:endEvent id="EndEvent_1vr9nc9">
+ <bpmn:incoming>SequenceFlow_1jipldf</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1jipldf" sourceRef="Task_0c422xd" targetRef="EndEvent_1vr9nc9" />
+ <bpmn:scriptTask id="Task_0c422xd" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0rasmiu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1jipldf</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:subProcess>
+ </bpmn:process>
+ <bpmn:error id="Error_1jz8wj7" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteSliceService">
+ <bpmndi:BPMNEdge id="SequenceFlow_1ti9sxe_di" bpmnElement="SequenceFlow_1ti9sxe">
+ <di:waypoint x="188" y="117" />
+ <di:waypoint x="290" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xmiev9_di" bpmnElement="SequenceFlow_0xmiev9">
+ <di:waypoint x="390" y="117" />
+ <di:waypoint x="480" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="99" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="159" y="142" width="23" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0aqhg4z_di" bpmnElement="Task_1f3k0gq">
+ <dc:Bounds x="290" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1n9ja9t_di" bpmnElement="Task_0gsr9fu">
+ <dc:Bounds x="480" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0uehx9h_di" bpmnElement="SequenceFlow_0uehx9h">
+ <di:waypoint x="580" y="117" />
+ <di:waypoint x="660" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_13qpvgg_di" bpmnElement="Task_0walqr6">
+ <dc:Bounds x="660" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16lh6o6_di" bpmnElement="SequenceFlow_16lh6o6">
+ <di:waypoint x="760" y="117" />
+ <di:waypoint x="840" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1mcgr3m_di" bpmnElement="ExclusiveGateway_1mcgr3m" isMarkerVisible="true">
+ <dc:Bounds x="1025" y="92" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1026" y="73" width="47" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nl4kfh_di" bpmnElement="SequenceFlow_0nl4kfh">
+ <di:waypoint x="940" y="117" />
+ <di:waypoint x="1025" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0wel7ie_di" bpmnElement="SequenceFlow_0wel7ie">
+ <di:waypoint x="1075" y="117" />
+ <di:waypoint x="1164" y="117" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1100" y="98" width="17" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eqx2y2_di" bpmnElement="SequenceFlow_0eqx2y2">
+ <di:waypoint x="1050" y="142" />
+ <di:waypoint x="1050" y="202" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1059" y="169" width="13" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_169jlln_di" bpmnElement="EndEvent_02ix4tc">
+ <dc:Bounds x="1032" y="202" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18oizb2_di" bpmnElement="SequenceFlow_18oizb2">
+ <di:waypoint x="1440" y="117" />
+ <di:waypoint x="1530" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_10g3cz7_di" bpmnElement="Task_0k1pi3g">
+ <dc:Bounds x="1340" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0pct2ne_di" bpmnElement="Task_1vklzip">
+ <dc:Bounds x="1530" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0tyqdpw_di" bpmnElement="EndEvent_0tyqdpw">
+ <dc:Bounds x="1562" y="202" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1570" y="245" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1oxmm7d_di" bpmnElement="SequenceFlow_1oxmm7d">
+ <di:waypoint x="1580" y="157" />
+ <di:waypoint x="1580" y="202" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1igxzig_di" bpmnElement="Task_04n2tl9">
+ <dc:Bounds x="840" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0qqsp7x_di" bpmnElement="Task_01siwzc">
+ <dc:Bounds x="1164" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_142j1q2_di" bpmnElement="SequenceFlow_142j1q2">
+ <di:waypoint x="1264" y="117" />
+ <di:waypoint x="1340" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_07kf25g_di" bpmnElement="SubProcess_07kf25g" isExpanded="true">
+ <dc:Bounds x="340" y="430" width="637" height="162" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1qskwib_di" bpmnElement="StartEvent_1qskwib">
+ <dc:Bounds x="377" y="497" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_086jahv_di" bpmnElement="EndEvent_086jahv">
+ <dc:Bounds x="902" y="497" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x8msq9_di" bpmnElement="SequenceFlow_0x8msq9">
+ <di:waypoint x="413" y="515" />
+ <di:waypoint x="456" y="515" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_19sjlk2_di" bpmnElement="ScriptTask_19sjlk2">
+ <dc:Bounds x="456" y="475" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ihiv5k_di" bpmnElement="SequenceFlow_1ihiv5k">
+ <di:waypoint x="556" y="515" />
+ <di:waypoint x="615" y="515" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zvzs12_di" bpmnElement="SequenceFlow_0zvzs12">
+ <di:waypoint x="715" y="515" />
+ <di:waypoint x="765" y="515" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0bjcnd3_di" bpmnElement="Task_1fxg7am">
+ <dc:Bounds x="615" y="475" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_17jq3cx_di" bpmnElement="ServiceTask_17jq3cx">
+ <dc:Bounds x="765" y="475" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10lwgo7_di" bpmnElement="SequenceFlow_10lwgo7">
+ <di:waypoint x="865" y="515" />
+ <di:waypoint x="902" y="515" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1dd77tu_di" bpmnElement="SubProcess_0so7l00" isExpanded="true">
+ <dc:Bounds x="470" y="650" width="350" height="200" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_14mwxm0_di" bpmnElement="StartEvent_1jknl5k">
+ <dc:Bounds x="510" y="732" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rasmiu_di" bpmnElement="SequenceFlow_0rasmiu">
+ <di:waypoint x="546" y="750" />
+ <di:waypoint x="600" y="750" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1vr9nc9_di" bpmnElement="EndEvent_1vr9nc9">
+ <dc:Bounds x="762" y="732" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jipldf_di" bpmnElement="SequenceFlow_1jipldf">
+ <di:waypoint x="700" y="750" />
+ <di:waypoint x="762" y="750" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0vb5d51_di" bpmnElement="Task_0c422xd">
+ <dc:Bounds x="600" y="710" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn
new file mode 100644
index 0000000000..1f0e10b1c1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn
@@ -0,0 +1,115 @@
+<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_152rp63" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="DoCreateCommunicationService" name="DoCreateCommunicationService" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_0r43nhn</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0r43nhn" sourceRef="StartEvent_1" targetRef="Task_1n00ul2" />
+ <bpmn:scriptTask id="Task_1n00ul2" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0r43nhn</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ojuala</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DoCreateCommunicationService()
+csi.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_13cimkc" name="Create Communication Service Profile" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0mxvw9q</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15e8qrt</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DoCreateCommunicationService()
+csi.createCommunicationServiceProfile(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_02h3nyo" name="Create Communication Service" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ojuala</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0mxvw9q</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DoCreateCommunicationService()
+csi.createCommunicationService(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_0tx74b8" name="end">
+ <bpmn:incoming>SequenceFlow_15e8qrt</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0mxvw9q" sourceRef="Task_02h3nyo" targetRef="Task_13cimkc" />
+ <bpmn:sequenceFlow id="SequenceFlow_15e8qrt" sourceRef="Task_13cimkc" targetRef="EndEvent_0tx74b8" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ojuala" sourceRef="Task_1n00ul2" targetRef="Task_02h3nyo" />
+ <bpmn:subProcess id="SubProcess_0hvqoiu" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_06faevu">
+ <bpmn:outgoing>SequenceFlow_1jckdn4</bpmn:outgoing>
+ <bpmn:errorEventDefinition id="ErrorEventDefinition_1idslt4" />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_1xkvl7n">
+ <bpmn:incoming>SequenceFlow_0ixyf17</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_15u2oe2" name="Process Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1jckdn4</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ixyf17</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0ixyf17" sourceRef="ScriptTask_15u2oe2" targetRef="EndEvent_1xkvl7n" />
+ <bpmn:sequenceFlow id="SequenceFlow_1jckdn4" sourceRef="StartEvent_06faevu" targetRef="ScriptTask_15u2oe2" />
+ </bpmn:subProcess>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateCommunicationService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="179" y="99" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="186" y="142" width="23" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0r43nhn_di" bpmnElement="SequenceFlow_0r43nhn">
+ <di:waypoint x="215" y="117" />
+ <di:waypoint x="290" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ilqwj5_di" bpmnElement="Task_1n00ul2">
+ <dc:Bounds x="290" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0vpnfpe_di" bpmnElement="Task_13cimkc">
+ <dc:Bounds x="660" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03bitgg_di" bpmnElement="Task_02h3nyo">
+ <dc:Bounds x="480" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0tx74b8_di" bpmnElement="EndEvent_0tx74b8">
+ <dc:Bounds x="912" y="99" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="921" y="142" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mxvw9q_di" bpmnElement="SequenceFlow_0mxvw9q">
+ <di:waypoint x="580" y="117" />
+ <di:waypoint x="660" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15e8qrt_di" bpmnElement="SequenceFlow_15e8qrt">
+ <di:waypoint x="760" y="117" />
+ <di:waypoint x="912" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ojuala_di" bpmnElement="SequenceFlow_1ojuala">
+ <di:waypoint x="390" y="117" />
+ <di:waypoint x="480" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0hvqoiu_di" bpmnElement="SubProcess_0hvqoiu" isExpanded="true">
+ <dc:Bounds x="290" y="250" width="417" height="161" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_06faevu_di" bpmnElement="StartEvent_06faevu">
+ <dc:Bounds x="327" y="317" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1xkvl7n_di" bpmnElement="EndEvent_1xkvl7n">
+ <dc:Bounds x="613" y="317" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_15u2oe2_di" bpmnElement="ScriptTask_15u2oe2">
+ <dc:Bounds x="438" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ixyf17_di" bpmnElement="SequenceFlow_0ixyf17">
+ <di:waypoint x="538" y="335" />
+ <di:waypoint x="613" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jckdn4_di" bpmnElement="SequenceFlow_1jckdn4">
+ <di:waypoint x="363" y="335" />
+ <di:waypoint x="438" y="335" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn
new file mode 100644
index 0000000000..5f4816e78f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn
@@ -0,0 +1,205 @@
+<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1p1suc9" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="DoDeleteSliceServiceV1" name="DoDeleteSliceServiceV1" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_0ep5het</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0ep5het" sourceRef="StartEvent_1" targetRef="Task_0etki1p" />
+ <bpmn:sequenceFlow id="SequenceFlow_1qkgvvu" sourceRef="Task_1ujnqtj" targetRef="Task_1fqiyb4" />
+ <bpmn:sequenceFlow id="SequenceFlow_1rgfzzy" sourceRef="Task_1fqiyb4" targetRef="Task_1u755sr" />
+ <bpmn:scriptTask id="Task_1ujnqtj" name="Query Allotted Resource From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_029u1wr</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1qkgvvu</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.getAllottedResFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1fqiyb4" name="Query NSI From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1qkgvvu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1rgfzzy</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.getNSIFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1u755sr" name="Query NSSI List From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1rgfzzy</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_05si1me</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.getNSSIListFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_05si1me" sourceRef="Task_1u755sr" targetRef="Task_1iomfas" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1ogbunu" name="Is all NSSI finished?">
+ <bpmn:incoming>SequenceFlow_15z9iio</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1c4fjbv</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0926ghe</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_0jaitqv" name="End">
+ <bpmn:incoming>SequenceFlow_1c4fjbv</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1c4fjbv" name="yes" sourceRef="ExclusiveGateway_1ogbunu" targetRef="EndEvent_0jaitqv">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isAllNSSIFinished" ) == true)}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_01o2qpv" sourceRef="Task_1iomfas" targetRef="Task_1qqljvu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0c58sw3" sourceRef="Task_1rc7mcw" targetRef="ScriptTask_159855t" />
+ <bpmn:sequenceFlow id="SequenceFlow_0926ghe" name="no" sourceRef="ExclusiveGateway_1ogbunu" targetRef="Task_1iomfas">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isAllNSSIFinished" ) == false)}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:scriptTask id="Task_0etki1p" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0ep5het</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0npmman</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0npmman" sourceRef="Task_0etki1p" targetRef="Task_13k9usx" />
+ <bpmn:scriptTask id="Task_1iomfas" name="Get Current NSSI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0926ghe</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_05si1me</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_01o2qpv</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.getCurrentNSSI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_159855t" name="Parse Next NSSI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0c58sw3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15z9iio</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.parseNextNSSI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_15z9iio" sourceRef="ScriptTask_159855t" targetRef="ExclusiveGateway_1ogbunu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0q83qg3" sourceRef="Task_1qqljvu" targetRef="Task_1rc7mcw" />
+ <bpmn:scriptTask id="Task_1qqljvu" name="Query Slice Profile From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_01o2qpv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0q83qg3</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.querySliceProfileFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_029u1wr" sourceRef="Task_13k9usx" targetRef="Task_1ujnqtj" />
+ <bpmn:scriptTask id="Task_13k9usx" name="Query E2ESlice Serive From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0npmman</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_029u1wr</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.queryE2ESliceSeriveFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_1rc7mcw" name="Do Deallocate NSSI " calledElement="DoDeallocateNSSIV1">
+ <bpmn:extensionElements>
+ <camunda:in source="currentNSSI" target="currentNSSI" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0q83qg3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0c58sw3</bpmn:outgoing>
+ </bpmn:callActivity>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteSliceServiceV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="122" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="159" y="165" width="22" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ep5het_di" bpmnElement="SequenceFlow_0ep5het">
+ <di:waypoint x="188" y="140" />
+ <di:waypoint x="270" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qkgvvu_di" bpmnElement="SequenceFlow_1qkgvvu">
+ <di:waypoint x="700" y="140" />
+ <di:waypoint x="750" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rgfzzy_di" bpmnElement="SequenceFlow_1rgfzzy">
+ <di:waypoint x="850" y="140" />
+ <di:waypoint x="900" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1bj6tw4_di" bpmnElement="Task_1ujnqtj">
+ <dc:Bounds x="600" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xgmbqj_di" bpmnElement="Task_1fqiyb4">
+ <dc:Bounds x="750" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_01fp1vt_di" bpmnElement="Task_1u755sr">
+ <dc:Bounds x="900" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05si1me_di" bpmnElement="SequenceFlow_05si1me">
+ <di:waypoint x="1000" y="140" />
+ <di:waypoint x="1040" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ogbunu_di" bpmnElement="ExclusiveGateway_1ogbunu" isMarkerVisible="true">
+ <dc:Bounds x="1555" y="115" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1560" y="85" width="52" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0jaitqv_di" bpmnElement="EndEvent_0jaitqv">
+ <dc:Bounds x="1692" y="122" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1700" y="168" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c4fjbv_di" bpmnElement="SequenceFlow_1c4fjbv">
+ <di:waypoint x="1605" y="140" />
+ <di:waypoint x="1692" y="140" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1630" y="118" width="17" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01o2qpv_di" bpmnElement="SequenceFlow_01o2qpv">
+ <di:waypoint x="1140" y="140" />
+ <di:waypoint x="1170" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c58sw3_di" bpmnElement="SequenceFlow_0c58sw3">
+ <di:waypoint x="1400" y="140" />
+ <di:waypoint x="1420" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0926ghe_di" bpmnElement="SequenceFlow_0926ghe">
+ <di:waypoint x="1580" y="165" />
+ <di:waypoint x="1580" y="260" />
+ <di:waypoint x="1090" y="260" />
+ <di:waypoint x="1090" y="180" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1329" y="242" width="13" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0icszw6_di" bpmnElement="Task_0etki1p">
+ <dc:Bounds x="270" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0npmman_di" bpmnElement="SequenceFlow_0npmman">
+ <di:waypoint x="370" y="140" />
+ <di:waypoint x="430" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1obnwrr_di" bpmnElement="Task_1iomfas">
+ <dc:Bounds x="1040" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_159855t_di" bpmnElement="ScriptTask_159855t">
+ <dc:Bounds x="1420" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15z9iio_di" bpmnElement="SequenceFlow_15z9iio">
+ <di:waypoint x="1520" y="140" />
+ <di:waypoint x="1555" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q83qg3_di" bpmnElement="SequenceFlow_0q83qg3">
+ <di:waypoint x="1270" y="140" />
+ <di:waypoint x="1300" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0y9ppnc_di" bpmnElement="Task_1qqljvu">
+ <dc:Bounds x="1170" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_029u1wr_di" bpmnElement="SequenceFlow_029u1wr">
+ <di:waypoint x="530" y="140" />
+ <di:waypoint x="600" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0f9rjq4_di" bpmnElement="Task_13k9usx">
+ <dc:Bounds x="430" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_18qkiat_di" bpmnElement="Task_1rc7mcw">
+ <dc:Bounds x="1300" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>