diff options
author | 2018-03-01 16:01:25 +0800 | |
---|---|---|
committer | 2018-03-01 16:57:29 +0800 | |
commit | 0502c4a725498477338c6c4ba84b6ccf9f6b727a (patch) | |
tree | e17d43bb75f6a6ef4189c29f29c9af83a4e487ec /bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso | |
parent | 9de144d47d9283b348d69891a5303f789754df58 (diff) |
Support decompose service by model uuid
Support decompose service by model uuid
Change-Id: Ib6f751440bc9c60df12e18857f23b4c62181b9c6
Issue-ID: SO-451
Signed-off-by: c00149107 <chenchuanyu@huawei.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy | 7 |
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") |