summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-04-10 08:32:02 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-10 08:32:02 +0000
commit1ec60038ebff324ea2c968cc53d040748217ed8c (patch)
tree37f2197c309fba177d9b4e5b21cf02381234fa75 /bpmn/MSOInfrastructureBPMN/src/main
parent636e4c00bf22b324502ed5b56206eced6e50ff15 (diff)
parentaf36d557477fd36de9b3d3c571c776e645f7c02f (diff)
Merge "Fix variables in CreateVnfReceipe"
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy23
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn3
2 files changed, 19 insertions, 7 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
index 0279c2cbc8..794152deca 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
@@ -28,7 +28,6 @@ import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.WorkflowException
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.rest.APIResponse
-
import java.util.UUID;
import org.camunda.bpm.engine.delegate.BpmnError
@@ -62,24 +61,36 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor {
* generate the nsParameters
*/
public void preProcessRequest (DelegateExecution execution) {
+ JsonUtils jsonUtil = new JsonUtils()
+
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
String msg = ""
utils.log("INFO", " *** preProcessRequest() *** ", isDebugEnabled)
try {
//deal with nsName and Description
- String nsServiceName = execution.getVariable("nsServiceName")
+ String resourceInput = execution.getVariable("resourceInput")
+
+ // get service name
+ String resourceName = jsonUtil.getJsonValue(resourceInput, "resourceInstanceName")
+ String nsServiceName = resourceName.substring(resourceName.indexOf("_") + 1)
+ execution.setVariable("nsServiceName", nsServiceName)
+
String nsServiceDescription = execution.getVariable("nsServiceDescription")
utils.log("INFO", "nsServiceName:" + nsServiceName + " nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
//deal with operation key
- String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String globalSubscriberId = jsonUtil.getJsonValue(resourceInput, "globalSubscriberId")
utils.log("INFO", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled)
+
String serviceType = execution.getVariable("serviceType")
utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled)
- String serviceId = execution.getVariable("serviceId")
+
+ String serviceId = execution.getVariable("serviceInstanceId")
utils.log("INFO", "serviceId:" + serviceId, isDebugEnabled)
- String operationId = execution.getVariable("operationId")
+
+ String operationId = execution.getVariable("mso-request-id")
utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled)
- String nodeTemplateUUID = execution.getVariable("resourceUUID")
+
+ String nodeTemplateUUID = jsonUtil.getJsonValue(resourceInput, "resourceModelInfo.modelUuid")
utils.log("INFO", "nodeTemplateUUID:" + nodeTemplateUUID, isDebugEnabled)
/*
* segmentInformation needed as a object of segment
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
index 5772faadf0..8fe6b70d1a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
@@ -200,7 +200,7 @@ dcsi.doServiceHoming(execution)]]></bpmn2:script>
<camunda:in source="nsServiceDescription" target="nsServiceDescription" />
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceType" target="serviceType" />
- <camunda:in source="serviceId" target="serviceId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
<camunda:in source="operationId" target="operationId" />
<camunda:in source="resourceType" target="resourceType" />
<camunda:in source="resourceUUID" target="resourceUUID" />
@@ -210,6 +210,7 @@ dcsi.doServiceHoming(execution)]]></bpmn2:script>
<camunda:in source="serviceInstanceName" target="serviceInstanceName" />
<camunda:in source="serviceDecomposition" target="serviceDecomposition" />
<camunda:in source="uuiRequest" target="uuiRequest" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0bf6bzp</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0d0c20n</bpmn2:outgoing>