summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy/org
diff options
context:
space:
mode:
authorChuanyu Chen <chenchuanyu@huawei.com>2018-04-22 06:22:31 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-22 06:22:31 +0000
commitf39f72df5f0953cfb681c86767d4cee773938004 (patch)
tree6f1dfa996bafe538b199f8ce48aa2a4d82727759 /bpmn/MSOInfrastructureBPMN/src/main/groovy/org
parent54c41267ed3bf769b00875128fa5a9021411e1c1 (diff)
parentfaac8220ef71d68ac87706e521f11f445dcb2e4c (diff)
Merge "UpdateAAI lost serviceInstVersion and modeluuid"
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy20
1 files changed, 11 insertions, 9 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
index 38fb22572d..f29db9252f 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
@@ -126,7 +126,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
// user params
String uuiRequest = execution.getVariable("uuiRequest")
- utils.log("INFO","uuiRequest: " + uuiRequest, isDebugEnabled)
+ // target model uuid
+ String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
+ execution.setVariable("modelUuid", modelUuid)
+
+ utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)
} catch (BpmnError e) {
throw e;
@@ -204,13 +208,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("operationType", "create")
- def hasResourcetoAdd = false
+ execution.setVariable("hasResourcetoAdd", false)
List<Resource> addResourceList = execution.getVariable("addResourceList")
if(addResourceList != null && !addResourceList.isEmpty()) {
- hasResourcetoAdd = true
+ execution.setVariable("hasResourcetoAdd", true)
}
- execution.setVariable("hasResourcetoAdd", hasResourcetoAdd)
-
utils.log("INFO"," *** Exit preProcessForAddResource *** ", isDebugEnabled)
}
@@ -230,12 +232,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("operationType", "delete")
- def hasResourcetoDelete = false
+ execution.setVariable("hasResourcetoDelete", false)
List<Resource> delResourceList = execution.getVariable("delResourceList")
if(delResourceList != null && !delResourceList.isEmpty()) {
- hasResourcetoDelete = true
- }
- execution.setVariable("hasResourcetoDelete", hasResourcetoDelete)
+ execution.setVariable("hasResourcetoDelete", true)
+ }
execution.setVariable("resourceInstanceIDs", execution.getVariable("serviceRelationShip"))
@@ -317,6 +318,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
utils.log("INFO","namespace: " + namespace, isDebugEnabled)
+ //update target model to aai
String serviceInstanceData =
"""<service-instance xmlns=\"${namespace}\">
<model-version-id">${modelUuid}</model-version-id>