Fix Unexpected service create issue 67/26367/1
authorc00149107 <chenchuanyu@huawei.com>
Fri, 15 Dec 2017 07:35:56 +0000 (15:35 +0800)
committerc00149107 <chenchuanyu@huawei.com>
Fri, 15 Dec 2017 07:36:24 +0000 (15:36 +0800)
Fix Unexpected service create issue.Reset the variable before update it.

Change-Id: I4e21cecc51ee441727600315f059f7c341c2cc11
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)){