aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/groovy
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-02-06 11:51:56 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-06 11:51:56 +0000
commitd27b2b875e0e52b8a2d66f27eca4aee2eb8213e1 (patch)
tree8aa308cf486f6cb28d876c1579a9f643b00d983a /bpmn/MSOCommonBPMN/src/main/groovy
parente42d72fb3a557fc66a787d1348d3bd389eb9d9a1 (diff)
parentb7a3cecc8ed9d7bfca90f1ce0a0b429a0ca46043 (diff)
Merge "Refactor of DecomposeJsonUtils class."
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/groovy')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy14
1 files changed, 8 insertions, 6 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 06cc284620..2645ea3c02 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
@@ -17,7 +17,9 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.bpmn.common.scripts;
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.openecomp.mso.bpmn.core.json.DecomposeJsonUtil;
import static org.apache.commons.lang3.StringUtils.*;
@@ -96,12 +98,12 @@ public class DecomposeService extends AbstractServiceTaskProcessor {
// check for input
String serviceModelInvariantId = execution.getVariable("DDS_serviceModelInvariantId")
String modelVersion = execution.getVariable("DDS_modelVersion")
-
+
utils.log("DEBUG", "serviceModelInvariantId: " + serviceModelInvariantId, isDebugEnabled)
- utils.log("DEBUG", "modelVersion: " + modelVersion, isDebugEnabled)
-
+ utils.log("DEBUG", "modelVersion: " + modelVersion, isDebugEnabled)
+
JSONObject catalogDbResponse = null
-
+
if (modelVersion != null && modelVersion.length() > 0)
catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuidAndServiceModelVersion(execution, serviceModelInvariantId, modelVersion, "v2")
else
@@ -140,7 +142,7 @@ public class DecomposeService extends AbstractServiceTaskProcessor {
utils.log("DEBUG", "getting service decomposition", isDebugEnabled)
String catalogDbResponse = execution.getVariable("DDS_catalogDbResponse")
- ServiceDecomposition serviceDecomposition = new ServiceDecomposition(catalogDbResponse, serviceInstanceId)
+ ServiceDecomposition serviceDecomposition = DecomposeJsonUtil.jsonToServiceDecomposition(catalogDbResponse, serviceInstanceId)
execution.setVariable("serviceDecomposition", serviceDecomposition)
execution.setVariable("serviceDecompositionString", serviceDecomposition.toJsonString())