aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorChuanyu Chen <chenchuanyu@huawei.com>2018-03-02 09:51:18 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-02 09:51:18 +0000
commit437220551824eafe0e4190205dab87eed6e93ac3 (patch)
tree88102ff3b19209295419727b5bd96a9324801901 /bpmn/MSOCommonBPMN/src/main
parent787947c425061dbbf8dfd72a8570e72721d72c59 (diff)
parent0502c4a725498477338c6c4ba84b6ccf9f6b727a (diff)
Merge "Support decompose service by model uuid"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy7
1 files changed, 5 insertions, 2 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
index 2645ea3c02..8d855e9311 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
@@ -77,6 +77,7 @@ public class DecomposeService extends AbstractServiceTaskProcessor {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String serviceModelInfo = execution.getVariable("serviceModelInfo")
execution.setVariable("DDS_serviceModelInvariantId", jsonUtils.getJsonValue(serviceModelInfo, "modelInvariantUuid"))
+ execution.setVariable("DDS_serviceModelUuid", jsonUtils.getJsonValue(serviceModelInfo, "modelUuid"))
execution.setVariable("DDS_modelVersion", jsonUtils.getJsonValue(serviceModelInfo, "modelVersion"))
} catch (BpmnError e) {
throw e;
@@ -97,14 +98,16 @@ public class DecomposeService extends AbstractServiceTaskProcessor {
// check for input
String serviceModelInvariantId = execution.getVariable("DDS_serviceModelInvariantId")
+ String serviceModelUuid = execution.getVariable("DDS_serviceModelUuid")
String modelVersion = execution.getVariable("DDS_modelVersion")
utils.log("DEBUG", "serviceModelInvariantId: " + serviceModelInvariantId, isDebugEnabled)
utils.log("DEBUG", "modelVersion: " + modelVersion, isDebugEnabled)
JSONObject catalogDbResponse = null
-
- if (modelVersion != null && modelVersion.length() > 0)
+ if(serviceModelUuid != null && serviceModelUuid.length() > 0)
+ catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelUuid(execution, serviceModelUuid, "v2")
+ else if (modelVersion != null && modelVersion.length() > 0)
catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuidAndServiceModelVersion(execution, serviceModelInvariantId, modelVersion, "v2")
else
catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuid(execution, serviceModelInvariantId, "v2")