summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2021-03-22 05:38:29 +0000
committerGerrit Code Review <gerrit@onap.org>2021-03-22 05:38:29 +0000
commit7eb4f55f7cd81e25557e97e82049e6a3be137fd2 (patch)
tree96238261ec3e56cb066488073c6b064dd30713fb /bpmn/so-bpmn-infrastructure-common
parenta393994c9d88a8205aa5ec9d59148578d7b9ab45 (diff)
parent0aa4554468e86d8b2f1d855f608069695febeef7 (diff)
Merge "Add resourceShareLevel in tn"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy11
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy3
2 files changed, 5 insertions, 9 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
index e5d390e2aa..ba87614937 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
@@ -275,8 +275,7 @@ public class CreateSliceService extends AbstractServiceTaskProcessor {
execution.setVariable("sliceTaskParams", sliceTaskParams)
- String paramJson = sliceTaskParams.convertToJson()
- execution.setVariable("CSSOT_paramJson", paramJson)
+ execution.setVariable("CSSOT_paramJson", objectMapper.writeValueAsString(sliceTaskParams))
logger.debug("Finish createOrchestrationTask")
}
@@ -372,9 +371,9 @@ public class CreateSliceService extends AbstractServiceTaskProcessor {
String taskStatus = execution.getVariable("taskStatus")
SliceTaskParamsAdapter sliceTaskParams =
execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter
- String paramJson = sliceTaskParams.convertToJson()
+
execution.setVariable("CSSOT_status", taskStatus)
- execution.setVariable("CSSOT_paramJson", paramJson)
+ execution.setVariable("CSSOT_paramJson", objectMapper.writeValueAsString(sliceTaskParams))
execution.setVariable("CSSOT_requestMethod", requestMethod)
logger.debug("Finish prepareUpdateOrchestrationTask")
}
@@ -402,10 +401,8 @@ public class CreateSliceService extends AbstractServiceTaskProcessor {
String paramJson = orchestrationTask.getParams()
logger.debug("paramJson: " + paramJson)
- SliceTaskParamsAdapter sliceTaskParams =
- execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter
+ SliceTaskParamsAdapter sliceTaskParams = objectMapper.readValue(paramJson, SliceTaskParamsAdapter.class)
- sliceTaskParams.convertFromJson(paramJson)
execution.setVariable("sliceTaskParams", sliceTaskParams)
logger.debug("Finish processUserOptions")
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
index e88b1c747f..a784cbee6e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
@@ -131,8 +131,7 @@ class DoAllocateNSSI extends AbstractServiceTaskProcessor {
sliceTaskInfo.statusDescription = response.getStatusDescription()
updateNssiResult(sliceParams, subnetType, sliceTaskInfo)
- String paramJson = sliceParams.convertToJson()
- execution.setVariable("CSSOT_paramJson", paramJson)
+ execution.setVariable("CSSOT_paramJson", objectMapper.writeValueAsString(sliceParams))
execution.setVariable("CSSOT_requestMethod", requestMethod)
execution.setVariable("sliceTaskParams", sliceParams)