aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src
diff options
context:
space:
mode:
authorbiniek <lukasz.biniek@nokia.com>2018-01-23 14:43:24 +0100
committerbiniek <lukasz.biniek@nokia.com>2018-01-29 13:59:12 +0100
commitb7a3cecc8ed9d7bfca90f1ce0a0b429a0ca46043 (patch)
treed0a629e1026f7b75f1c0f1d4627a46ae98bc7198 /bpmn/MSOCommonBPMN/src
parent1b9f60bf292b24a33df33cedacad83bb868b450c (diff)
Refactor of DecomposeJsonUtils class.
Change-Id: I72b779eb17ffb901266de605eb2eda49f13bd03e Issue-ID: SO-374 Signed-off-by: biniek <lukasz.biniek@nokia.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src')
-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())