diff options
author | hetengjiao <hetengjiao@chinamobile.com> | 2021-03-19 09:25:28 +0800 |
---|---|---|
committer | hetengjiao <hetengjiao@chinamobile.com> | 2021-03-19 09:27:57 +0800 |
commit | 0aa4554468e86d8b2f1d855f608069695febeef7 (patch) | |
tree | 0086240c3c5fed0a57a1a1c3a5a1e1012b92daf5 /bpmn | |
parent | 10add89694eb04da38e80fd6eb26c369149570ec (diff) |
Add resourceShareLevel in tn
Issue-ID: SO-3381
Signed-off-by: hetengjiao <hetengjiao@chinamobile.com>
Change-Id: I3d3826615d05272a01e36a4f7001ada24ee3ea61
Diffstat (limited to 'bpmn')
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) |