diff options
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src')
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) |