Fix Unexpected service create issue 69/26369/2
authorc00149107 <chenchuanyu@huawei.com>
Fri, 15 Dec 2017 07:38:49 +0000 (15:38 +0800)
committerSeshu Kumar M <seshu.kumar.m@huawei.com>
Thu, 4 Jan 2018 09:25:27 +0000 (09:25 +0000)
Fix Unexpected service create issue.Reset the variable before update it.

Change-Id: Id0b5459ad8ea76264d8502f5d69edd4c833d8229
Issue-ID: SO-358
Signed-off-by: c00149107 <chenchuanyu@huawei.com>
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy

index 9404364..d15be38 100644 (file)
@@ -413,7 +413,11 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
         String nsServiceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")  
         execution.setVariable("nsServiceDescription", nsServiceDescription)
         utils.log("INFO", "Prepare VFC Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
-        List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)   
+        List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr) 
+        //reset the variables
+        execution.setVariable("resourceUUID", "")
+        execution.setVariable("resourceInvariantUUID", "")
+        execution.setVariable("resourceParameters", "")
         for(String resource : resourceList){
             String resourceName = jsonUtil.getJsonValue(resource, "resourceName")  
             if(StringUtils.containsIgnoreCase(resourceName, resourceType)){