diff options
8 files changed, 584 insertions, 349 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy index 64b84e6b40..f265638423 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy @@ -284,7 +284,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
String operationId = resourceInputObj.getOperationId()
String progress = "100"
- String status = "Created"
+ String status = "finished"
String statusDescription = "SDCN resource creation completed"
execution.getVariable("operationId")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy index 72db6f358d..73230c6f21 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy @@ -1,17 +1,15 @@ - /*- * ============LICENSE_START======================================================= - * ONAP - SO + * OPENECOMP - SO * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,131 +17,72 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.openecomp.mso.bpmn.infrastructure.scripts -import org.json.JSONArray -import org.openecomp.mso.bpmn.common.resource.ResourceRequestBuilder -import org.openecomp.mso.bpmn.core.domain.ModelInfo -import org.openecomp.mso.bpmn.core.domain.Resource -import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition -import org.openecomp.mso.bpmn.infrastructure.properties.BPMNProperties; -import org.apache.http.HttpResponse -import org.json.JSONArray -import org.openecomp.mso.bpmn.common.recipe.BpmnRestClient +import org.json.JSONObject +import org.json.XML; import static org.apache.commons.lang3.StringUtils.*; import groovy.xml.XmlUtil -import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils; import groovy.json.* - -import org.openecomp.mso.bpmn.core.json.JsonUtils -import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil +import org.openecomp.mso.bpmn.common.recipe.ResourceInput; +import org.openecomp.mso.bpmn.common.resource.ResourceRequestBuilder +import org.openecomp.mso.bpmn.core.WorkflowException +import org.openecomp.mso.bpmn.core.json.JsonUtils +import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder +import org.openecomp.mso.rest.APIResponse import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils -import org.openecomp.mso.bpmn.core.WorkflowException -import org.openecomp.mso.rest.APIResponse; -import org.openecomp.mso.rest.RESTClient -import org.openecomp.mso.rest.RESTConfig -import org.openecomp.mso.bpmn.common.recipe.ResourceInput -import com.fasterxml.jackson.databind.ObjectMapper -import java.util.List; import java.util.UUID; -import javax.xml.parsers.DocumentBuilder -import javax.xml.parsers.DocumentBuilderFactory -import org.camunda.bpm.engine.delegate.BpmnError +import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.delegate.DelegateExecution -import org.json.JSONObject; import org.apache.commons.lang3.* import org.apache.commons.codec.binary.Base64; -import org.springframework.web.util.UriUtils; -import org.w3c.dom.Document -import org.w3c.dom.Element -import org.w3c.dom.Node -import org.w3c.dom.NodeList -import org.xml.sax.InputSource - -import com.fasterxml.jackson.jaxrs.json.annotation.JSONP.Def; +import org.springframework.web.util.UriUtils +import org.openecomp.mso.rest.RESTClient +import org.openecomp.mso.rest.RESTConfig +import org.openecomp.mso.rest.APIResponse; +/** + * This groovy class supports the <class>DeleteSDNCCNetworkResource.bpmn</class> process. + * flow for SDNC Network Resource + */ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { - String Prefix="DDELSDNNS_" + String Prefix="DELSDNCRES_" + + ExceptionUtil exceptionUtil = new ExceptionUtil() - public void preProcessRequest (DelegateExecution execution) { - def isDebugEnabled = execution.getVariable("isDebugLogEnabled") - utils.log("INFO"," ***** preProcessSDNCDelete *****", isDebugEnabled) - String msg = "" + JsonUtils jsonUtil = new JsonUtils() - try { - ResourceInput resourceInput = new ObjectMapper().readValue(execution.getVariable("resourceInput"), ResourceInput.class) - - ModelInfo resourceModelInfo = resourceInput.getResourceModelInfo() - execution.setVariable("resourceInvariantUUID", resourceModelInfo.getModelInvariantUuid()) - execution.setVariable("modelVersion", resourceModelInfo.getModelVersion()) - execution.setVariable("resourceUUID", resourceModelInfo.getModelUuid()) - execution.setVariable("resourceType", resourceModelInfo.getModelType()) - - String serviceInstanceId = execution.getVariable("serviceInstanceId") - String serviceInstanceName = execution.getVariable("serviceInstanceName") - String callbackURL = execution.getVariable("sdncCallbackUrl") - String requestId = execution.getVariable("msoRequestId") - String subscriptionServiceType = execution.getVariable("serviceType") - String globalSubscriberId = resourceInput.getGlobalSubscriberId() + SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + public void preProcessRequest(DelegateExecution execution){ + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started preProcessRequest *****", isDebugEnabled) + try { + + //get bpmn inputs from resource request. + String requestId = execution.getVariable("requestId") + String requestAction = execution.getVariable("requestAction") + utils.log("INFO","The requestAction is: " + requestAction, isDebugEnabled) String recipeParamsFromRequest = execution.getVariable("recipeParams") - String serviceId = resourceInput.getServiceInstanceId() - ModelInfo serviceModelInfo = resourceInput.getServiceModelInfo() - String modelInvariantUuid = "" - String modelVersion = "" - String modelUuid = "" - String modelName = "" - - if (serviceModelInfo != null) - { - modelInvariantUuid = serviceModelInfo.getModelInvariantUuid() - modelVersion = serviceModelInfo.getModelVersion() - modelUuid = serviceModelInfo.getModelUuid() - modelName = serviceModelInfo.getModelName() - - execution.setVariable("modelInvariantUuid", serviceModelInfo.getModelInvariantUuid()) - execution.setVariable("modelVersion", serviceModelInfo.getModelVersion()) - execution.setVariable("modelUuid", serviceModelInfo.getModelUuid()) - execution.setVariable("serviceModelName", serviceModelInfo.getModelName()) - - if (modelInvariantUuid == null) { - modelInvariantUuid = "" - } - if (modelVersion == null) { - modelVersion = "" - } - if (modelUuid == null) { - modelUuid = "" - } - if (modelName == null) { - modelName = "" - } - } - if (serviceInstanceName == null) { - serviceInstanceName = "" - } - if (serviceId == null) { - serviceId = "" - } - - def siParamsXml = execution.getVariable("siParamsXml") - def serviceType = execution.getVariable("serviceType") - if (serviceType == null) - { - serviceType = "" - } - - String sdncRequestId = UUID.randomUUID().toString() - + utils.log("INFO","The recipeParams is: " + recipeParamsFromRequest, isDebugEnabled) + String resourceInput = execution.getVariable("resourceInput") + utils.log("INFO","The resourceInput is: " + resourceInput, isDebugEnabled) + //Get ResourceInput Object + ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class) + execution.setVariable(Prefix + "resourceInput", resourceInputObj) + + //Deal with recipeParams String recipeParamsFromWf = execution.getVariable("recipeParamXsd") - - String operationType = "Network" - String sdnc_svcAction = "delete" - + String resourceName = resourceInputObj.getResourceInstanceName() + //For sdnc requestAction default is "NetworkInstance" + String operationType = "Network" if(!StringUtils.isBlank(recipeParamsFromRequest)){ //the operationType from worflow(first node) is second priority. operationType = jsonUtil.getJsonValue(recipeParamsFromRequest, "operationType") @@ -152,91 +91,210 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { //the operationType from worflow(first node) is highest priority. operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType") } - - operationType = "delete" + operationType + "Instance" - - if(StringUtils.containsIgnoreCase(resourceInput.getResourceModelInfo().getModelName(), "overlay")){ + + + //For sdnc, generate svc_action and request_action + String sdnc_svcAction = "delete" + if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "overlay")){ //This will be resolved in R3. sdnc_svcAction ="deactivate" - operationType = "DeActivateDCINetworkInstance" + operationType = "NCINetwork" } - if(StringUtils.containsIgnoreCase(resourceInput.getResourceModelInfo().getModelName(), "underlay")){ + if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "underlay")){ //This will be resolved in R3. - operationType ="DeleteNetworkInstance" - } - - String sdncDelete = - """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1" - xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" - xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1"> - <sdncadapter:RequestHeader> - <sdncadapter:RequestId>${sdncRequestId}</sdncadapter:RequestId> - <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId> - <sdncadapter:SvcAction>${sdnc_svcAction}</sdncadapter:SvcAction> - <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation> - <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl> - <sdncadapter:MsoAction>${serviceType}</sdncadapter:MsoAction> - </sdncadapter:RequestHeader> - <sdncadapterworkflow:SDNCRequestData> - <request-information> - <request-id>${requestId}</request-id> - <source>MSO</source> - <notification-url/> - <order-number/> - <order-version/> - <request-action>${operationType}</request-action> - </request-information> - <service-information> - <service-id>${serviceId}</service-id> - <subscription-service-type>${subscriptionServiceType}</subscription-service-type> - <onap-model-information> - <model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid> - <model-uuid>${modelUuid}</model-uuid> - <model-version>${modelVersion}</model-version> - <model-name>${modelName}</model-name> - </onap-model-information> - <service-instance-id>${serviceInstanceId}</service-instance-id> - <subscriber-name/> - <global-customer-id>${globalSubscriberId}</global-customer-id> - </service-information> - <service-request-input> - <service-instance-name>${serviceInstanceName}</service-instance-name> - ${siParamsXml} - </service-request-input> - </sdncadapterworkflow:SDNCRequestData> - </sdncadapterworkflow:SDNCAdapterWorkflowRequest>""" - - sdncDelete = utils.formatXml(sdncDelete) - - // set operation type and resource type is required to form request body - execution.setVariable("operationType", "DELETE") - execution.setVariable("resourceType", resourceModelInfo.getModelName()) - - //def sdncRequestId2 = UUID.randomUUID().toString() - //String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<") - execution.setVariable("sdncDelete", sdncDelete) -// execution.setVariable("sdncDeactivate", sdncDeactivate) -// utils.log("INFO","sdncDeactivate:\n" + sdncDeactivate, isDebugEnabled) - utils.log("INFO","sdncDelete:\n" + sdncDelete, isDebugEnabled) - + operationType ="Network" + } + String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance" + execution.setVariable(Prefix + "svcAction", sdnc_svcAction) + execution.setVariable(Prefix + "requestAction", sdnc_requestAction) + execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId()) + execution.setVariable("mso-request-id", requestId) + execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId()) + //TODO Here build networkrequest + } catch (BpmnError e) { throw e; - } catch(Exception ex) { - msg = "Exception in preProcessSDNCDelete. " + ex.getMessage() - utils.log("INFO", msg, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage()) + } catch (Exception ex){ + msg = "Exception in preProcessRequest " + ex.getMessage() + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) } - utils.log("INFO"," *****Exit preProcessSDNCDelete *****", isDebugEnabled) } + + /** + * Pre Process the BPMN Flow Request + * Inclouds: + * generate the nsOperationKey + * generate the nsParameters + */ + public void prepareSDNCRequest (DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started prepareSDNCRequest *****", isDebugEnabled) + + try { + // get variables + String sdnc_svcAction = execution.getVariable(Prefix + "svcAction") + String sdnc_requestAction = execution.getVariable(Prefix + "requestAction") + String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback") + String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest") + + String hdrRequestId = execution.getVariable("mso-request-id") + String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId") + String source = execution.getVariable("source") + String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId") + ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput") + String serviceType = resourceInputObj.getServiceType() + String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid() + String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid() + String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion() + String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName() + String globalCustomerId = resourceInputObj.getGlobalSubscriberId() + String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid(); + String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() + String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid() + String modelName = resourceInputObj.getResourceModelInfo().getModelName() + String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion() + // 1. prepare assign topology via SDNC Adapter SUBFLOW call + String sndcTopologyDeleteRequest = + """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" + xmlns:sdncadapter="http://org.openecomp.mso/workflow/sdnc/adapter/schema/v1" + xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"> + <sdncadapter:RequestHeader> + <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId> + <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId> + <sdncadapter:SvcAction>${sdnc_svcAction}</sdncadapter:SvcAction> + <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation> + <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl> + <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction> + </sdncadapter:RequestHeader> + <sdncadapterworkflow:SDNCRequestData> + <request-information> + <request-id>${hdrRequestId}</request-id> + <request-action>${sdnc_requestAction}</request-action> + <source>${source}</source> + <notification-url></notification-url> + <order-number></order-number> + <order-version></order-version> + </request-information> + <service-information> + <service-id>${serviceInstanceId}</service-id> + <subscription-service-type>${serviceType}</subscription-service-type> + <onap-model-information> + <model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid> + <model-uuid>${serviceModelUuid}</model-uuid> + <model-version>${serviceModelVersion}</model-version> + <model-name>${serviceModelName}</model-name> + </onap-model-information> + <service-instance-id>${serviceInstanceId}</service-instance-id> + <global-customer-id>${globalCustomerId}</global-customer-id> + </service-information> + <network-information> + <onap-model-information> + <model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid> + <model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid> + <model-uuid>${modelUuid}</model-uuid> + <model-version>${modelVersion}</model-version> + <model-name>${modelName}</model-name> + </onap-model-information> + </network-information> + <network-request-input> + <network-input-parameters></network-input-parameters> + </network-request-input> + </sdncadapterworkflow:SDNCRequestData> + </aetgt:SDNCAdapterWorkflowRequest>""".trim() + + String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest) + utils.logAudit(sndcTopologyDeleteRequesAsString) + execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyDeleteRequesAsString) + utils.log("INFO","sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled) + + } catch (Exception ex) { + String exceptionMessage = " Bpmn error encountered in DeleteSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + + } + utils.log("INFO"," ***** Exit prepareSDNCRequest *****", isDebugEnabled) + } + private void setProgressUpdateVariables(DelegateExecution execution, String body) { + def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint") + execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) + execution.setVariable("CVFMI_updateResOperStatusRequest", body) + } + + public void prepareUpdateBeforeDeleteSDNCResource(DelegateExecution execution) { + ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput") + String operType = resourceInputObj.getOperationType() + String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() + String ServiceInstanceId = resourceInputObj.getServiceInstanceId() + String operationId = resourceInputObj.getOperationId() + String progress = "20" + String status = "processing" + String statusDescription = "SDCN resource delete invoked" + + execution.getVariable("operationId") + + String body = """ + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:ns="http://org.openecomp.mso/requestsdb"> + <soapenv:Header/> + <soapenv:Body> + <ns:updateResourceOperationStatus> + <operType>${operType}</operType> + <operationId>${operationId}</operationId> + <progress>${progress}</progress> + <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID> + <serviceId>${ServiceInstanceId}</serviceId> + <status>${status}</status> + <statusDescription>${statusDescription}</statusDescription> + </ns:updateResourceOperationStatus> + </soapenv:Body> + </soapenv:Envelope>"""; + + setProgressUpdateVariables(execution, body) - public void postProcessSDNCDelete(DelegateExecution execution, String response) { + } - def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - utils.log("INFO"," ***** postProcessSDNC " + " *****", isDebugEnabled) - String msg = "" - utils.log("INFO"," response " + response, isDebugEnabled) - utils.log("INFO"," *** Exit postProcessSDNC " + " ***", isDebugEnabled) + public void prepareUpdateAfterDeleteSDNCResource(execution) { + ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput") + String operType = resourceInputObj.getOperationType() + String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() + String ServiceInstanceId = resourceInputObj.getServiceInstanceId() + String operationId = resourceInputObj.getOperationId() + String progress = "100" + String status = "finished" + String statusDescription = "SDCN resource delete completed" + + execution.getVariable("operationId") + + String body = """ + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:ns="http://org.openecomp.mso/requestsdb"> + <soapenv:Header/> + <soapenv:Body> + <ns:updateResourceOperationStatus> + <operType>${operType}</operType> + <operationId>${operationId}</operationId> + <progress>${progress}</progress> + <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID> + <serviceId>${ServiceInstanceId}</serviceId> + <status>${status}</status> + <statusDescription>${statusDescription}</statusDescription> + </ns:updateResourceOperationStatus> + </soapenv:Body> + </soapenv:Envelope>"""; + + setProgressUpdateVariables(execution, body) } + public void postDeleteSDNCCall(DelegateExecution execution){ + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started prepareSDNCRequest *****", isDebugEnabled) + String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode") + String responseObj = execution.getVariable(Prefix + "SuccessIndicator") + + utils.log("INFO","response from sdnc, response code :" + responseCode + " response object :" + responseObj, isDebugEnabled) + utils.log("INFO"," ***** Exit prepareSDNCRequest *****", isDebugEnabled) + } } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy index 946c248059..a834431356 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy @@ -335,8 +335,8 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor { String serviceModelInfo = """{ "modelInvariantUuid":"${modelInvariantUuid}", - "modelUuid":"", - "modelVersion":"${modelVersionId}" + "modelUuid":"${modelVersionId}", + "modelVersion":"" }""" execution.setVariable("serviceModelInfo", serviceModelInfo) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy index 5dd8109c74..3591243c3f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy @@ -147,13 +147,11 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { utils.log("INFO", " ======== STARTED sequenceResource Process ======== ", isDebugEnabled) List<Resource> sequencedResourceList = new ArrayList<Resource>() - List<String> wanResources = new ArrayList<String>() + List<Resource> wanResources = new ArrayList<Resource>() // get delete resource list and order list List<Resource> delResourceList = execution.getVariable("deleteResourceList") - // existing resource list - List<ServiceInstance> existResourceList = execution.getVariable("realNSRessources") - + def resourceSequence = BPMNProperties.getResourceSequenceProp() if(resourceSequence != null) { @@ -173,29 +171,26 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { //this is defaule sequence List<VnfResource> vnfResourceList = new ArrayList<VnfResource>() List<AllottedResource> arResourceList = new ArrayList<AllottedResource>() - List<NetworkResource> networkResourceList = new ArrayList<NetworkResource>() - for (Resource rc : delResourceList) { if (rc instanceof VnfResource) { vnfResourceList.add(rc) } else if (rc instanceof NetworkResource) { - networkResourceList.add(rc) + wanResources.add(rc) } else if (rc instanceof AllottedResource) { arResourceList.add(rc) } } sequencedResourceList.addAll(arResourceList) - sequencedResourceList.addAll(networkResourceList) + sequencedResourceList.addAll(wanResources) sequencedResourceList.addAll(vnfResourceList) } String isContainsWanResource = wanResources.isEmpty() ? "false" : "true" execution.setVariable("isContainsWanResource", isContainsWanResource) execution.setVariable("currentResourceIndex", 0) - execution.setVariable("resourceSequence", sequencedResourceList) + execution.setVariable("sequencedResourceList", sequencedResourceList) utils.log("INFO", "resourceSequence: " + resourceSequence, isDebugEnabled) - execution.setVariable("wanResources", wanResources) utils.log("INFO", " ======== END sequenceResource Process ======== ", isDebugEnabled) } @@ -208,19 +203,17 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { utils.log("INFO", " ======== STARTED preResourceDelete Process ======== ", isDebugEnabled) - List<Resource> existResourceList = execution.getVariable("resourceSequence") + List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList") int currentIndex = execution.getVariable("currentResourceIndex") - Resource curResource = existResourceList.get(currentIndex); + Resource curResource = sequencedResourceList.get(currentIndex); String resourceInstanceUUID = curResource.getResourceId() String resourceTemplateUUID = curResource.getModelInfo().getModelUuid() execution.setVariable("resourceInstanceId", resourceInstanceUUID) - execution.setVariable("resourceUuid", resourceTemplateUUID) - execution.setVariable("resourceType", curResource.getModelInfo().getModelName()) execution.setVariable("currentResource", curResource) utils.log("INFO", "Delete Resource Info resourceTemplate Id :" + resourceTemplateUUID + " resourceInstanceId: " - + resourceInstanceUUID, isDebugEnabled) + + resourceInstanceUUID + " resourceModelName: " + curResource.getModelInfo().getModelName(), isDebugEnabled) utils.log("INFO", " ======== END preResourceDelete Process ======== ", isDebugEnabled) } @@ -229,7 +222,7 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { /** * Execute delete workflow for resource */ - public void executeResourceDelete(DelegateExecution execution, String resourceName) { + public void executeResourceDelete(DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") utils.log("INFO", "======== Start executeResourceDelete Process ======== ", isDebugEnabled) String requestId = execution.getVariable("msoRequestId") @@ -237,33 +230,23 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { String serviceType = execution.getVariable("serviceType") String resourceInstanceId = execution.getVariable("resourceInstanceId") - String resourceUuid = execution.getVariable("resourceUuid") + Resource currentResource = execution.getVariable("currentResource") String action = "deleteInstance" - JSONObject resourceRecipe = cutils.getResourceRecipe(execution, resourceUuid, action) + JSONObject resourceRecipe = cutils.getResourceRecipe(execution, currentResource.getModelInfo().getModelUuid(), action) String recipeUri = resourceRecipe.getString("orchestrationUri") int recipeTimeout = resourceRecipe.getInt("recipeTimeout") - String recipeParamXsd = resourceRecipe.isNull("paramXSD") ? "" : resourceRecipe.get("paramXSD") + String recipeParamXsd = resourceRecipe.get("paramXSD") - ResourceInput resourceInput = new ResourceInput(); - - ModelInfo serviceModelInfo = execution.getVariable("serviceModelInfo") - resourceInput.setServiceModelInfo(serviceModelInfo) - Resource currentResource = execution.getVariable("currentResource") + ResourceInput resourceInput = new ResourceInput(); resourceInput.setServiceInstanceId(serviceInstanceId) resourceInput.setResourceInstanceName(currentResource.getResourceInstanceName()) - resourceInput.setGlobalSubscriberId(execution.getVariable("globalSubscriberId")) - - ModelInfo modelInfo = new ModelInfo() - modelInfo.setModelCustomizationUuid(currentResource.getModelInfo().getModelCustomizationUuid()) - modelInfo.setModelUuid(currentResource.getModelInfo().getModelCustomizationUuid()) - modelInfo.setModelInvariantUuid(currentResource.getModelInfo().getModelInvariantUuid()) - modelInfo.setModelName(currentResource.getModelInfo().getModelName()) - modelInfo.setModelVersion(currentResource.getModelInfo().getModelVersion()) - modelInfo.setModelType(currentResource.getModelInfo().getModelType()) - modelInfo.setModelInstanceName(currentResource.getModelInfo().getModelInstanceName()) - resourceInput.setResourceModelInfo(modelInfo) + String globalSubscriberId = execution.getVariable("globalSubscriberId") + resourceInput.setGlobalSubscriberId(globalSubscriberId) + resourceInput.setResourceModelInfo(currentResource.getModelInfo()); + ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo()); resourceInput.setServiceType(serviceType) String recipeURL = BPMNProperties.getProperty("bpelURL", "http://mso:8080") + recipeUri @@ -279,12 +262,47 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { def currentIndex = execution.getVariable("currentResourceIndex") def nextIndex = currentIndex + 1 execution.setVariable("currentResourceIndex", nextIndex) - List<String> resourceSequence = execution.getVariable("resourceSequence") - if(nextIndex >= resourceSequence.size()){ + List<String> sequencedResourceList = execution.getVariable("sequencedResourceList") + if(nextIndex >= sequencedResourceList.size()){ execution.setVariable("allResourceFinished", "true") }else{ execution.setVariable("allResourceFinished", "false") } utils.log("INFO", "======== COMPLETED parseNextResource Process ======== ", isDebugEnabled) } + + public void prepareFinishedProgressForResource(execution) { + String serviceInstanceId = execution.getVariable("serviceInstanceId") + String serviceType = execution.getVariable("serviceType") + String resourceInstanceId = execution.getVariable("resourceInstanceId") + Resource currentResource = execution.getVariable("currentResource") + String resourceCustomizationUuid = currentResource.getModelInfo().getModelCustomizationUuid() + String resourceModelName = currentResource.getModelInfo().getModelName() + String operationType = execution.getVariable("operationType") + String progress = "100" + String status = "finished" + String statusDescription = "The resource instance does not exist for " + resourceModelName + String operationId = execution.getVariable("operationId") + + String body = """ + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:ns="http://org.openecomp.mso/requestsdb"> + <soapenv:Header/> + <soapenv:Body> + <ns:updateResourceOperationStatus> + <operType>${operationType}</operType> + <operationId>${operationId}</operationId> + <progress>${progress}</progress> + <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID> + <serviceId>${ServiceInstanceId}</serviceId> + <status>${status}</status> + <statusDescription>${statusDescription}</statusDescription> + </ns:updateResourceOperationStatus> + </soapenv:Body> + </soapenv:Envelope>"""; + + def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint") + execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) + execution.setVariable("CVFMI_updateResOperStatusRequest", body) + } } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateSDNCNetworkResource.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateSDNCNetworkResource.bpmn index dcd0b56418..46555cf2d4 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateSDNCNetworkResource.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateSDNCNetworkResource.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="CreateSDNCNetworkResource" name="CreateSDNCNetworkResource" isExecutable="true"> <bpmn:startEvent id="createNS_StartEvent" name="createNS_StartEvent"> <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteSDNCNetworkResource.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteSDNCNetworkResource.bpmn index a9e3f5d807..7786299ab8 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteSDNCNetworkResource.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteSDNCNetworkResource.bpmn @@ -1,156 +1,240 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeleteSDNCNetworkResource" name="DeleteSDNCNetworkResource" isExecutable="true"> - <bpmn:startEvent id="createNS_StartEvent" name="deleteNS_StartEvent"> + <bpmn:startEvent id="deleteNetworkResource_StartEvent" name="deleteNetworkResource_StartEvent"> <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing> </bpmn:startEvent> - <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createNS_StartEvent" targetRef="Task_1d5rrfs" /> - <bpmn:endEvent id="EndEvent_1x6k78c" name="Delete SDNC call end"> - <bpmn:incoming>SequenceFlow_1ba6i0r</bpmn:incoming> - </bpmn:endEvent> - <bpmn:sequenceFlow id="SequenceFlow_092fygq" sourceRef="Task_0i59nr9" targetRef="Task_1cglzlg" /> - <bpmn:serviceTask id="Task_0i59nr9" name="Call Custom Delete SDNC Overlay" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask"> - <bpmn:incoming>SequenceFlow_1twf9nk</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_092fygq</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:subProcess id="SubProcess_0rd2egn" triggeredByEvent="true"> - <bpmn:startEvent id="StartEvent_1dikunf"> - <bpmn:outgoing>SequenceFlow_00oxyoj</bpmn:outgoing> - <bpmn:errorEventDefinition /> - </bpmn:startEvent> - <bpmn:endEvent id="EndEvent_1bbyk46"> - <bpmn:incoming>SequenceFlow_0k06srk</bpmn:incoming> - </bpmn:endEvent> - <bpmn:sequenceFlow id="SequenceFlow_00oxyoj" sourceRef="StartEvent_1dikunf" targetRef="Task_0kqrld2" /> - <bpmn:sequenceFlow id="SequenceFlow_0k06srk" sourceRef="Task_0kqrld2" targetRef="EndEvent_1bbyk46" /> - <bpmn:scriptTask id="Task_0kqrld2" name="Log / Print Unexpected Error"> - <bpmn:incoming>SequenceFlow_00oxyoj</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0k06srk</bpmn:outgoing> - <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* -ExceptionUtil ex = new ExceptionUtil() -ex.processJavaException(execution)]]></bpmn:script> - </bpmn:scriptTask> - </bpmn:subProcess> - <bpmn:sequenceFlow id="SequenceFlow_1twf9nk" sourceRef="Task_1t687g1" targetRef="Task_0i59nr9" /> - <bpmn:sequenceFlow id="SequenceFlow_1ba6i0r" sourceRef="Task_1cglzlg" targetRef="EndEvent_1x6k78c" /> - <bpmn:scriptTask id="Task_1t687g1" name="Pre Resource Delete" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_01medil</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1twf9nk</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="deleteNetworkResource_StartEvent" targetRef="Task_1dlrfiw" /> + <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_0tezqd4" /> + <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="prepare SDNC Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing> <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def dsdncr = new DeleteSDNCNetworkResource() -dsdncr.preProcessRequest(execution)]]></bpmn:script> +def dcsi = new DeleteSDNCNetworkResource() +dcsi.prepareSDNCRequest(execution)]]></bpmn:script> </bpmn:scriptTask> - <bpmn:scriptTask id="Task_1cglzlg" name="Post Resource Delete" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_092fygq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1ba6i0r</bpmn:outgoing> + <bpmn:endEvent id="EndEvent_1x6k78c" name="delete SDNC call end"> + <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming> + </bpmn:endEvent> + <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC RSRC Adapter V1 " calledElement="sdncAdapter"> + <bpmn:extensionElements> + <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="sdncAdapterResponse" target="DELSDNCRES_activateSDNCResponse" /> + <camunda:out source="SDNCA_ResponseCode" target="DELSDNCRES_sdncDeleteReturnCode" /> + <camunda:out source="SDNCA_SuccessIndicator" target="DELSDNCRES_SuccessIndicator" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_15mvedq</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1xk5xed</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_1xk5xed" sourceRef="CallActivity_1600xlj" targetRef="Task_0uwlr22" /> + <bpmn:sequenceFlow id="SequenceFlow_0ow44q0" sourceRef="Task_023hred" targetRef="EndEvent_1x6k78c" /> + <bpmn:scriptTask id="Task_023hred" name="post SDNC delete call"> + <bpmn:incoming>SequenceFlow_1vnx1pp</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ow44q0</bpmn:outgoing> <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def dsdncr = new DeleteSDNCNetworkResource() -dsdncr.postProcessSDNCDelete(execution)]]></bpmn:script> +def dcsi = new DeleteSDNCNetworkResource() +dcsi.postDeleteSDNCCall(execution)]]></bpmn:script> </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_01medil" sourceRef="Task_1d5rrfs" targetRef="Task_1t687g1" /> - <bpmn:scriptTask id="Task_1d5rrfs" name="Set RecipeParam" scriptFormat="groovy"> + <bpmn:sequenceFlow id="SequenceFlow_0w2es8j" sourceRef="Task_1dlrfiw" targetRef="Task_13sx2bp" /> + <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="PreprocessIncomingRequest_task" /> + <bpmn:scriptTask id="Task_1dlrfiw" name="Set the Recipe DesignTimeParam" scriptFormat="groovy"> <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_01medil</bpmn:outgoing> - <bpmn:script><![CDATA[String recipeParamXsdDemo=""" -{"operationType":"GRE"}""" - + <bpmn:outgoing>SequenceFlow_0w2es8j</bpmn:outgoing> + <bpmn:script><![CDATA[String recipeParamXsdDemo="""{"operationType":"GRE"}""" String recipeParamXsd="" execution.setVariable("recipeParamXsd", recipeParamXsd)]]></bpmn:script> </bpmn:scriptTask> + <bpmn:scriptTask id="Task_13sx2bp" name="Pre Process Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0w2es8j</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_18l3crb</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DeleteSDNCNetworkResource() +dcsi.preProcessRequest(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1mz0vdx" sourceRef="Task_0tezqd4" targetRef="Task_18tomkl" /> + <bpmn:sequenceFlow id="SequenceFlow_15mvedq" sourceRef="Task_18tomkl" targetRef="CallActivity_1600xlj" /> + <bpmn:scriptTask id="Task_0tezqd4" name="Delete progress update parameters before delete" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1mz0vdx</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DeleteSDNCNetworkResource() +dcsi.prepareUpdateBeforeDeleteSDNCResource(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="Task_0uwlr22" name="Create progress update parameters After delete" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1xk5xed</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1jr6zi0</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DeleteSDNCNetworkResource() +dcsi.prepareUpdateAfterDeleteSDNCResource(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:serviceTask id="Task_18tomkl" name="update progress update"> + <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 QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry> + </camunda:map> + </camunda:inputParameter> + <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</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_1mz0vdx</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_15mvedq</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="ServiceTask_1cm8iwr" name="update progress update"> + <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 QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry> + </camunda:map> + </camunda:inputParameter> + <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</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_1jr6zi0</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1vnx1pp</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1jr6zi0" sourceRef="Task_0uwlr22" targetRef="ServiceTask_1cm8iwr" /> + <bpmn:sequenceFlow id="SequenceFlow_1vnx1pp" sourceRef="ServiceTask_1cm8iwr" targetRef="Task_023hred" /> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteSDNCNetworkResource"> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent"> - <dc:Bounds x="-168" y="111" width="36" height="36" /> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNetworkResource_StartEvent"> + <dc:Bounds x="-111" y="111" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-193" y="147" width="88" height="25" /> + <dc:Bounds x="-136" y="147" width="89" height="28" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln"> - <di:waypoint xsi:type="dc:Point" x="-132" y="129" /> - <di:waypoint xsi:type="dc:Point" x="-60" y="129" /> + <di:waypoint xsi:type="dc:Point" x="-75" y="129" /> + <di:waypoint xsi:type="dc:Point" x="-10" y="129" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-141" y="108" width="90" height="12" /> + <dc:Bounds x="-87.5" y="108" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c"> - <dc:Bounds x="722" y="111" width="36" height="36" /> + <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova"> + <di:waypoint xsi:type="dc:Point" x="413" y="129" /> + <di:waypoint xsi:type="dc:Point" x="460" y="129" /> + <di:waypoint xsi:type="dc:Point" x="500" y="129" /> <bpmndi:BPMNLabel> - <dc:Bounds x="682" y="153" width="88" height="24" /> + <dc:Bounds x="391.5" y="108" width="90" height="12" /> </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task"> + <dc:Bounds x="313" y="89" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_092fygq_di" bpmnElement="SequenceFlow_092fygq"> - <di:waypoint xsi:type="dc:Point" x="419" y="129" /> - <di:waypoint xsi:type="dc:Point" x="527" y="129" /> + <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c"> + <dc:Bounds x="875" y="317" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="428" y="107.5" width="90" height="13" /> + <dc:Bounds x="841" y="359" width="79" height="28" /> </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_1lqz0ta_di" bpmnElement="Task_0i59nr9"> - <dc:Bounds x="319" y="89" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="SubProcess_1u3lwl3_di" bpmnElement="SubProcess_0rd2egn" isExpanded="true"> - <dc:Bounds x="38" y="273" width="350" height="200" /> + <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj"> + <dc:Bounds x="109" y="295" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="StartEvent_0eyldml_di" bpmnElement="StartEvent_1dikunf"> - <dc:Bounds x="69" y="340" width="36" height="36" /> + <bpmndi:BPMNEdge id="SequenceFlow_1xk5xed_di" bpmnElement="SequenceFlow_1xk5xed"> + <di:waypoint xsi:type="dc:Point" x="209" y="335" /> + <di:waypoint xsi:type="dc:Point" x="302" y="335" /> <bpmndi:BPMNLabel> - <dc:Bounds x="41" y="378" width="90" height="13" /> + <dc:Bounds x="210.5" y="314" width="90" height="12" /> </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_1bbyk46_di" bpmnElement="EndEvent_1bbyk46"> - <dc:Bounds x="333" y="340" width="36" height="36" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0"> + <di:waypoint xsi:type="dc:Point" x="795" y="335" /> + <di:waypoint xsi:type="dc:Point" x="875" y="335" /> <bpmndi:BPMNLabel> - <dc:Bounds x="306" y="379" width="90" height="13" /> + <dc:Bounds x="790" y="314" width="90" height="12" /> </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred"> + <dc:Bounds x="695" y="295" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_00oxyoj_di" bpmnElement="SequenceFlow_00oxyoj"> - <di:waypoint xsi:type="dc:Point" x="105" y="358" /> - <di:waypoint xsi:type="dc:Point" x="165" y="358" /> + <bpmndi:BPMNEdge id="SequenceFlow_0w2es8j_di" bpmnElement="SequenceFlow_0w2es8j"> + <di:waypoint xsi:type="dc:Point" x="90" y="129" /> + <di:waypoint xsi:type="dc:Point" x="148" y="129" /> <bpmndi:BPMNLabel> - <dc:Bounds x="90" y="337" width="90" height="13" /> + <dc:Bounds x="74" y="108" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0k06srk_di" bpmnElement="SequenceFlow_0k06srk"> - <di:waypoint xsi:type="dc:Point" x="265" y="358" /> - <di:waypoint xsi:type="dc:Point" x="333" y="358" /> + <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb"> + <di:waypoint xsi:type="dc:Point" x="248" y="129" /> + <di:waypoint xsi:type="dc:Point" x="313" y="129" /> <bpmndi:BPMNLabel> - <dc:Bounds x="254" y="337" width="90" height="13" /> + <dc:Bounds x="235.5" y="108" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1b3k692_di" bpmnElement="Task_0kqrld2"> - <dc:Bounds x="165" y="318" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0lc6l7a_di" bpmnElement="Task_1dlrfiw"> + <dc:Bounds x="-10" y="89" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp"> + <dc:Bounds x="148" y="89" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1twf9nk_di" bpmnElement="SequenceFlow_1twf9nk"> - <di:waypoint xsi:type="dc:Point" x="213" y="129" /> - <di:waypoint xsi:type="dc:Point" x="319" y="129" /> + <bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx"> + <di:waypoint xsi:type="dc:Point" x="606" y="129" /> + <di:waypoint xsi:type="dc:Point" x="638" y="129" /> + <di:waypoint xsi:type="dc:Point" x="638" y="129" /> + <di:waypoint xsi:type="dc:Point" x="738" y="129" /> <bpmndi:BPMNLabel> - <dc:Bounds x="266" y="108" width="0" height="12" /> + <dc:Bounds x="608" y="123" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ba6i0r_di" bpmnElement="SequenceFlow_1ba6i0r"> - <di:waypoint xsi:type="dc:Point" x="627" y="129" /> - <di:waypoint xsi:type="dc:Point" x="722" y="129" /> + <bpmndi:BPMNEdge id="SequenceFlow_15mvedq_di" bpmnElement="SequenceFlow_15mvedq"> + <di:waypoint xsi:type="dc:Point" x="788" y="169" /> + <di:waypoint xsi:type="dc:Point" x="788" y="218" /> + <di:waypoint xsi:type="dc:Point" x="0" y="218" /> + <di:waypoint xsi:type="dc:Point" x="0" y="335" /> + <di:waypoint xsi:type="dc:Point" x="109" y="335" /> <bpmndi:BPMNLabel> - <dc:Bounds x="674.5" y="108" width="0" height="12" /> + <dc:Bounds x="349" y="197" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1t116cs_di" bpmnElement="Task_1t687g1"> - <dc:Bounds x="113" y="89" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4"> + <dc:Bounds x="506" y="89" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_18zliw7_di" bpmnElement="Task_1cglzlg"> - <dc:Bounds x="527" y="89" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22"> + <dc:Bounds x="302" y="295" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_01medil_di" bpmnElement="SequenceFlow_01medil"> - <di:waypoint xsi:type="dc:Point" x="40" y="129" /> - <di:waypoint xsi:type="dc:Point" x="113" y="129" /> + <bpmndi:BPMNShape id="ServiceTask_1q6ssz7_di" bpmnElement="Task_18tomkl"> + <dc:Bounds x="738" y="89" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr"> + <dc:Bounds x="487" y="295" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1jr6zi0_di" bpmnElement="SequenceFlow_1jr6zi0"> + <di:waypoint xsi:type="dc:Point" x="402" y="335" /> + <di:waypoint xsi:type="dc:Point" x="487" y="335" /> <bpmndi:BPMNLabel> - <dc:Bounds x="76.5" y="107.5" width="0" height="13" /> + <dc:Bounds x="444.5" y="314" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1vnx1pp_di" bpmnElement="SequenceFlow_1vnx1pp"> + <di:waypoint xsi:type="dc:Point" x="587" y="335" /> + <di:waypoint xsi:type="dc:Point" x="695" y="335" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="641" y="314" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0f9etr5_di" bpmnElement="Task_1d5rrfs"> - <dc:Bounds x="-60" y="89" width="100" height="80" /> - </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn index 524846f192..4d9bbe98da 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DoDeleteE2EServiceInstance" name="All Resources Deleted" isExecutable="true"> <bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow"> <bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing> @@ -166,7 +166,7 @@ dcsi.postDecomposeService(execution)]]></bpmn:script> <camunda:in source="resourceInstanceIDs" target="resourceInstanceIDs" /> <camunda:in source="operationType" target="operationType" /> <camunda:in source="operationId" target="operationId" /> - <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="serviceDecomposition" target="serviceDecomposition" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1j08ko3</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1cevtpy</bpmn:outgoing> @@ -182,11 +182,6 @@ dcsi.postDecomposeService(execution)]]></bpmn:script> <bpmn:linkEventDefinition name="DecomposeService" /> </bpmn:intermediateThrowEvent> <bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="StartEvent_1qh5a34" /> - <bpmn:scriptTask id="ScriptTask_08a4vhm" name="Send Sync Ack Response" scriptFormat="groovy"> - <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new CompareModelofE2EServiceInstance() -csi.sendSyncResponse(execution)]]></bpmn:script> - </bpmn:scriptTask> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteE2EServiceInstance"> @@ -405,9 +400,6 @@ csi.sendSyncResponse(execution)]]></bpmn:script> <dc:Bounds x="-16" y="-39" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_08a4vhm_di" bpmnElement="ScriptTask_08a4vhm"> - <dc:Bounds x="494" y="260" width="100" height="80" /> - </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn index 2b9b87409d..8da0ae01cd 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn @@ -13,15 +13,15 @@ def ddrs = new DoDeleteResourcesV1() ddrs.preResourceDelete(execution)]]></bpmn:script> </bpmn:scriptTask> <bpmn:scriptTask id="ScriptTask_15zy0jf" name="Execute Delete Resource Recipe" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1qm7owo</bpmn:incoming> + <bpmn:incoming>SequenceFlow_098gain</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1ly5jrs</bpmn:outgoing> <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -String resourceName = execution.getVariable("resourceType") def ddr = new DoDeleteResourcesV1() -ddr.executeResourceDelete(execution, resourceName )]]></bpmn:script> +ddr.executeResourceDelete(execution)]]></bpmn:script> </bpmn:scriptTask> <bpmn:scriptTask id="ScriptTask_1gf78zz" name="Parse Next Resource" scriptFormat="groovy"> <bpmn:incoming>SequenceFlow_1ly5jrs</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0djplpd</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0i1gez5</bpmn:outgoing> <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* def ddr = new DoDeleteResourcesV1() @@ -33,7 +33,7 @@ ddr.parseNextResource(execution)]]></bpmn:script> <bpmn:outgoing>SequenceFlow_1d5mzit</bpmn:outgoing> </bpmn:exclusiveGateway> <bpmn:sequenceFlow id="SequenceFlow_0stqur4" sourceRef="StartEvent_1" targetRef="Task_1ue68b0" /> - <bpmn:sequenceFlow id="SequenceFlow_1qm7owo" sourceRef="ScriptTask_0ngvt9d" targetRef="ScriptTask_15zy0jf" /> + <bpmn:sequenceFlow id="SequenceFlow_1qm7owo" sourceRef="ScriptTask_0ngvt9d" targetRef="ExclusiveGateway_0khn1my" /> <bpmn:sequenceFlow id="SequenceFlow_1ly5jrs" sourceRef="ScriptTask_15zy0jf" targetRef="ScriptTask_1gf78zz" /> <bpmn:sequenceFlow id="SequenceFlow_0i1gez5" sourceRef="ScriptTask_1gf78zz" targetRef="ExclusiveGateway_0rtr0n7" /> <bpmn:sequenceFlow id="SequenceFlow_1oil1t3" name="No" sourceRef="ExclusiveGateway_0rtr0n7" targetRef="ScriptTask_0ngvt9d"> @@ -108,6 +108,46 @@ ddrs.sequenceResource(execution)]]></bpmn:script> def ddrs = new DoDeleteResourcesV1() ddrs.preProcessRequest(execution)]]></bpmn:script> </bpmn:scriptTask> + <bpmn:exclusiveGateway id="ExclusiveGateway_0khn1my" name="Is The Resource Instance Exists"> + <bpmn:incoming>SequenceFlow_1qm7owo</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_098gain</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_19ccmqv</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_098gain" name="yes" sourceRef="ExclusiveGateway_0khn1my" targetRef="ScriptTask_15zy0jf"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("resourceInstanceId" ) != "" )}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:serviceTask id="ServiceTask_1bw1mjh" name="update progress update"> + <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 QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry> + </camunda:map> + </camunda:inputParameter> + <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</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_11bgbsh</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0djplpd</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:scriptTask id="ScriptTask_0shhhxr" name="Prepare progress finished for the resource" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_19ccmqv</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_11bgbsh</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DoDeleteResourcesV1() +dcsi.prepareFinishedProgressForResource(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_11bgbsh" sourceRef="ScriptTask_0shhhxr" targetRef="ServiceTask_1bw1mjh" /> + <bpmn:sequenceFlow id="SequenceFlow_19ccmqv" name="no" sourceRef="ExclusiveGateway_0khn1my" targetRef="ScriptTask_0shhhxr" /> + <bpmn:sequenceFlow id="SequenceFlow_0djplpd" sourceRef="ServiceTask_1bw1mjh" targetRef="ScriptTask_1gf78zz" /> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteResourcesV1"> @@ -121,10 +161,10 @@ ddrs.preProcessRequest(execution)]]></bpmn:script> <dc:Bounds x="392" y="233" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_15zy0jf_di" bpmnElement="ScriptTask_15zy0jf"> - <dc:Bounds x="587" y="233" width="100" height="80" /> + <dc:Bounds x="665" y="233" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1gf78zz_di" bpmnElement="ScriptTask_1gf78zz"> - <dc:Bounds x="802" y="233" width="100" height="80" /> + <dc:Bounds x="865" y="233" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0rtr0n7_di" bpmnElement="ExclusiveGateway_0rtr0n7" isMarkerVisible="true"> <dc:Bounds x="1011" y="248" width="50" height="50" /> @@ -141,23 +181,23 @@ ddrs.preProcessRequest(execution)]]></bpmn:script> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1qm7owo_di" bpmnElement="SequenceFlow_1qm7owo"> <di:waypoint xsi:type="dc:Point" x="492" y="273" /> - <di:waypoint xsi:type="dc:Point" x="587" y="273" /> + <di:waypoint xsi:type="dc:Point" x="550" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="539.5" y="252" width="0" height="12" /> + <dc:Bounds x="476" y="252" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1ly5jrs_di" bpmnElement="SequenceFlow_1ly5jrs"> - <di:waypoint xsi:type="dc:Point" x="687" y="273" /> - <di:waypoint xsi:type="dc:Point" x="802" y="273" /> + <di:waypoint xsi:type="dc:Point" x="765" y="273" /> + <di:waypoint xsi:type="dc:Point" x="865" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="744.5" y="252" width="0" height="12" /> + <dc:Bounds x="770" y="252" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0i1gez5_di" bpmnElement="SequenceFlow_0i1gez5"> - <di:waypoint xsi:type="dc:Point" x="902" y="273" /> + <di:waypoint xsi:type="dc:Point" x="965" y="273" /> <di:waypoint xsi:type="dc:Point" x="1011" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="956.5" y="252" width="0" height="12" /> + <dc:Bounds x="943" y="252" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1oil1t3_di" bpmnElement="SequenceFlow_1oil1t3"> @@ -298,6 +338,49 @@ ddrs.preProcessRequest(execution)]]></bpmn:script> <bpmndi:BPMNShape id="ScriptTask_1tdnal8_di" bpmnElement="Task_1ue68b0"> <dc:Bounds x="38" y="233" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0khn1my_di" bpmnElement="ExclusiveGateway_0khn1my" isMarkerVisible="true"> + <dc:Bounds x="550" y="248" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="536" y="301" width="79" height="28" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_098gain_di" bpmnElement="SequenceFlow_098gain"> + <di:waypoint xsi:type="dc:Point" x="600" y="273" /> + <di:waypoint xsi:type="dc:Point" x="665" y="273" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="624" y="251" width="18" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1bw1mjh_di" bpmnElement="ServiceTask_1bw1mjh"> + <dc:Bounds x="865" y="112" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0shhhxr_di" bpmnElement="ScriptTask_0shhhxr"> + <dc:Bounds x="665" y="112" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_11bgbsh_di" bpmnElement="SequenceFlow_11bgbsh"> + <di:waypoint xsi:type="dc:Point" x="765" y="152" /> + <di:waypoint xsi:type="dc:Point" x="865" y="152" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="815" y="130" width="0" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_19ccmqv_di" bpmnElement="SequenceFlow_19ccmqv"> + <di:waypoint xsi:type="dc:Point" x="575" y="248" /> + <di:waypoint xsi:type="dc:Point" x="575" y="152" /> + <di:waypoint xsi:type="dc:Point" x="665" y="152" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="584" y="193" width="12" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0djplpd_di" bpmnElement="SequenceFlow_0djplpd"> + <di:waypoint xsi:type="dc:Point" x="915" y="192" /> + <di:waypoint xsi:type="dc:Point" x="915" y="213" /> + <di:waypoint xsi:type="dc:Point" x="915" y="213" /> + <di:waypoint xsi:type="dc:Point" x="915" y="233" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="930" y="206" width="0" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> |