summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2018-09-19 12:27:51 +0530
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2018-09-19 12:27:51 +0530
commit8be314c9ee5a67763370a1619ea4e4d7dcfe277c (patch)
tree51f2ee5a84dc04ce73d700388a069bcc07b8cdb5 /bpmn
parent65bb66e63dd1d9fcfa4c12b288b5af91343bee01 (diff)
Update bpmn and groovy files for ccvpn usecase
Update bpmn and groovy files for ccvpn usecase. Change-Id: Ib992d3577c9805b0d5e09afc2d8a6be6ded5b7b3 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com> Issue-ID: SO-689
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy294
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy482
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy269
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy358
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ActivateSDNCNetworkResource.bpmn (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/ActivateSDNCNetworkResource.bpmn)153
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn161
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeActivateSDNCNetworkResource.bpmn (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateSDNCNetworkResource.bpmn)168
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn251
8 files changed, 1210 insertions, 926 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
index 545cba7f8c..c48d000ab3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
@@ -32,14 +32,16 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.logger.MsoLogger
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.logger.MsoLogger
/**
* This groovy class supports the <class>ActivateSDNCCNetworkResource.bpmn</class> process.
* flow for SDNC Network Resource Activate
*/
public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateSDNCNetworkResource.class);
-
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ActivateSDNCNetworkResource.class);
+
String Prefix = "ACTSDNCRES_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
@@ -48,18 +50,19 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ MsoUtils msoUtils = new MsoUtils()
+
+
public void preProcessRequest(DelegateExecution execution) {
- msoLogger.trace("Started preProcessRequest ")
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started preProcessRequest *****")
try {
//get bpmn inputs from resource request.
String requestId = execution.getVariable("mso-request-id")
String requestAction = execution.getVariable("requestAction")
- msoLogger.info("The requestAction is: " + requestAction)
String recipeParamsFromRequest = execution.getVariable("recipeParams")
- msoLogger.info("The recipeParams is: " + recipeParamsFromRequest)
String resourceInput = execution.getVariable("resourceInput")
- msoLogger.info("The resourceInput is: " + resourceInput)
//Get ResourceInput Object
ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
execution.setVariable(Prefix + "resourceInput", resourceInputObj)
@@ -78,9 +81,41 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
}
- // TODO: based on the resource type decide action and operation type
String sdnc_svcAction = "activate"
- operationType = "SOTNConnectivity"
+ switch (resourceInputObj.getResourceModelInfo().getModelName()) {
+ case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/ :
+ operationType = "SOTNConnectivity"
+ break
+
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
+ operationType = "SOTNAttachment"
+ break
+
+ case ~/[\w\s\W]*SiteVF[\w\s\W]*/ :
+ operationType = "Site"
+ break
+
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ operationType = "SDWANDevice"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ operationType = "SDWANPort"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SDWANConnectivity[\w\s\W]*/ :
+ operationType = "SDWANConnectivity"
+ break
+
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ operationType = "SDWANAttachment"
+ break
+
+ default:
+ break
+ }
String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
execution.setVariable(Prefix + "svcAction", sdnc_svcAction)
@@ -92,38 +127,39 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception ex){
msg = "Exception in preProcessRequest " + ex.getMessage()
- msoLogger.debug(msg)
+ msoLogger.debug( msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
public void prepareUpdateAfterActivateSDNCResource(DelegateExecution execution) {
- msoLogger.trace("started prepareUpdateAfterActivateSDNCResource ")
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info("started prepareUpdateAfterActivateSDNCResource ")
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 creation completed"
+ String progress = "80"
+ String status = "activated"
+ String statusDescription = "SDCN resource activation completed"
execution.getVariable("operationId")
String body = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.onap.so/requestsdb">
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
<ns:updateResourceOperationStatus>
- <operType>${MsoUtils.xmlEscape(operType)}</operType>
- <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
- <progress>${MsoUtils.xmlEscape(progress)}</progress>
- <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
- <serviceId>${MsoUtils.xmlEscape(ServiceInstanceId)}</serviceId>
- <status>${MsoUtils.xmlEscape(status)}</status>
- <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ <operType>${msoUtils.xmlEncode(operType)}</operType>
+ <operationId>${msoUtils.xmlEncode(operationId)}</operationId>
+ <progress>${msoUtils.xmlEncode(progress)}</progress>
+ <resourceTemplateUUID>${msoUtils.xmlEncode(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${msoUtils.xmlEncode(ServiceInstanceId)}</serviceId>
+ <status>${msoUtils.xmlEncode(status)}</status>
+ <statusDescription>${msoUtils.xmlEncode(statusDescription)}</statusDescription>
</ns:updateResourceOperationStatus>
</soapenv:Body>
</soapenv:Envelope>""";
@@ -131,8 +167,32 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
setProgressUpdateVariables(execution, body)
}
+ 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)
+ }
+
+ String customizeResourceParam(String networkInputParametersJson) {
+ List<Map<String, Object>> paramList = new ArrayList();
+ JSONObject jsonObject = new JSONObject(networkInputParametersJson);
+ Iterator iterator = jsonObject.keys();
+ while (iterator.hasNext()) {
+ String key = iterator.next();
+ HashMap<String, String> hashMap = new HashMap();
+ hashMap.put("name", key);
+ hashMap.put("value", jsonObject.get(key))
+ paramList.add(hashMap)
+ }
+ Map<String, List<Map<String, Object>>> paramMap = new HashMap();
+ paramMap.put("param", paramList);
+
+ return new JSONObject(paramMap).toString();
+ }
+
public void prepareSDNCRequest (DelegateExecution execution) {
- msoLogger.trace("Started prepareSDNCRequest ")
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info("Started prepareSDNCRequest ")
try {
// get variables
@@ -141,11 +201,13 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String parentServiceInstanceId = execution.getVariable("parentServiceInstanceId")
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 networkInstanceId = execution.getVariable("networkInstanceId")
String serviceType = resourceInputObj.getServiceType()
String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
@@ -165,172 +227,169 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String sdncTopologyActivateRequest = ""
switch (modelName) {
- case ~/^Site$/:
- sdncTopologyActivateRequest =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
- xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteVF[\w\s\W]*/:
+ sdncTopologyActivateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
<sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
<sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
</sdncadapter:RequestHeader>
<sdncadapterworkflow:SDNCRequestData>
<request-information>
- <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
+ <subscriber-name>${msoUtils.xmlEncode(globalCustomerId)}</subscriber-name>
</service-information>
<vnf-information>
- <vnf-id></vnf-id>
+ <vnf-id>${msoUtils.xmlEncode(networkInstanceId)}</vnf-id>
<vnf-type></vnf-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</vnf-information>
- <vnf-input-parameters>
- <param>${MsoUtils.xmlEscape(netowrkInputParameters)}</param>
- </vnf-input-parameters>
<vnf-request-input>
- <request-version></request-version>
- <vnf-name></vnf-name>
- <neutron-id></neutron-id>
- <contrail-network-fqdn></contrail-network-fqdn>
- <subnets-data>
- <subnet-data>
- <element>
- <ip-version></ip-version>
- <subnet-id></subnet-id>
- </subnet-data>
- </subnets-data>
- </vnf-request-input>
+ <vnf-input-parameters>
+ $netowrkInputParameters
+ </vnf-input-parameters>
+ <request-version></request-version>
+ <vnf-name></vnf-name>
+ <vnf-networks>
+ </vnf-networks>
+ </vnf-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
break
- case ~/^SOTNAttachment$/:
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/:
sdncTopologyActivateRequest =
"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>connection-attachment-topology-operation</sdncadapter:SvcOperation>
<sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
<sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
</sdncadapter:RequestHeader>
<sdncadapterworkflow:SDNCRequestData>
<request-information>
- <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
</service-information>
<allotted-resource-information>
<!-- TODO: to be filled as per the request input -->
- <allotted-resource-input></allotted-resource-input>
+ <allotted-resource-id>${msoUtils.xmlEncode(networkInstanceId)}</allotted-resource-id>
<allotted-resource-type></allotted-resource-type>
- <parent-service-instance-id><parent-service-instance-id>
+ <parent-service-instance-id>$parentServiceInstanceId</parent-service-instance-id>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</allotted-resource-information>
<connection-attachment-request-input>
- <param>${MsoUtils.xmlEscape(netowrkInputParameters)}</param>
+ $netowrkInputParameters
</connection-attachment-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
break
+ // for SDWANConnectivity and SOTN Connectivity
default:
sdncTopologyActivateRequest =
"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(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>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
</service-information>
<network-information>
<!-- TODO: to be filled by response from create -->
- <network-id></network-id>
+ <network-id>${msoUtils.xmlEncode(networkInstanceId)}</network-id>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</network-information>
<network-request-input>
- <network-input-parameters>${MsoUtils.xmlEscape(netowrkInputParameters)}</network-input-parameters>
+ <network-input-parameters>$netowrkInputParameters</network-input-parameters>
</network-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
@@ -338,21 +397,20 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
String sdncTopologyActivateRequesAsString = utils.formatXml(sdncTopologyActivateRequest)
- msoLogger.debug(sdncTopologyActivateRequesAsString)
execution.setVariable("sdncAdapterWorkflowRequest", sdncTopologyActivateRequesAsString)
- msoLogger.debug("sdncAdapterWorkflowRequest - " + "\n" + sdncTopologyActivateRequesAsString)
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in CreateSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage()
- msoLogger.debug(exceptionMessage)
+ msoLogger.debug( exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
- msoLogger.trace("Exit prepareSDNCRequest ")
+ msoLogger.info(" ***** Exit prepareSDNCRequest *****")
}
- public void postCreateSDNCCall(DelegateExecution execution) {
- msoLogger.trace("started postCreateSDNCCall ")
+ public void postActivateSDNCCall(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info("started postCreateSDNCCall ")
String responseCode = execution.getVariable(Prefix + "sdncCreateReturnCode")
String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
@@ -361,24 +419,22 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void sendSyncResponse(DelegateExecution execution) {
- msoLogger.trace("started sendSyncResponse ")
-
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+ msoLogger.dubug(" *** sendSyncResponse *** ")
try {
String operationStatus = "finished"
// RESTResponse for main flow
String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
- utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled)
+ msoLogger.dubug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
sendWorkflowResponse(execution, 202, resourceOperationResp)
execution.setVariable("sentSyncResponse", true)
} catch (Exception ex) {
String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug( msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ msoLogger.dubug(" ***** Exit sendSyncResopnse *****")
}
} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index c819da4be4..5255b37bb0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -20,40 +20,54 @@
package org.onap.so.bpmn.infrastructure.scripts
+import org.json.JSONObject
+import org.json.XML
+import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiResponse;
+
import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.recipe.ResourceInput;
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
+import org.onap.so.rest.APIResponse
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.AaiUtil
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.json.JSONObject
-import org.json.XML;
-import org.onap.so.bpmn.common.recipe.ResourceInput;
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.apache.commons.lang3.*
import org.onap.so.bpmn.common.scripts.MsoUtils
-import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MsoLogger
-import groovy.json.*
-
/**
* This groovy class supports the <class>CreateSDNCCNetworkResource.bpmn</class> process.
* flow for SDNC Network Resource Create
*/
public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateSDNCNetworkResource.class);
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateSDNCNetworkResource.class);
String Prefix="CRESDNCRES_"
-
+
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
-
+
+ MsoUtils msoUtils = new MsoUtils()
+
public void preProcessRequest(DelegateExecution execution){
- msoLogger.trace("Started preProcessRequest ")
- try {
-
+
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started preProcessRequest *****")
+ try {
+
//get bpmn inputs from resource request.
String requestId = execution.getVariable("mso-request-id")
String requestAction = execution.getVariable("requestAction")
@@ -65,12 +79,12 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
//Get ResourceInput Object
ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
execution.setVariable(Prefix + "resourceInput", resourceInputObj)
-
+
//Deal with recipeParams
String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
- String resourceName = resourceInputObj.getResourceInstanceName()
+ String resourceName = resourceInputObj.getResourceInstanceName()
//For sdnc requestAction default is "createNetworkInstance"
- String operationType = "Network"
+ String operationType = "Network"
if(!StringUtils.isBlank(recipeParamsFromRequest)){
//the operationType from worflow(first node) is second priority.
operationType = jsonUtil.getJsonValue(recipeParamsFromRequest, "operationType")
@@ -79,27 +93,70 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
//the operationType from worflow(first node) is highest priority.
operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
}
-
-
+
+
//For sdnc, generate svc_action and request_action
String sdnc_svcAction = "create"
- if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "overlay")){
- //This will be resolved in R3.
- sdnc_svcAction ="activate"
- operationType = "NCINetwork"
+ switch (resourceInputObj.getResourceInstanceName()) {
+
+ case ~/[\w\s\W]*overlay[\w\s\W]*/ :
+ //This will be resolved in R3.
+ sdnc_svcAction ="activate"
+ operationType = "NCINetwork"
+ break
+
+ case ~/[\w\s\W]*underlay[\w\s\W]*/ :
+ //This will be resolved in R3.
+ operationType ="Network"
+ break
+
+ case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/ :
+ operationType = "SOTNConnectivity"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
+ operationType = "SOTNAttachment"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SiteVF[\w\s\W]*/ :
+ operationType = "Site"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ operationType = "SDWANDevice"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ operationType = "SDWANPort"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SDWANConnectivity[\w\s\W]*/ :
+ operationType = "SDWANConnectivity"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ operationType = "SDWANAttachment"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ default:
+ break
}
- if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "underlay")){
- //This will be resolved in R3.
- operationType ="Network"
- }
- String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
- execution.setVariable(Prefix + "svcAction", sdnc_svcAction)
+
+ 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){
@@ -108,7 +165,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
-
+
String customizeResourceParam(String networkInputParametersJson) {
List<Map<String, Object>> paramList = new ArrayList();
JSONObject jsonObject = new JSONObject(networkInputParametersJson);
@@ -125,7 +182,65 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
return new JSONObject(paramMap).toString();
}
-
+
+ /**
+ * This method updates the resource input by collecting required info from AAI
+ * @param execution
+ */
+ public void updateResourceInput(DelegateExecution execution) {
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+
+ switch (modelName) {
+ case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/:
+
+ def resourceInput = resourceInputObj.getResourceParameters()
+ String incomingRequest = resourceInputObj.getRequestsInputs()
+ String serviceParameters = JsonUtils.getJsonValue(incomingRequest, "service.parameters")
+ String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs")
+ JSONObject inputParameters = new JSONObject(requestInputs)
+ if(inputParameters.has("local-access-provider-id")) {
+ String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.access-provider-id", inputParameters.get("local-access-provider-id"))
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.access-client-id", inputParameters.get("local-access-client-id"))
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.access-topology-id", inputParameters.get("local-access-topology-id"))
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.access-ltp-id", inputParameters.get("local-access-ltp-id"))
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.access-node-id", inputParameters.get("local-access-node-id"))
+ resourceInputObj.setResourceParameters(uResourceInput)
+ execution.setVariable(Prefix + "resourceInput", resourceInputObj)
+ }
+
+ break
+
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
+ // fill attachment TP in networkInputParamJson
+ String customer = resourceInputObj.getGlobalSubscriberId()
+ String serviceType = resourceInputObj.getServiceType()
+
+ def vpnName = StringUtils.containsIgnoreCase(modelName, "sotnvpnattachment") ? "sotnvpnattachmentvf_sotncondition_sotnVpnName" : "sdwanvpnattachmentvf_sdwancondition_sdwanVpnName"
+ String parentServiceName = jsonUtil.getJsonValueForKey(resourceInputObj.getRequestsInputs(), vpnName)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ String customerUri = aaiUtil.getBusinessCustomerUri(execution) + "/" + customer
+ String aai_service_query_url = aai_endpoint + customerUri + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances?service-instance-name=" + parentServiceName
+
+ APIResponse aaiResponse = aaiUtil.executeAAIGetCall(execution, aai_service_query_url)
+ def parentServiceInstanceId = getParentServiceInstnaceId(aaiResponse)
+ execution.setVariable("parentServiceInstanceId", parentServiceInstanceId)
+ break
+
+ default:
+ break
+ }
+ }
+
+ private String getParentServiceInstnaceId(APIResponse aaiResponse) {
+ String response = aaiResponse.getResponseBodyAsString()
+ def xmlResp = new XmlParser().parseText(response)
+ return "${xmlResp?."service-instance"[0]?."service-instance-id"[0]?.text()}"
+ }
+
/**
* Pre Process the BPMN Flow Request
* Inclouds:
@@ -133,15 +248,17 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
* generate the nsParameters
*/
public void prepareSDNCRequest (DelegateExecution execution) {
- msoLogger.trace("Started prepareSDNCRequest ")
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started prepareSDNCRequest *****")
try {
// get variables
- String sdnc_svcAction = execution.getVariable(Prefix + "svcAction")
+ String sdnc_svcAction = execution.getVariable(Prefix + "svcAction")
String sdnc_requestAction = execution.getVariable(Prefix + "requestAction")
String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String parentServiceInstanceId = execution.getVariable("parentServiceInstanceId")
String hdrRequestId = execution.getVariable("mso-request-id")
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
String source = execution.getVariable("source")
@@ -166,176 +283,173 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String sdncTopologyCreateRequest = ""
switch (modelName) {
- case ~/^Site$/:
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteVF[\w\s\W]*/:
sdncTopologyCreateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
<sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
<sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
</sdncadapter:RequestHeader>
<sdncadapterworkflow:SDNCRequestData>
<request-information>
- <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
+ <subscriber-name>${msoUtils.xmlEncode(globalCustomerId)}</subscriber-name>
</service-information>
- <subscriber-name>${MsoUtils.xmlEscape(globalCustomerId)}</subscriber-name>
<vnf-information>
- <!-- TODO: to be filled as per the request input -->
<vnf-id></vnf-id>
<vnf-type></vnf-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
- </network-information>
- <vnf-input-parameters>
- <network-input-parameters>${MsoUtils.xmlEscape(netowrkInputParameters)}</network-input-parameters>
- </vnf-input-parameters>
+ </vnf-information>
<vnf-request-input>
- <request-version></request-version>
- <vnf-name></vnf-name>
- <neutron-id></neutron-id>
- <contrail-network-fqdn></contrail-network-fqdn>
- <subnets-data>
- <subnet-data>
- <element>
- <ip-version></ip-version>
- <subnet-id></subnet-id>
- </subnet-data>
- </subnets-data>
- </vnf-request-input>
+ <vnf-input-parameters>
+ $netowrkInputParameters
+ </vnf-input-parameters>
+ <request-version></request-version>
+ <vnf-name></vnf-name>
+ <vnf-networks>
+ </vnf-networks>
+ </vnf-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
break
- case ~/^SOTNAttachment$/:
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
sdncTopologyCreateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>connection-attachment-topology-operation</sdncadapter:SvcOperation>
<sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
<sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
</sdncadapter:RequestHeader>
<sdncadapterworkflow:SDNCRequestData>
<request-information>
- <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
+ <subscriber-name>${msoUtils.xmlEncode(globalCustomerId)}</subscriber-name>
</service-information>
- <subscriber-name>${MsoUtils.xmlEscape(globalCustomerId)}</subscriber-name>
<allotted-resource-information>
<!-- TODO: to be filled as per the request input -->
+ <allotted-resource-id></allotted-resource-id>
<allotted-resource-type></allotted-resource-type>
- <parent-service-instance-id><parent-service-instance-id>
+ <parent-service-instance-id>$parentServiceInstanceId</parent-service-instance-id>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</allotted-resource-information>
<connection-attachment-request-input>
- <param>${MsoUtils.xmlEscape(netowrkInputParameters)}</param>
+ $netowrkInputParameters
</connection-attachment-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
break
+ // for SDWANConnectivity and SOTNConnectivity:
default:
sdncTopologyCreateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(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>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
</service-information>
<network-information>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</network-information>
<network-request-input>
- <network-input-parameters>${MsoUtils.xmlEscape(netowrkInputParameters)}</network-input-parameters>
+ <network-input-parameters>$netowrkInputParameters</network-input-parameters>
</network-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
}
-
+
String sndcTopologyCreateRequesAsString = utils.formatXml(sdncTopologyCreateRequest)
- msoLogger.debug(sndcTopologyCreateRequesAsString)
+ utils.logAudit(sndcTopologyCreateRequesAsString)
execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyCreateRequesAsString)
msoLogger.debug("sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyCreateRequesAsString)
@@ -345,8 +459,8 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
- msoLogger.trace("Exit prepareSDNCRequest ")
- }
+ msoLogger.info(" ***** Exit prepareSDNCRequest *****")
+ }
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
@@ -368,17 +482,17 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String body = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.onap.so/requestsdb">
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
<ns:updateResourceOperationStatus>
- <operType>${MsoUtils.xmlEscape(operType)}</operType>
- <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
- <progress>${MsoUtils.xmlEscape(progress)}</progress>
- <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
- <serviceId>${MsoUtils.xmlEscape(ServiceInstanceId)}</serviceId>
- <status>${MsoUtils.xmlEscape(status)}</status>
- <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ <operType>${msoUtils.xmlEncode(operType)}</operType>
+ <operationId>${msoUtils.xmlEncode(operationId)}</operationId>
+ <progress>${msoUtils.xmlEncode(progress)}</progress>
+ <resourceTemplateUUID>${msoUtils.xmlEncode(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${msoUtils.xmlEncode(ServiceInstanceId)}</serviceId>
+ <status>${msoUtils.xmlEncode(status)}</status>
+ <statusDescription>${msoUtils.xmlEncode(statusDescription)}</statusDescription>
</ns:updateResourceOperationStatus>
</soapenv:Body>
</soapenv:Envelope>""";
@@ -395,23 +509,23 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String operationId = resourceInputObj.getOperationId()
String progress = "100"
String status = "finished"
- String statusDescription = "SDCN resource creation completed"
+ String statusDescription = "SDCN resource creation and activation completed"
execution.getVariable("operationId")
String body = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.onap.so/requestsdb">
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
<ns:updateResourceOperationStatus>
- <operType>${MsoUtils.xmlEscape(operType)}</operType>
- <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
- <progress>${MsoUtils.xmlEscape(progress)}</progress>
- <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
- <serviceId>${MsoUtils.xmlEscape(ServiceInstanceId)}</serviceId>
- <status>${MsoUtils.xmlEscape(status)}</status>
- <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ <operType>${msoUtils.xmlEncode(operType)}</operType>
+ <operationId>${msoUtils.xmlEncode(operationId)}</operationId>
+ <progress>${msoUtils.xmlEncode(progress)}</progress>
+ <resourceTemplateUUID>${msoUtils.xmlEncode(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${msoUtils.xmlEncode(ServiceInstanceId)}</serviceId>
+ <status>${msoUtils.xmlEncode(status)}</status>
+ <statusDescription>${msoUtils.xmlEncode(statusDescription)}</statusDescription>
</ns:updateResourceOperationStatus>
</soapenv:Body>
</soapenv:Envelope>""";
@@ -419,32 +533,70 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
setProgressUpdateVariables(execution, body)
}
- public void postCreateSDNCCall(DelegateExecution execution){
- msoLogger.trace("Started prepareSDNCRequest ")
+ public void afterCreateSDNCCall(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started prepareSDNCRequest *****")
String responseCode = execution.getVariable(Prefix + "sdncCreateReturnCode")
String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
-
+
+ def isActivateRequried = execution.getVariable("isActivateRequired")
+ if (StringUtils.equalsIgnoreCase(isActivateRequried, "true")) {
+ def instnaceId = getInstnaceId(execution)
+ execution.setVariable("networkInstanceId", instnaceId)
+ }
+
msoLogger.info("response from sdnc, response code :" + responseCode + " response object :" + responseObj)
- msoLogger.trace("Exit prepareSDNCRequest ")
+ msoLogger.info(" ***** Exit prepareSDNCRequest *****")
+ }
+
+ private def getInstnaceId(DelegateExecution execution) {
+ def responce = new XmlSlurper().parseText(execution.getVariable("CRENWKI_createSDNCResponse"))
+ def data = responce.toString()
+ data = data.substring(data.indexOf("<"))
+
+ def resp = new XmlSlurper().parseText(data)
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+ def val = ""
+
+ switch (modelName) {
+ case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/ :
+ case ~/[\w\s\W]*SDWANConnectivity[\w\s\W]*/ :
+ val = resp."network-response-information"."instance-id"
+ break
+
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*Site[\w\s\W]*/:
+ val = resp."vnf-response-information"."instance-id"
+ break
+
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/:
+ val = resp."connection-attachment-response-information"."instance-id"
+ break
+ }
+
+ return val.toString()
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.debug(" *** sendSyncResponse *** ")
+
+ try {
+ String operationStatus = "finished"
+ // RESTResponse for main flow
+ String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
+ msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
+ sendWorkflowResponse(execution, 202, resourceOperationResp)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.debug(" ***** Exit sendSyncResopnse *****")
}
-
- public void sendSyncResponse (DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
-
- try {
- String operationStatus = "finished"
- // RESTResponse for main flow
- String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
- utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled)
- sendWorkflowResponse(execution, 202, resourceOperationResp)
- execution.setVariable("sentSyncResponse", true)
-
- } catch (Exception ex) {
- String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
- }
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
index a63aad14a2..b6ea9f3fef 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
@@ -32,14 +32,15 @@ import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.logger.MsoLogger
/**
* This groovy class supports the <class>ActivateSDNCCNetworkResource.bpmn</class> process.
* flow for SDNC Network Resource Activate
*/
public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- CreateSDNCNetworkResource.class);
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeActivateSDNCNetworkResource.class);
String Prefix = "DEACTSDNCRES_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
@@ -48,21 +49,22 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ MsoUtils msoUtils = new MsoUtils()
+
public void preProcessRequest(DelegateExecution execution) {
- msoLogger.info(" ***** started preProcessRequest*****")
+
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started preProcessRequest *****")
try {
//get bpmn inputs from resource request.
String requestId = execution.getVariable("mso-request-id")
String requestAction = execution.getVariable("requestAction")
- msoLogger.info("The requestAction is: " + requestAction)
String recipeParamsFromRequest = execution.getVariable("recipeParams")
- msoLogger.info("The recipeParams is: " + recipeParamsFromRequest)
String resourceInput = execution.getVariable("resourceInput")
- msoLogger.info("The resourceInput is: " + resourceInput)
//Get ResourceInput Object
- org.onap.so.bpmn.common.recipe.ResourceInput resourceInputObj = org.onap.so.bpmn.common.resource.ResourceRequestBuilder.getJsonObject(resourceInput, org.onap.so.bpmn.common.recipe.ResourceInput.class)
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
execution.setVariable(Prefix + "resourceInput", resourceInputObj)
//Deal with recipeParams
@@ -82,7 +84,40 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
// TODO: based on the resource type decide action and operation type
String sdnc_svcAction = "deactivate"
- operationType = "SOTNConnectivity"
+ switch (resourceInputObj.getResourceModelInfo().getModelName()) {
+ case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/ :
+ operationType = "SOTNConnectivity"
+ break
+
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
+ operationType = "SOTNAttachment"
+ break
+
+ case ~/[\w\s\W]*SiteVF[\w\s\W]*/ :
+ operationType = "Site"
+ break
+
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ operationType = "SDWANDevice"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SDWANConnectivity[\w\s\W]*/ :
+ operationType = "SDWANConnectivity"
+ break
+
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ operationType = "SDWANAttachment"
+ break
+
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ operationType = "SDWANPort"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ default:
+ break
+ }
String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
execution.setVariable(Prefix + "svcAction", sdnc_svcAction)
@@ -102,7 +137,8 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
}
public void prepareSDNCRequest(DelegateExecution execution) {
- msoLogger.info(" ***** started prepareSDNCRequest *****")
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started prepareSDNCRequest *****")
try {
// get variables
@@ -115,7 +151,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
String source = execution.getVariable("source")
String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
- org.onap.so.bpmn.common.recipe.ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
String serviceType = resourceInputObj.getServiceType()
String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
@@ -127,175 +163,164 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
String modelName = resourceInputObj.getResourceModelInfo().getModelName()
String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
+ String resourceInstnaceId = resourceInputObj.getResourceInstancenUuid()
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sdncTopologyDeleteRequest = ""
switch (modelName) {
- case ~/^Site$/:
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteVF[\w\s\W]*/:
sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
<sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
<sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
</sdncadapter:RequestHeader>
<sdncadapterworkflow:SDNCRequestData>
<request-information>
- <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
- <subscriber-name></subscriber-name>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
+ <subscriber-name>${msoUtils.xmlEncode(globalCustomerId)}</subscriber-name>
</service-information>
<vnf-information>
- <!-- TODO: to be filled as per the request input -->
- <vnf-id></vnf-id>
+ <vnf-id>$resourceInstnaceId</vnf-id>
<vnf-type></vnf-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
- </network-information>
+ </vnf-information>
<vnf-request-input>
- <request-version></request-version>
- <vnf-name></vnf-name>
- <vnf-networks>
- <vnf-network>
- <network-role></network-role>
- <network-name></network-name>
- <neutron-id></neutron-id>
- <network-id></network-id>
- <contrail-network-fqdn></contrail-network-fqdn>
- <subnets-data>
- <subnet-data>
- <ip-version></ip-version>
- <subnet-id></subnet-id>
- </subnet-data>
- </subnets-data>
- </vnf-network>
+ <vnf-input-parameters>
+ </vnf-input-parameters>
+ <request-version></request-version>
+ <vnf-name></vnf-name>
+ <vnf-networks>
</vnf-networks>
- </vnf-request-input>
- <vnf-input-parameters>
- <param></param>
- </vnf-input-parameters>
+ </vnf-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
break
- case ~/^SOTNAttachment$/:
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>connection-attachment-topology-operation</sdncadapter:SvcOperation>
<sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
<sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
</sdncadapter:RequestHeader>
<sdncadapterworkflow:SDNCRequestData>
<request-information>
- <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
<subscriber-name></subscriber-name>
</service-information>
<allotted-resource-information>
- <!-- TODO: to be filled as per the request input -->
- <allotted-resource-id></allotted-resource-id>
+ <allotted-resource-id>$resourceInstnaceId</allotted-resource-id>
<allotted-resource-type></allotted-resource-type>
<parent-service-instance-id></parent-service-instance-id>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</allotted-resource-information>
<connection-attachment-request-input>
- <param></param>
</connection-attachment-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
break
+
default:
sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(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>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
</service-information>
<network-information>
+ <network-id>$resourceInstnaceId</network-id>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</network-information>
<network-request-input>
@@ -305,10 +330,10 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
}
- String sndcTopologyDeleteRequesAsString = utils.formatXml(sdncTopologyDeleteRequest)
- utils.logAudit(sndcTopologyDeleteRequesAsString)
- execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyDeleteRequesAsString)
- msoLogger.info("sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyDeleteRequesAsString)
+ String sdncTopologyDeleteRequesAsString = utils.formatXml(sdncTopologyDeleteRequest)
+ utils.logAudit(sdncTopologyDeleteRequesAsString)
+ execution.setVariable("sdncAdapterWorkflowRequest", sdncTopologyDeleteRequesAsString)
+ msoLogger.info("sdncAdapterWorkflowRequest - " + "\n" + sdncTopologyDeleteRequesAsString)
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DeleteSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage()
@@ -320,32 +345,30 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
}
public void prepareUpdateAfterDeActivateSDNCResource(DelegateExecution execution) {
- msoLogger.info("***** started prepareUpdateAfterDeActivateSDNCResource *****")
-
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"
+ String progress = "50"
+ String status = "deactivated"
+ String statusDescription = "SDCN resource deactivation completed"
//String operationId = execution.getVariable("operationId")
String body = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.onap.so/requestsdb">
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
<ns:updateResourceOperationStatus>
- <operType>${MsoUtils.xmlEscape(operType)}</operType>
- <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
- <progress>${MsoUtils.xmlEscape(progress)}</progress>
- <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
- <serviceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceId>
- <status>${MsoUtils.xmlEscape(status)}</status>
- <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ <operType>${msoUtils.xmlEncode(operType)}</operType>
+ <operationId>${msoUtils.xmlEncode(operationId)}</operationId>
+ <progress>${msoUtils.xmlEncode(progress)}</progress>
+ <resourceTemplateUUID>${msoUtils.xmlEncode(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${msoUtils.xmlEncode(serviceInstanceId)}</serviceId>
+ <status>${msoUtils.xmlEncode(status)}</status>
+ <statusDescription>${msoUtils.xmlEncode(statusDescription)}</statusDescription>
</ns:updateResourceOperationStatus>
</soapenv:Body>
</soapenv:Envelope>""";
@@ -353,9 +376,15 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
setProgressUpdateVariables(execution, body)
}
+ 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 postDeactivateSDNCCall(DelegateExecution execution) {
- msoLogger.info(" ***** started postDeactivateSDNCCall *****")
- String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started prepareSDNCRequest *****") String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
msoLogger.info("response from sdnc, response code :" + responseCode + " response object :" + responseObj)
@@ -363,8 +392,8 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
}
public void sendSyncResponse(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- msoLogger.info(" ***** started sendSyncResponse *****")
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.debug(" *** sendSyncResponse *** ")
try {
String operationStatus = "finished"
@@ -379,7 +408,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.debug(" ***** Exit sendSyncResopnse *****")
+ msoLogger("DEBUG"," ***** Exit sendSyncResopnse *****")
}
} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
index 04b62d7f73..192788a4ca 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -34,6 +34,8 @@ import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.logger.MsoLogger
import groovy.json.*
@@ -42,21 +44,23 @@ import groovy.json.*
* flow for SDNC Network Resource
*/
public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- CreateSDNCNetworkResource.class);
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteSDNCNetworkResource.class);
String Prefix="DELSDNCRES_"
-
+
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
-
+
+ MsoUtils msoUtils = new MsoUtils()
+
public void preProcessRequest(DelegateExecution execution){
- msoLogger.info("***** Started preProcessRequest *****")
- try {
-
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started preProcessRequest *****")
+ try {
+
//get bpmn inputs from resource request.
String requestId = execution.getVariable("mso-request-id")
String requestAction = execution.getVariable("requestAction")
@@ -68,12 +72,12 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
//Get ResourceInput Object
ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
execution.setVariable(Prefix + "resourceInput", resourceInputObj)
-
+
//Deal with recipeParams
String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
- String resourceModelName = resourceInputObj.getResourceModelInfo().getModelName()
+ String resourceModelName = resourceInputObj.getResourceModelInfo().getModelName()
//For sdnc requestAction default is "NetworkInstance"
- String operationType = "Network"
+ String operationType = "Network"
if(!StringUtils.isBlank(recipeParamsFromRequest) && "null" != recipeParamsFromRequest){
//the operationType from worflow(first node) is second priority.
operationType = jsonUtil.getJsonValue(recipeParamsFromRequest, "operationType")
@@ -82,36 +86,78 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
//the operationType from worflow(first node) is highest priority.
operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
}
-
-
+
+
//For sdnc, generate svc_action and request_action
String sdnc_svcAction = "delete"
- if(StringUtils.containsIgnoreCase(resourceModelName, "overlay")){
- //This will be resolved in R3.
- sdnc_svcAction ="deactivate"
- operationType = "NCINetwork"
+ switch (resourceInputObj.getResourceModelInfo().getModelName()) {
+
+ case ~/[\w\s\W]*overlay[\w\s\W]*/ :
+ ///This will be resolved in R3.
+ sdnc_svcAction ="deactivate"
+ operationType = "NCINetwork"
+ break
+
+ case ~/[\w\s\W]*underlay[\w\s\W]*/ :
+ //This will be resolved in R3.
+ operationType ="Network"
+ break
+
+ case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/ :
+ operationType = "SOTNConnectivity"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
+ operationType = "SOTNAttachment"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SiteVF[\w\s\W]*/ :
+ operationType = "Site"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ operationType = "SDWANDevice"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SDWANConnectivity[\w\s\W]*/ :
+ operationType = "SDWANConnectivity"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ operationType = "SDWANAttachment"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ operationType = "SDWANPort"
+ execution.setVariable("isActivateRequired", "true")
+ break
+
+ default:
+ break
}
- if(StringUtils.containsIgnoreCase(resourceModelName, "underlay")){
- //This will be resolved in R3.
- operationType ="Network"
- }
- String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
- execution.setVariable(Prefix + "svcAction", sdnc_svcAction)
+ 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 preProcessRequest " + ex.getMessage()
- msoLogger.debug(msg)
+ msoLogger.debug( msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
-
+
/**
* Pre Process the BPMN Flow Request
* Inclouds:
@@ -119,11 +165,12 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
* generate the nsParameters
*/
public void prepareSDNCRequest (DelegateExecution execution) {
- msoLogger.info("***** Started prepareSDNCRequest *****")
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ msoLogger.info(" ***** Started prepareSDNCRequest *****")
try {
// get variables
- String sdnc_svcAction = execution.getVariable(Prefix + "svcAction")
+ 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")
@@ -144,177 +191,164 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
String modelName = resourceInputObj.getResourceModelInfo().getModelName()
String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
+ String resourceInstnaceId = resourceInputObj.getResourceInstancenUuid()
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
- String sndcTopologyDeleteRequest = ""
+ String sdncTopologyDeleteRequest = ""
switch (modelName) {
- case ~/^Site$/:
- sndcTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
+ case ~/[\w\s\W]*SiteVF[\w\s\W]*/:
+ sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
<sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
<sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
</sdncadapter:RequestHeader>
<sdncadapterworkflow:SDNCRequestData>
<request-information>
- <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
- <subscriber-name></subscriber-name>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
+ <subscriber-name>${msoUtils.xmlEncode(globalCustomerId)}</subscriber-name>
</service-information>
<vnf-information>
- <!-- TODO: to be filled as per the request input -->
- <vnf-id></vnf-id>
+ <vnf-id>$resourceInstnaceId</vnf-id>
<vnf-type></vnf-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</vnf-information>
<vnf-request-input>
- <request-version></request-version>
- <vnf-name></vnf-name>
- <vnf-networks>
- <vnf-network>
- <network-role></network-role>
- <network-name></network-name>
- <neutron-id></neutron-id>
- <network-id></network-id>
- <contrail-network-fqdn></contrail-network-fqdn>
- <subnets-data>
- <subnet-data>
- <ip-version></ip-version>
- <subnet-id></subnet-id>
- </subnet-data>
- </subnets-data>
- </vnf-network>
+ <vnf-input-parameters>
+ </vnf-input-parameters>
+ <request-version></request-version>
+ <vnf-name></vnf-name>
+ <vnf-networks>
</vnf-networks>
- </vnf-request-input>
- <vnf-input-parameters>
- <param></param>
- </vnf-input-parameters>
+ </vnf-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
break
- case ~/^SOTNAttachment$/:
- sndcTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
+ case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
+ sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>connection-attachment-topology-operation</sdncadapter:SvcOperation>
<sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
<sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
</sdncadapter:RequestHeader>
<sdncadapterworkflow:SDNCRequestData>
<request-information>
- <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
<subscriber-name></subscriber-name>
</service-information>
<allotted-resource-information>
- <allotted-resource-id></allotted-resource-id>
+ <allotted-resource-id>$resourceInstnaceId</allotted-resource-id>
<allotted-resource-type></allotted-resource-type>
<parent-service-instance-id></parent-service-instance-id>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</allotted-resource-information>
<connection-attachment-request-input>
- <param></param>
</connection-attachment-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
break
default:
- sndcTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:RequestId>${msoUtils.xmlEncode(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEncode(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEncode(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>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
- <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <request-id>${msoUtils.xmlEncode(hdrRequestId)}</request-id>
+ <request-action>${msoUtils.xmlEncode(sdnc_requestAction)}</request-action>
+ <source>${msoUtils.xmlEncode(source)}</source>
<notification-url></notification-url>
<order-number></order-number>
<order-version></order-version>
</request-information>
<service-information>
- <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
- <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <service-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-id>
+ <subscription-service-type>${msoUtils.xmlEncode(serviceType)}</subscription-service-type>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
- <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${msoUtils.xmlEncode(serviceModelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(serviceModelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(serviceModelName)}</model-name>
</onap-model-information>
- <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-instance-id>${msoUtils.xmlEncode(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${msoUtils.xmlEncode(globalCustomerId)}</global-customer-id>
</service-information>
<network-information>
- <!-- TODO: to be filled as per the request input -->
- <network-id></network-id>
+ <network-id>$resourceInstnaceId</network-id>
<onap-model-information>
- <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
- <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
- <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
- <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
- <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ <model-invariant-uuid>${msoUtils.xmlEncode(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${msoUtils.xmlEncode(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${msoUtils.xmlEncode(modelUuid)}</model-uuid>
+ <model-version>${msoUtils.xmlEncode(modelVersion)}</model-version>
+ <model-name>${msoUtils.xmlEncode(modelName)}</model-name>
</onap-model-information>
</network-information>
<network-request-input>
@@ -324,19 +358,19 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
}
- String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
- utils.logAudit(sndcTopologyDeleteRequesAsString)
- execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyDeleteRequesAsString)
- msoLogger.info("sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyDeleteRequesAsString)
+ String sdncTopologyDeleteRequesAsString = utils.formatXml(sdncTopologyDeleteRequest)
+ utils.logAudit(sdncTopologyDeleteRequesAsString)
+ execution.setVariable("sdncAdapterWorkflowRequest", sdncTopologyDeleteRequesAsString)
+ msoLogger.info("sdncAdapterWorkflowRequest - " + "\n" + sdncTopologyDeleteRequesAsString)
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DeleteSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage()
- msoLogger.debug(exceptionMessage)
+ msoLogger.debug( exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
msoLogger.info(" ***** Exit prepareSDNCRequest *****")
- }
+ }
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
@@ -358,17 +392,17 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
String body = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.onap.so/requestsdb">
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
<ns:updateResourceOperationStatus>
- <operType>${MsoUtils.xmlEscape(operType)}</operType>
- <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
- <progress>${MsoUtils.xmlEscape(progress)}</progress>
- <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
- <serviceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceId>
- <status>${MsoUtils.xmlEscape(status)}</status>
- <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ <operType>${msoUtils.xmlEncode(operType)}</operType>
+ <operationId>${msoUtils.xmlEncode(operationId)}</operationId>
+ <progress>${msoUtils.xmlEncode(progress)}</progress>
+ <resourceTemplateUUID>${msoUtils.xmlEncode(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${msoUtils.xmlEncode(serviceInstanceId)}</serviceId>
+ <status>${msoUtils.xmlEncode(status)}</status>
+ <statusDescription>${msoUtils.xmlEncode(statusDescription)}</statusDescription>
</ns:updateResourceOperationStatus>
</soapenv:Body>
</soapenv:Envelope>""";
@@ -385,23 +419,23 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
String operationId = resourceInputObj.getOperationId()
String progress = "100"
String status = "finished"
- String statusDescription = "SDCN resource delete completed"
+ String statusDescription = "SDCN resource delete and deactivation completed"
//String operationId = execution.getVariable("operationId")
String body = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.onap.so/requestsdb">
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
<ns:updateResourceOperationStatus>
- <operType>${MsoUtils.xmlEscape(operType)}</operType>
- <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
- <progress>${MsoUtils.xmlEscape(progress)}</progress>
- <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
- <serviceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceId>
- <status>${MsoUtils.xmlEscape(status)}</status>
- <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ <operType>${msoUtils.xmlEncode(operType)}</operType>
+ <operationId>${msoUtils.xmlEncode(operationId)}</operationId>
+ <progress>${msoUtils.xmlEncode(progress)}</progress>
+ <resourceTemplateUUID>${msoUtils.xmlEncode(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${msoUtils.xmlEncode(serviceInstanceId)}</serviceId>
+ <status>${msoUtils.xmlEncode(status)}</status>
+ <statusDescription>${msoUtils.xmlEncode(statusDescription)}</statusDescription>
</ns:updateResourceOperationStatus>
</soapenv:Body>
</soapenv:Envelope>""";
@@ -410,6 +444,7 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void postDeleteSDNCCall(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started prepareSDNCRequest *****")
String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
@@ -417,23 +452,24 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
msoLogger.info("response from sdnc, response code :" + responseCode + " response object :" + responseObj)
msoLogger.info(" ***** Exit prepareSDNCRequest *****")
}
-
- public void sendSyncResponse (DelegateExecution execution) {
- msoLogger.info(" *** sendSyncResponse *** ")
-
- try {
- String operationStatus = "finished"
- // RESTResponse for main flow
- String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
- utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled)
- sendWorkflowResponse(execution, 202, resourceOperationResp)
- execution.setVariable("sentSyncResponse", true)
-
- } catch (Exception ex) {
- String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- msoLogger.info(" ***** Exit sendSyncResopnse *****")
- }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.debug( " *** sendSyncResponse *** ")
+
+ try {
+ String operationStatus = "finished"
+ // RESTResponse for main flow
+ String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
+ msoLogger.debug( " sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
+ sendWorkflowResponse(execution, 202, resourceOperationResp)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ msoLogger.debug( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.debug(" ***** Exit sendSyncResopnse *****")
+ }
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/ActivateSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ActivateSDNCNetworkResource.bpmn
index 6b3641b235..e3b5e7997e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/ActivateSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ActivateSDNCNetworkResource.bpmn
@@ -1,51 +1,36 @@
<?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.16.2">
+<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="2.0.0">
<bpmn:process id="ActivateSDNCNetworkResource" name="ActivateSDNCNetworkResource" isExecutable="true">
- <bpmn:startEvent id="createNS_StartEvent" name="createNS_StartEvent">
- <bpmn:outgoing>SequenceFlow_1c92ks3</bpmn:outgoing>
+ <bpmn:startEvent id="createNS_StartEvent_activate" name="createNS_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1c92ks3_activate</bpmn:outgoing>
</bpmn:startEvent>
- <bpmn:endEvent id="EndEvent_1x6k78c" name="create SDNC call end">
- <bpmn:incoming>SequenceFlow_17md60u</bpmn:incoming>
+ <bpmn:endEvent id="EndEvent_1x6k78c_activate" name="create SDNC call end">
+ <bpmn:incoming>SequenceFlow_17md60u_activate</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC resource activate&#10;Adapter V1&#10;" calledElement="sdncAdapter">
- <bpmn:extensionElements>
- <camunda:in source="CRESDNCRES_activateSDNCRequest" 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="CRENWKI_activateSDNCResponse" />
- <camunda:out source="SDNCA_ResponseCode" target="CRESDNCRES_sdncCreateReturnCode" />
- <camunda:out source="SDNCA_SuccessIndicator" target="CRESDNCRES_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_0sjrnv5</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="ScriptTask_1g5zyi6" />
- <bpmn:scriptTask id="Task_023hred" name="post SDNC activate call">
- <bpmn:incoming>SequenceFlow_1vnx1pp</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0ow44q0</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_0ow44q0_activate" sourceRef="Task_023hred_activate" targetRef="ScriptTask_1g5zyi6_activate" />
+ <bpmn:scriptTask id="Task_023hred_activate" name="post SDNC activate call">
+ <bpmn:incoming>SequenceFlow_1vnx1pp_activate</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ow44q0_activate</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new ActivateSDNCNetworkResource()
-dcsi.postCreateSDNCCall(execution)</bpmn:script>
+dcsi.postActivateSDNCCall(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="ScriptTask_1gih50a" />
- <bpmn:scriptTask id="Task_13sx2bp" name="Pre Process Request" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1c92ks3</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_18l3crb</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_18l3crb_activate" sourceRef="Task_13sx2bp_activate" targetRef="ScriptTask_1gih50a_activate" />
+ <bpmn:scriptTask id="Task_13sx2bp_activate" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1c92ks3_activate</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18l3crb_activate</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new ActivateSDNCNetworkResource()
dcsi.preProcessRequest(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="Task_0uwlr22" name="Create progress update parameters After create" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1xk5xed</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1jr6zi0</bpmn:outgoing>
+ <bpmn:scriptTask id="Task_0uwlr22_activate" name="Create progress update parameters After create" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_13ee4rf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1jr6zi0_activate</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new ActivateSDNCNetworkResource()
dcsi.prepareUpdateAfterActivateSDNCResource(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:serviceTask id="ServiceTask_1cm8iwr" name="update progress update">
+ <bpmn:serviceTask id="ServiceTask_1cm8iwr_activate" name="update progress update">
<bpmn:extensionElements>
<camunda:connector>
<camunda:inputOutput>
@@ -64,114 +49,126 @@ dcsi.prepareUpdateAfterActivateSDNCResource(execution)</bpmn:script>
<camunda:connectorId>http-connector</camunda:connectorId>
</camunda:connector>
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_1jr6zi0</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1vnx1pp</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_1jr6zi0_activate</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1vnx1pp_activate</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:scriptTask id="ScriptTask_1g5zyi6" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_17md60u</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_1jr6zi0_activate" sourceRef="Task_0uwlr22_activate" targetRef="ServiceTask_1cm8iwr_activate" />
+ <bpmn:sequenceFlow id="SequenceFlow_1vnx1pp_activate" sourceRef="ServiceTask_1cm8iwr_activate" targetRef="Task_023hred_activate" />
+ <bpmn:scriptTask id="ScriptTask_1g5zyi6_activate" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0ow44q0_activate</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_17md60u_activate</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new ActivateSDNCNetworkResource()
csi.sendSyncResponse(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_17md60u" sourceRef="ScriptTask_1g5zyi6" targetRef="EndEvent_1x6k78c" />
- <bpmn:sequenceFlow id="SequenceFlow_1c92ks3" sourceRef="createNS_StartEvent" targetRef="Task_13sx2bp" />
- <bpmn:scriptTask id="ScriptTask_1gih50a" name="Prepare SDNC Actiate request" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0sjrnv5</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:sequenceFlow id="SequenceFlow_17md60u_activate" sourceRef="ScriptTask_1g5zyi6_activate" targetRef="EndEvent_1x6k78c_activate" />
+ <bpmn:sequenceFlow id="SequenceFlow_1c92ks3_activate" sourceRef="createNS_StartEvent_activate" targetRef="Task_13sx2bp_activate" />
+ <bpmn:scriptTask id="ScriptTask_1gih50a_activate" name="Prepare SDNC Actiate request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_18l3crb_activate</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0sjrnv5_activate</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new ActivateSDNCNetworkResource()
dcsi.prepareSDNCRequest(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_0sjrnv5" sourceRef="ScriptTask_1gih50a" targetRef="CallActivity_1600xlj" />
+ <bpmn:sequenceFlow id="SequenceFlow_0sjrnv5_activate" sourceRef="ScriptTask_1gih50a_activate" targetRef="CallActivity_1241bmd_activate" />
+ <bpmn:callActivity id="CallActivity_1241bmd_activate" name="Call SDNC RSRC &#10; Adapter V1&#10;" 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_0sjrnv5_activate</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_13ee4rf</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_13ee4rf" sourceRef="CallActivity_1241bmd_activate" targetRef="Task_0uwlr22_activate" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateSDNCNetworkResource">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent_activate">
<dc:Bounds x="-275" y="306" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-302" y="352" width="89" height="27" />
+ <dc:Bounds x="-299" y="352" width="84" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c_activate">
<dc:Bounds x="930" y="306" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="893" y="348" width="84" height="27" />
+ <dc:Bounds x="893" y="348" width="85" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
- <dc:Bounds x="77" y="284" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1xk5xed_di" bpmnElement="SequenceFlow_1xk5xed">
- <di:waypoint x="177" y="324" />
- <di:waypoint x="247" y="324" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="210.5" y="314" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0">
+ <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0_activate">
<di:waypoint x="694" y="324" />
<di:waypoint x="765" y="324" />
<bpmndi:BPMNLabel>
<dc:Bounds x="780.5" y="314" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
+ <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred_activate">
<dc:Bounds x="594" y="284" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
+ <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb_activate">
<di:waypoint x="-105" y="324" />
<di:waypoint x="-63" y="324" />
<bpmndi:BPMNLabel>
<dc:Bounds x="235.5" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp">
+ <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp_activate">
<dc:Bounds x="-205" y="284" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22">
- <dc:Bounds x="247" y="284" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22_activate">
+ <dc:Bounds x="246" y="284" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr">
+ <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr_activate">
<dc:Bounds x="417" y="284" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1jr6zi0_di" bpmnElement="SequenceFlow_1jr6zi0">
- <di:waypoint x="347" y="324" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1jr6zi0_di" bpmnElement="SequenceFlow_1jr6zi0_activate">
+ <di:waypoint x="346" y="324" />
<di:waypoint x="417" y="324" />
<bpmndi:BPMNLabel>
<dc:Bounds x="444.5" y="314" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1vnx1pp_di" bpmnElement="SequenceFlow_1vnx1pp">
+ <bpmndi:BPMNEdge id="SequenceFlow_1vnx1pp_di" bpmnElement="SequenceFlow_1vnx1pp_activate">
<di:waypoint x="517" y="324" />
<di:waypoint x="594" y="324" />
<bpmndi:BPMNLabel>
<dc:Bounds x="641" y="314" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1g5zyi6_di" bpmnElement="ScriptTask_1g5zyi6">
+ <bpmndi:BPMNShape id="ScriptTask_1g5zyi6_di" bpmnElement="ScriptTask_1g5zyi6_activate">
<dc:Bounds x="765" y="284" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_17md60u_di" bpmnElement="SequenceFlow_17md60u">
+ <bpmndi:BPMNEdge id="SequenceFlow_17md60u_di" bpmnElement="SequenceFlow_17md60u_activate">
<di:waypoint x="865" y="324" />
<di:waypoint x="930" y="324" />
<bpmndi:BPMNLabel>
<dc:Bounds x="998" y="313" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1c92ks3_di" bpmnElement="SequenceFlow_1c92ks3">
+ <bpmndi:BPMNEdge id="SequenceFlow_1c92ks3_di" bpmnElement="SequenceFlow_1c92ks3_activate">
<di:waypoint x="-239" y="324" />
<di:waypoint x="-205" y="324" />
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1gih50a_di" bpmnElement="ScriptTask_1gih50a">
+ <bpmndi:BPMNShape id="ScriptTask_1gih50a_di" bpmnElement="ScriptTask_1gih50a_activate">
<dc:Bounds x="-63" y="284" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0sjrnv5_di" bpmnElement="SequenceFlow_0sjrnv5">
+ <bpmndi:BPMNEdge id="SequenceFlow_0sjrnv5_di" bpmnElement="SequenceFlow_0sjrnv5_activate">
<di:waypoint x="37" y="324" />
- <di:waypoint x="77" y="324" />
+ <di:waypoint x="80" y="324" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1241bmd_di" bpmnElement="CallActivity_1241bmd_activate">
+ <dc:Bounds x="80" y="284" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13ee4rf_di" bpmnElement="SequenceFlow_13ee4rf">
+ <di:waypoint x="180" y="324" />
+ <di:waypoint x="246" y="324" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn
index a4e7ae1b1a..a94569c29b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/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.16.2">
+<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="2.0.0">
<bpmn:process id="CreateSDNCNetworkResource" name="CreateSDNCNetworkResource" isExecutable="true">
<bpmn:startEvent id="createNS_StartEvent" name="createNS_StartEvent">
<bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
@@ -7,7 +7,7 @@
<bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createNS_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:incoming>SequenceFlow_0svppaq</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new CreateSDNCNetworkResource()
@@ -18,27 +18,19 @@ dcsi.prepareSDNCRequest(execution)</bpmn:script>
</bpmn:endEvent>
<bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC RSRC Create&#10; Adapter V1&#10;" calledElement="sdncAdapter">
<bpmn:extensionElements>
- <camunda:in source="CRESDNCRES_activateSDNCRequest" 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="CRENWKI_activateSDNCResponse" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKI_createSDNCResponse" />
<camunda:out source="SDNCA_ResponseCode" target="CRESDNCRES_sdncCreateReturnCode" />
<camunda:out source="SDNCA_SuccessIndicator" target="CRESDNCRES_SuccessIndicator" />
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_15mvedq</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1ex9ov6</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0u8d8j5</bpmn:outgoing>
</bpmn:callActivity>
- <bpmn:scriptTask id="Task_023hred" name="post SDNC create call">
- <bpmn:incoming>SequenceFlow_1ex9ov6</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1kzj1j5</bpmn:outgoing>
- <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new CreateSDNCNetworkResource()
-dcsi.postCreateSDNCCall(execution)</bpmn:script>
- </bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_0w2es8j" sourceRef="Task_1dlrfiw" targetRef="Task_13sx2bp" />
- <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="PreprocessIncomingRequest_task" />
+ <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="Task_1mbzgl7" />
<bpmn:scriptTask id="Task_1dlrfiw" name="Set the Recipe DesignTimeParam" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0w2es8j</bpmn:outgoing>
@@ -103,27 +95,24 @@ dcsi.prepareUpdateBeforeCreateSDNCResource(execution)</bpmn:script>
<camunda:connectorId>http-connector</camunda:connectorId>
</camunda:connector>
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_1kzj1j5</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0o7h0ag</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_1cd8ujq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0drbyvd</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:scriptTask id="ScriptTask_1g5zyi6" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1cd8ujq</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0drbyvd</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0auvfvm</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new CreateSDNCNetworkResource()
csi.sendSyncResponse(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:exclusiveGateway id="ExclusiveGateway_0cdulnk" name="is activate required">
- <bpmn:incoming>SequenceFlow_0o7h0ag</bpmn:incoming>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0cdulnk" name="is deActivate required" default="SequenceFlow_05m2j56">
+ <bpmn:incoming>SequenceFlow_0oqe2oa</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1dww8ye</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_05m2j56</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_1dww8ye" name="yes" sourceRef="ExclusiveGateway_0cdulnk" targetRef="Task_0bga3e8">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isActivateRequired") == "true")}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_1ex9ov6" sourceRef="CallActivity_1600xlj" targetRef="Task_023hred" />
- <bpmn:sequenceFlow id="SequenceFlow_1kzj1j5" sourceRef="Task_023hred" targetRef="ServiceTask_1cm8iwr" />
- <bpmn:sequenceFlow id="SequenceFlow_0o7h0ag" sourceRef="ServiceTask_1cm8iwr" targetRef="ExclusiveGateway_0cdulnk" />
<bpmn:scriptTask id="Task_0uwlr22" name="Create progress update parameters After create" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_05m2j56</bpmn:incoming>
<bpmn:incoming>SequenceFlow_05niqbf</bpmn:incoming>
@@ -134,7 +123,7 @@ dcsi.prepareUpdateAfterCreateSDNCResource(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_05m2j56" name="No" sourceRef="ExclusiveGateway_0cdulnk" targetRef="Task_0uwlr22" />
<bpmn:sequenceFlow id="SequenceFlow_05niqbf" sourceRef="Task_0bga3e8" targetRef="Task_0uwlr22" />
- <bpmn:sequenceFlow id="SequenceFlow_1cd8ujq" sourceRef="Task_0uwlr22" targetRef="ScriptTask_1g5zyi6" />
+ <bpmn:sequenceFlow id="SequenceFlow_1cd8ujq" sourceRef="Task_0uwlr22" targetRef="ServiceTask_1cm8iwr" />
<bpmn:sequenceFlow id="SequenceFlow_0auvfvm" sourceRef="ScriptTask_1g5zyi6" targetRef="EndEvent_1x6k78c" />
<bpmn:callActivity id="Task_0bga3e8" name="call Activate SDNC network Resource" calledElement="ActivateSDNCNetworkResource">
<bpmn:extensionElements>
@@ -148,36 +137,55 @@ dcsi.prepareUpdateAfterCreateSDNCResource(execution)</bpmn:script>
<camunda:in source="requestAction" target="requestAction" />
<camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
<camunda:in source="networkRequest" target="networkRequest" />
+ <camunda:in source="networkInstanceId" target="networkInstanceId" />
+ <camunda:in source="parentServiceInstanceId" target="parentServiceInstanceId" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1dww8ye</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_05niqbf</bpmn:outgoing>
</bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0svppaq" sourceRef="Task_1mbzgl7" targetRef="PreprocessIncomingRequest_task" />
+ <bpmn:scriptTask id="Task_1mbzgl7" name="Update resource input" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0svppaq</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateSDNCNetworkResource()
+dcsi.updateResourceInput(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0drbyvd" sourceRef="ServiceTask_1cm8iwr" targetRef="ScriptTask_1g5zyi6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0u8d8j5" sourceRef="CallActivity_1600xlj" targetRef="Task_1czbh37" />
+ <bpmn:sequenceFlow id="SequenceFlow_0oqe2oa" sourceRef="Task_1czbh37" targetRef="ExclusiveGateway_0cdulnk" />
+ <bpmn:scriptTask id="Task_1czbh37" name="post SDNC create call" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0u8d8j5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0oqe2oa</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateSDNCNetworkResource()
+dcsi.afterCreateSDNCCall(execution)</bpmn:script>
+ </bpmn:scriptTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateSDNCNetworkResource">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent">
- <dc:Bounds x="-111" y="111" width="36" height="36" />
+ <dc:Bounds x="-188" y="111" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-135" y="147" width="85" height="24" />
+ <dc:Bounds x="-214" y="147" width="89" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
- <di:waypoint x="-75" y="129" />
- <di:waypoint x="-10" y="129" />
+ <di:waypoint x="-152" y="129" />
+ <di:waypoint x="-96" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="-87.5" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
- <di:waypoint x="413" y="129" />
- <di:waypoint x="460" y="129" />
- <di:waypoint x="500" y="129" />
+ <di:waypoint x="513" y="129" />
+ <di:waypoint x="573" y="129" />
<bpmndi:BPMNLabel>
<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" />
+ <dc:Bounds x="413" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
<dc:Bounds x="1046" y="317" width="36" height="36" />
@@ -188,33 +196,28 @@ dcsi.prepareUpdateAfterCreateSDNCResource(execution)</bpmn:script>
<bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
<dc:Bounds x="-10" y="295" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
- <dc:Bounds x="172" y="295" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0w2es8j_di" bpmnElement="SequenceFlow_0w2es8j">
- <di:waypoint x="90" y="129" />
- <di:waypoint x="148" y="129" />
+ <di:waypoint x="4" y="129" />
+ <di:waypoint x="67" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="74" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
- <di:waypoint x="248" y="129" />
- <di:waypoint x="313" y="129" />
+ <di:waypoint x="167" y="129" />
+ <di:waypoint x="231" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="235.5" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0lc6l7a_di" bpmnElement="Task_1dlrfiw">
- <dc:Bounds x="-10" y="89" width="100" height="80" />
+ <dc:Bounds x="-96" 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" />
+ <dc:Bounds x="67" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx">
- <di:waypoint x="606" y="129" />
- <di:waypoint x="638" y="129" />
- <di:waypoint x="638" y="129" />
+ <di:waypoint x="673" y="129" />
<di:waypoint x="738" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="608" y="123" width="90" height="12" />
@@ -225,75 +228,85 @@ dcsi.prepareUpdateAfterCreateSDNCResource(execution)</bpmn:script>
<di:waypoint x="788" y="218" />
<di:waypoint x="-89" y="218" />
<di:waypoint x="-89" y="335" />
- <di:waypoint x="-10" y="335" />
+ <di:waypoint x="-17" y="335" />
<bpmndi:BPMNLabel>
<dc:Bounds x="349" y="197" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4">
- <dc:Bounds x="506" y="89" width="100" height="80" />
+ <dc:Bounds x="573" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
<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="366" y="295" width="100" height="80" />
+ <dc:Bounds x="720" y="295" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1g5zyi6_di" bpmnElement="ScriptTask_1g5zyi6">
<dc:Bounds x="890" y="295" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0cdulnk_di" bpmnElement="ExclusiveGateway_0cdulnk" isMarkerVisible="true">
- <dc:Bounds x="539" y="310" width="50" height="50" />
+ <dc:Bounds x="371" y="310" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="539" y="273" width="49" height="27" />
+ <dc:Bounds x="365" y="273" width="63" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1dww8ye_di" bpmnElement="SequenceFlow_1dww8ye">
- <di:waypoint x="564" y="360" />
- <di:waypoint x="564" y="471" />
- <di:waypoint x="608" y="471" />
+ <di:waypoint x="396" y="360" />
+ <di:waypoint x="396" y="471" />
+ <di:waypoint x="440" y="471" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="571" y="391" width="18" height="14" />
+ <dc:Bounds x="403" y="391" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1ex9ov6_di" bpmnElement="SequenceFlow_1ex9ov6">
- <di:waypoint x="90" y="335" />
- <di:waypoint x="172" y="335" />
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1kzj1j5_di" bpmnElement="SequenceFlow_1kzj1j5">
- <di:waypoint x="272" y="335" />
- <di:waypoint x="366" y="335" />
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0o7h0ag_di" bpmnElement="SequenceFlow_0o7h0ag">
- <di:waypoint x="466" y="335" />
- <di:waypoint x="539" y="335" />
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22">
- <dc:Bounds x="721" y="295" width="100" height="80" />
+ <dc:Bounds x="553" y="295" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_05m2j56_di" bpmnElement="SequenceFlow_05m2j56">
- <di:waypoint x="589" y="335" />
- <di:waypoint x="721" y="335" />
+ <di:waypoint x="421" y="335" />
+ <di:waypoint x="553" y="335" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="648" y="317" width="14" height="14" />
+ <dc:Bounds x="480" y="317" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_05niqbf_di" bpmnElement="SequenceFlow_05niqbf">
- <di:waypoint x="708" y="471" />
- <di:waypoint x="771" y="471" />
- <di:waypoint x="771" y="375" />
+ <di:waypoint x="540" y="471" />
+ <di:waypoint x="603" y="471" />
+ <di:waypoint x="603" y="375" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1cd8ujq_di" bpmnElement="SequenceFlow_1cd8ujq">
- <di:waypoint x="821" y="335" />
- <di:waypoint x="890" y="335" />
+ <di:waypoint x="653" y="335" />
+ <di:waypoint x="720" y="335" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0auvfvm_di" bpmnElement="SequenceFlow_0auvfvm">
<di:waypoint x="990" y="335" />
<di:waypoint x="1046" y="335" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_0aywvn3_di" bpmnElement="Task_0bga3e8">
- <dc:Bounds x="608" y="431" width="100" height="80" />
+ <dc:Bounds x="440" y="431" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0svppaq_di" bpmnElement="SequenceFlow_0svppaq">
+ <di:waypoint x="331" y="129" />
+ <di:waypoint x="413" y="129" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1kzr9lu_di" bpmnElement="Task_1mbzgl7">
+ <dc:Bounds x="231" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0drbyvd_di" bpmnElement="SequenceFlow_0drbyvd">
+ <di:waypoint x="820" y="335" />
+ <di:waypoint x="890" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u8d8j5_di" bpmnElement="SequenceFlow_0u8d8j5">
+ <di:waypoint x="90" y="335" />
+ <di:waypoint x="185" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0oqe2oa_di" bpmnElement="SequenceFlow_0oqe2oa">
+ <di:waypoint x="285" y="335" />
+ <di:waypoint x="371" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1njkyn8_di" bpmnElement="Task_1czbh37">
+ <dc:Bounds x="185" y="295" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeActivateSDNCNetworkResource.bpmn
index 3442d68c45..09d8e35258 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeActivateSDNCNetworkResource.bpmn
@@ -1,60 +1,60 @@
<?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.16.2">
+<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="2.0.0">
<bpmn:process id="DeActivateSDNCNetworkResource" name="DeActivateSDNCNetworkResource" isExecutable="true">
- <bpmn:startEvent id="deleteNetworkResource_StartEvent" name="deleteNetworkResource_StartEvent">
+ <bpmn:startEvent id="deleteNetworkResource_StartEvent_deactivate" name="deleteNetworkResource_StartEvent">
<bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
</bpmn:startEvent>
- <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="deleteNetworkResource_StartEvent" targetRef="Task_13sx2bp" />
- <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="CallActivity_1600xlj" />
- <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="prepare SDNC Deactivate Request" scriptFormat="groovy">
+ <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="deleteNetworkResource_StartEvent_deactivate" targetRef="Task_13sx2bp_deactivate" />
+ <bpmn:scriptTask id="PreprocessIncomingRequest_deactivate" name="prepare SDNC Deactivate Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:outgoing>SequenceFlow_1fjtgq7</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0nmt8ph</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DeActivateSDNCNetworkResource()
dcsi.prepareSDNCRequest(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:endEvent id="EndEvent_1x6k78c" name="delete SDNC call end">
+ <bpmn:endEvent id="EndEvent_1x6k78c_deactivate" name="delete SDNC call end">
<bpmn:incoming>SequenceFlow_15wux6a</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC &#10; Adapter V1&#10;" 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_0khtova</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0uig0sx</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:sequenceFlow id="SequenceFlow_0ow44q0" sourceRef="Task_023hred" targetRef="ScriptTask_1emjxm2" />
- <bpmn:scriptTask id="Task_023hred" name="post SDNC deactivate call">
- <bpmn:incoming>SequenceFlow_0x5f1o7</bpmn:incoming>
+ <bpmn:sequenceFlow id="SequenceFlow_0ow44q0" sourceRef="Task_023hred_deactivate" targetRef="ScriptTask_1emjxm2_deactivate" />
+ <bpmn:scriptTask id="Task_023hred_deactivate" name="post SDNC deactivate call">
+ <bpmn:incoming>SequenceFlow_13gl3wv</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0ow44q0</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DeActivateSDNCNetworkResource()
dcsi.postDeactivateSDNCCall(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="PreprocessIncomingRequest_task" />
- <bpmn:scriptTask id="Task_13sx2bp" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp_deactivate" targetRef="PreprocessIncomingRequest_deactivate" />
+ <bpmn:scriptTask id="Task_13sx2bp_deactivate" name="Pre Process Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_18l3crb</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def dcsi = new DeleteSDNDeActivateSDNCNetworkResourceCNetworkResource()
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeActivateSDNCNetworkResource()
dcsi.preProcessRequest(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_1mz0vdx" sourceRef="Task_0tezqd4" targetRef="Task_18tomkl" />
- <bpmn:scriptTask id="Task_0tezqd4" name="Delete progress update parameters after deactivate" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0uig0sx</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1mz0vdx</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:scriptTask id="Task_0tezqd4_deactivate" name="Delete progress update parameters after deactivate" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0rn8vky</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1pzm7qx</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DeActivateSDNCNetworkResource()
dcsi.prepareUpdateAfterDeActivateSDNCResource(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:serviceTask id="Task_18tomkl" name="update progress update">
+ <bpmn:scriptTask id="ScriptTask_1emjxm2_deactivate" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15wux6a</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeActivateSDNCNetworkResource()
+csi.sendSyncResponse(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_15wux6a" sourceRef="ScriptTask_1emjxm2_deactivate" targetRef="EndEvent_1x6k78c_deactivate" />
+ <bpmn:sequenceFlow id="SequenceFlow_1fjtgq7" sourceRef="PreprocessIncomingRequest_deactivate" targetRef="Task_0n0lj30_deactivate" />
+ <bpmn:callActivity id="Task_0n0lj30_deactivate" name="Call SDNC &#10; Adapter V1" calledElement="SDNCAdapterRestV1">
+ <bpmn:incoming>SequenceFlow_1fjtgq7</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0c58p9k</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0c58p9k" sourceRef="Task_0n0lj30_deactivate" targetRef="Task_0tezqd4_deactivate" />
+ <bpmn:sequenceFlow id="SequenceFlow_1pzm7qx" sourceRef="Task_0tezqd4_deactivate" targetRef="Task_1a6f0p9_deactivate" />
+ <bpmn:serviceTask id="Task_1a6f0p9_deactivate" name="update progress update">
<bpmn:extensionElements>
<camunda:connector>
<camunda:inputOutput>
@@ -73,26 +73,34 @@ dcsi.prepareUpdateAfterDeActivateSDNCResource(execution)</bpmn:script>
<camunda:connectorId>http-connector</camunda:connectorId>
</camunda:connector>
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_1mz0vdx</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0x5f1o7</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_1pzm7qx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_13gl3wv</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:scriptTask id="ScriptTask_1emjxm2" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_15wux6a</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def csi = new DeActivateSDNCNetworkResource()
-csi.sendSyncResponse(execution)</bpmn:script>
- </bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_15wux6a" sourceRef="ScriptTask_1emjxm2" targetRef="EndEvent_1x6k78c" />
- <bpmn:sequenceFlow id="SequenceFlow_0uig0sx" sourceRef="CallActivity_1600xlj" targetRef="Task_0tezqd4" />
- <bpmn:sequenceFlow id="SequenceFlow_0x5f1o7" sourceRef="Task_18tomkl" targetRef="Task_023hred" />
+ <bpmn:sequenceFlow id="SequenceFlow_13gl3wv" sourceRef="Task_1a6f0p9_deactivate" targetRef="Task_023hred_deactivate" />
+ <bpmn:callActivity id="CallActivity_0a0txik_DeActivate" name="Call SDNC RSRC &#10; Adapter V1&#10;" 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_1fjtgq7</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0nmt8ph</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0rn8vky</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0rn8vky" sourceRef="CallActivity_0a0txik_DeActivate" targetRef="Task_0tezqd4_deactivate" />
+ <bpmn:sequenceFlow id="SequenceFlow_0nmt8ph" sourceRef="PreprocessIncomingRequest_deactivate" targetRef="CallActivity_0a0txik_DeActivate" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeActivateSDNCNetworkResource">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNetworkResource_StartEvent">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNetworkResource_StartEvent_deactivate">
<dc:Bounds x="-111" y="111" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-136" y="147" width="89" height="28" />
+ <dc:Bounds x="-135" y="147" width="88" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
@@ -102,25 +110,15 @@ csi.sendSyncResponse(execution)</bpmn:script>
<dc:Bounds x="-87.5" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
- <di:waypoint x="278" y="129" />
- <di:waypoint x="333" y="129" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="391.5" y="108" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+ <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_deactivate">
<dc:Bounds x="178" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c_deactivate">
<dc:Bounds x="964" y="327" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="928" y="369" width="84" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
- <dc:Bounds x="333" y="89" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0">
<di:waypoint x="735" y="345" />
<di:waypoint x="795" y="345" />
@@ -128,7 +126,7 @@ csi.sendSyncResponse(execution)</bpmn:script>
<dc:Bounds x="719" y="314" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
+ <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred_deactivate">
<dc:Bounds x="635" y="305" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
@@ -138,23 +136,13 @@ csi.sendSyncResponse(execution)</bpmn:script>
<dc:Bounds x="235.5" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp">
+ <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp_deactivate">
<dc:Bounds x="5" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx">
- <di:waypoint x="433" y="345" />
- <di:waypoint x="481" y="345" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="608" y="123" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4">
+ <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4_deactivate">
<dc:Bounds x="333" y="305" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1q6ssz7_di" bpmnElement="Task_18tomkl">
- <dc:Bounds x="481" y="305" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1emjxm2_di" bpmnElement="ScriptTask_1emjxm2">
+ <bpmndi:BPMNShape id="ScriptTask_1emjxm2_di" bpmnElement="ScriptTask_1emjxm2_deactivate">
<dc:Bounds x="795" y="305" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_15wux6a_di" bpmnElement="SequenceFlow_15wux6a">
@@ -164,14 +152,32 @@ csi.sendSyncResponse(execution)</bpmn:script>
<dc:Bounds x="930" y="313" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0uig0sx_di" bpmnElement="SequenceFlow_0uig0sx">
+ <bpmndi:BPMNEdge id="SequenceFlow_1fjtgq7_di" bpmnElement="SequenceFlow_1fjtgq7">
+ <di:waypoint x="278" y="129" />
+ <di:waypoint x="333" y="129" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pzm7qx_di" bpmnElement="SequenceFlow_1pzm7qx">
+ <di:waypoint x="433" y="345" />
+ <di:waypoint x="487" y="345" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0k4fp1d_di" bpmnElement="Task_1a6f0p9_deactivate">
+ <dc:Bounds x="487" y="305" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13gl3wv_di" bpmnElement="SequenceFlow_13gl3wv">
+ <di:waypoint x="587" y="345" />
+ <di:waypoint x="635" y="345" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0a0txik_di" bpmnElement="CallActivity_0a0txik_DeActivate">
+ <dc:Bounds x="333" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rn8vky_di" bpmnElement="SequenceFlow_0rn8vky">
<di:waypoint x="383" y="169" />
<di:waypoint x="383" y="305" />
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0x5f1o7_di" bpmnElement="SequenceFlow_0x5f1o7">
- <di:waypoint x="581" y="345" />
- <di:waypoint x="635" y="345" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0nmt8ph_di" bpmnElement="SequenceFlow_0nmt8ph">
+ <di:waypoint x="278" y="129" />
+ <di:waypoint x="333" y="129" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
index 00c0288246..da17fee16e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
@@ -1,78 +1,56 @@
<?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.16.2">
+<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="2.0.0">
<bpmn:process id="DeleteSDNCNetworkResource" name="DeleteSDNCNetworkResource" isExecutable="true">
- <bpmn:startEvent id="deleteNetworkResource_StartEvent" name="deleteNetworkResource_StartEvent">
- <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
+ <bpmn:startEvent id="deleteNetworkResource_StartEvent_delete" name="deleteNetworkResource_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1qo2pln_delete</bpmn:outgoing>
</bpmn:startEvent>
- <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_0jh88qw</bpmn:incoming>
- <bpmn:incoming>SequenceFlow_00vqgvt</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:sequenceFlow id="SequenceFlow_1qo2pln_delete" sourceRef="deleteNetworkResource_StartEvent_delete" targetRef="Task_1dlrfiw_delete" />
+ <bpmn:sequenceFlow id="SequenceFlow_0khtova_delete" sourceRef="PreprocessIncomingRequest_task_delete" targetRef="Task_0tfzqd4_delete" />
+ <bpmn:scriptTask id="PreprocessIncomingRequest_task_delete" name="prepare SDNC Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0jh88qw_delete</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_00vqgvt_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0khtova_delete</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DeleteSDNCNetworkResource()
dcsi.prepareSDNCRequest(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:endEvent id="EndEvent_1x6k78c" name="delete SDNC call end">
- <bpmn:incoming>SequenceFlow_15wux6a</bpmn:incoming>
+ <bpmn:endEvent id="EndEvent_1x6k78c_delete" name="delete SDNC call end">
+ <bpmn:incoming>SequenceFlow_15wux6a_delete</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC RSRC &#10; Adapter V1&#10;" 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="ScriptTask_1emjxm2" />
- <bpmn:scriptTask id="Task_023hred" name="post SDNC delete call">
- <bpmn:incoming>SequenceFlow_0ds04u5</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0ow44q0</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:sequenceFlow id="SequenceFlow_0ow44q0_delete" sourceRef="Task_023hred_delete" targetRef="ScriptTask_1emjxm2_delete" />
+ <bpmn:scriptTask id="Task_023hred_delete" name="post SDNC delete call">
+ <bpmn:incoming>SequenceFlow_0ds04u5_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ow44q0_delete</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DeleteSDNCNetworkResource()
dcsi.postDeleteSDNCCall(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_0w2es8j" sourceRef="Task_1dlrfiw" targetRef="Task_13sx2bp" />
- <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="ExclusiveGateway_0xrgeq3" />
- <bpmn:scriptTask id="Task_1dlrfiw" name="Set the Recipe DesignTimeParam" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0w2es8j</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_0w2es8j_delete" sourceRef="Task_1dlrfiw_delete" targetRef="Task_13sx2bp_delete" />
+ <bpmn:sequenceFlow id="SequenceFlow_18l3crb_delete" sourceRef="Task_13sx2bp_delete" targetRef="ExclusiveGateway_0xrgeq3_delete" />
+ <bpmn:scriptTask id="Task_1dlrfiw_delete" name="Set the Recipe DesignTimeParam" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1qo2pln_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0w2es8j_delete</bpmn:outgoing>
<bpmn:script>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>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:scriptTask id="Task_13sx2bp_delete" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0w2es8j_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18l3crb_delete</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.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>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:sequenceFlow id="SequenceFlow_1mz0vdx_delete" sourceRef="Task_0tfzqd4_delete" targetRef="Task_18tomkl_delete" />
+ <bpmn:sequenceFlow id="SequenceFlow_15mvedq_delete" sourceRef="Task_18tomkl_delete" targetRef="CallActivity_0bj0odq" />
+ <bpmn:scriptTask id="Task_0tfzqd4_delete" name="Delete progress update parameters before delete" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0khtova_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1mz0vdx_delete</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.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>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:serviceTask id="Task_18tomkl_delete" name="update progress update">
<bpmn:extensionElements>
<camunda:connector>
<camunda:inputOutput>
@@ -91,10 +69,10 @@ dcsi.prepareUpdateAfterDeleteSDNCResource(execution)</bpmn:script>
<camunda:connectorId>http-connector</camunda:connectorId>
</camunda:connector>
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_1mz0vdx</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_15mvedq</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_1mz0vdx_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15mvedq_delete</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:serviceTask id="ServiceTask_1cm8iwr" name="update progress update">
+ <bpmn:serviceTask id="ServiceTask_1cm8iwr_delete" name="update progress update">
<bpmn:extensionElements>
<camunda:connector>
<camunda:inputOutput>
@@ -113,178 +91,181 @@ dcsi.prepareUpdateAfterDeleteSDNCResource(execution)</bpmn:script>
<camunda:connectorId>http-connector</camunda:connectorId>
</camunda:connector>
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_1jr6zi0</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0ds04u5</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_0yooswe_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ds04u5_delete</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:sequenceFlow id="SequenceFlow_1jr6zi0" sourceRef="Task_0uwlr22" targetRef="ServiceTask_1cm8iwr" />
- <bpmn:scriptTask id="ScriptTask_1emjxm2" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_15wux6a</bpmn:outgoing>
- <bpmn:script>import org.openecomp.mso.bpmn.infrastructure.scripts.*
+ <bpmn:scriptTask id="ScriptTask_1emjxm2_delete" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0ow44q0_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15wux6a_delete</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new DeleteSDNCNetworkResource()
csi.sendSyncResponse(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_15wux6a" sourceRef="ScriptTask_1emjxm2" targetRef="EndEvent_1x6k78c" />
- <bpmn:sequenceFlow id="SequenceFlow_0ds04u5" sourceRef="ServiceTask_1cm8iwr" targetRef="Task_023hred" />
- <bpmn:exclusiveGateway id="ExclusiveGateway_0xrgeq3" name="is Deactivate Required">
- <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0jh88qw</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_0h3klf0</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_15wux6a_delete" sourceRef="ScriptTask_1emjxm2_delete" targetRef="EndEvent_1x6k78c_delete" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ds04u5_delete" sourceRef="ServiceTask_1cm8iwr_delete" targetRef="Task_023hred_delete" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0xrgeq3_delete" name="is Deactivate Required">
+ <bpmn:incoming>SequenceFlow_18l3crb_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0jh88qw_delete</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0h3klf0_delete</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_0jh88qw" name="No" sourceRef="ExclusiveGateway_0xrgeq3" targetRef="PreprocessIncomingRequest_task" />
- <bpmn:sequenceFlow id="SequenceFlow_0h3klf0" name="Yes" sourceRef="ExclusiveGateway_0xrgeq3" targetRef="Task_1xychp0">
+ <bpmn:sequenceFlow id="SequenceFlow_0jh88qw_delete" name="No" sourceRef="ExclusiveGateway_0xrgeq3_delete" targetRef="PreprocessIncomingRequest_task_delete">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isActivateRequired") != "true")}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0h3klf0_delete" name="Yes" sourceRef="ExclusiveGateway_0xrgeq3_delete" targetRef="Task_1xychp0_delete">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isActivateRequired") == "true")}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_00vqgvt" sourceRef="Task_1xychp0" targetRef="PreprocessIncomingRequest_task" />
- <bpmn:callActivity id="Task_1xychp0" name="Call Deactivate SDNC Network Resource" calledElement="DeActivateSDNCNetworkResource">
+ <bpmn:sequenceFlow id="SequenceFlow_00vqgvt_delete" sourceRef="Task_1xychp0_delete" targetRef="PreprocessIncomingRequest_task_delete" />
+ <bpmn:callActivity id="Task_1xychp0_delete" name="Call Deactivate SDNC Network Resource" calledElement="DeActivateSDNCNetworkResource">
<bpmn:extensionElements>
<camunda:in source="mso-request-id" target="mso-request-id" />
<camunda:in source="requestAction" target="requestAction" />
<camunda:in source="recipeParams" target="recipeParams" />
- <camunda:in source="recipeParams" target="recipeParams" />
<camunda:in source="recipeParamXsd" target="recipeParamXsd" />
<camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
<camunda:in source="resourceInput" target="resourceInput" />
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_0h3klf0</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_00vqgvt</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_0h3klf0_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_00vqgvt_delete</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_1ikbt2h_delete" name="Create progress update parameters After delete" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0lplazm</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yooswe_delete</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.prepareUpdateAfterDeleteSDNCResource(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0yooswe_delete" sourceRef="Task_1ikbt2h_delete" targetRef="ServiceTask_1cm8iwr_delete" />
+ <bpmn:callActivity id="CallActivity_0bj0odq" name="Call SDNC RSRC &#10; Adapter V1&#10;" 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_delete</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0lplazm</bpmn:outgoing>
</bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0lplazm" sourceRef="CallActivity_0bj0odq" targetRef="Task_1ikbt2h_delete" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteSDNCNetworkResource">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNetworkResource_StartEvent">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNetworkResource_StartEvent_delete">
<dc:Bounds x="-111" y="111" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-136" y="147" width="89" height="28" />
+ <dc:Bounds x="-135" y="147" width="88" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
+ <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln_delete">
<di:waypoint x="-75" y="129" />
<di:waypoint x="-10" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="-87.5" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
+ <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova_delete">
<di:waypoint x="593" y="129" />
<di:waypoint x="684" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="391.5" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+ <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task_delete">
<dc:Bounds x="493" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c_delete">
<dc:Bounds x="898" y="317" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="862" y="359" width="84" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
- <dc:Bounds x="42" y="295" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1xk5xed_di" bpmnElement="SequenceFlow_1xk5xed">
- <di:waypoint x="142" y="335" />
- <di:waypoint x="200" y="335" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="210.5" y="314" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0">
+ <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0_delete">
<di:waypoint x="624" y="335" />
<di:waypoint x="709" y="335" />
<bpmndi:BPMNLabel>
<dc:Bounds x="719" y="314" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
+ <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred_delete">
<dc:Bounds x="524" y="295" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0w2es8j_di" bpmnElement="SequenceFlow_0w2es8j">
+ <bpmndi:BPMNEdge id="SequenceFlow_0w2es8j_di" bpmnElement="SequenceFlow_0w2es8j_delete">
<di:waypoint x="90" y="129" />
<di:waypoint x="148" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="74" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
+ <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb_delete">
<di:waypoint x="248" y="129" />
<di:waypoint x="325" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="235.5" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0lc6l7a_di" bpmnElement="Task_1dlrfiw">
+ <bpmndi:BPMNShape id="ScriptTask_0lc6l7a_di" bpmnElement="Task_1dlrfiw_delete">
<dc:Bounds x="-10" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp">
+ <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp_delete">
<dc:Bounds x="148" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx">
+ <bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx_delete">
<di:waypoint x="784" y="129" />
<di:waypoint x="900" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="608" y="123" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_15mvedq_di" bpmnElement="SequenceFlow_15mvedq">
+ <bpmndi:BPMNEdge id="SequenceFlow_15mvedq_di" bpmnElement="SequenceFlow_15mvedq_delete">
<di:waypoint x="950" y="169" />
- <di:waypoint x="950" y="218" />
- <di:waypoint x="0" y="218" />
- <di:waypoint x="0" y="335" />
- <di:waypoint x="42" y="335" />
+ <di:waypoint x="950" y="246" />
+ <di:waypoint x="-106" y="246" />
+ <di:waypoint x="-106" y="335" />
+ <di:waypoint x="9" y="335" />
<bpmndi:BPMNLabel>
<dc:Bounds x="349" y="197" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4">
+ <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tfzqd4_delete">
<dc:Bounds x="684" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22">
- <dc:Bounds x="200" y="295" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1q6ssz7_di" bpmnElement="Task_18tomkl">
+ <bpmndi:BPMNShape id="ServiceTask_1q6ssz7_di" bpmnElement="Task_18tomkl_delete">
<dc:Bounds x="900" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr">
+ <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr_delete">
<dc:Bounds x="355" y="295" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1jr6zi0_di" bpmnElement="SequenceFlow_1jr6zi0">
- <di:waypoint x="300" y="335" />
- <di:waypoint x="355" y="335" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="444.5" y="314" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1emjxm2_di" bpmnElement="ScriptTask_1emjxm2">
+ <bpmndi:BPMNShape id="ScriptTask_1emjxm2_di" bpmnElement="ScriptTask_1emjxm2_delete">
<dc:Bounds x="709" y="295" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_15wux6a_di" bpmnElement="SequenceFlow_15wux6a">
+ <bpmndi:BPMNEdge id="SequenceFlow_15wux6a_di" bpmnElement="SequenceFlow_15wux6a_delete">
<di:waypoint x="809" y="335" />
<di:waypoint x="898" y="335" />
<bpmndi:BPMNLabel>
<dc:Bounds x="930" y="313" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0ds04u5_di" bpmnElement="SequenceFlow_0ds04u5">
+ <bpmndi:BPMNEdge id="SequenceFlow_0ds04u5_di" bpmnElement="SequenceFlow_0ds04u5_delete">
<di:waypoint x="455" y="335" />
<di:waypoint x="524" y="335" />
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_0xrgeq3_di" bpmnElement="ExclusiveGateway_0xrgeq3" isMarkerVisible="true">
+ <bpmndi:BPMNShape id="ExclusiveGateway_0xrgeq3_di" bpmnElement="ExclusiveGateway_0xrgeq3_delete" isMarkerVisible="true">
<dc:Bounds x="325" y="104" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="320" y="161" width="63" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0jh88qw_di" bpmnElement="SequenceFlow_0jh88qw">
+ <bpmndi:BPMNEdge id="SequenceFlow_0jh88qw_di" bpmnElement="SequenceFlow_0jh88qw_delete">
<di:waypoint x="375" y="129" />
<di:waypoint x="493" y="129" />
<bpmndi:BPMNLabel>
<dc:Bounds x="427" y="111" width="14" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0h3klf0_di" bpmnElement="SequenceFlow_0h3klf0">
+ <bpmndi:BPMNEdge id="SequenceFlow_0h3klf0_di" bpmnElement="SequenceFlow_0h3klf0_delete">
<di:waypoint x="350" y="104" />
<di:waypoint x="350" y="-12" />
<di:waypoint x="493" y="-12" />
@@ -292,13 +273,27 @@ csi.sendSyncResponse(execution)</bpmn:script>
<dc:Bounds x="356" y="43" width="19" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_00vqgvt_di" bpmnElement="SequenceFlow_00vqgvt">
+ <bpmndi:BPMNEdge id="SequenceFlow_00vqgvt_di" bpmnElement="SequenceFlow_00vqgvt_delete">
<di:waypoint x="543" y="28" />
<di:waypoint x="543" y="89" />
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1lddjec_di" bpmnElement="Task_1xychp0">
+ <bpmndi:BPMNShape id="CallActivity_1lddjec_di" bpmnElement="Task_1xychp0_delete">
<dc:Bounds x="493" y="-52" width="100" height="80" />
</bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1wj862v_di" bpmnElement="Task_1ikbt2h_delete">
+ <dc:Bounds x="205" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yooswe_di" bpmnElement="SequenceFlow_0yooswe_delete">
+ <di:waypoint x="305" y="335" />
+ <di:waypoint x="355" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0bj0odq_di" bpmnElement="CallActivity_0bj0odq">
+ <dc:Bounds x="9" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lplazm_di" bpmnElement="SequenceFlow_0lplazm">
+ <di:waypoint x="109" y="335" />
+ <di:waypoint x="205" y="335" />
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions>
+</bpmn:definitions> \ No newline at end of file