From da10fa6c82bafad3f2b01f4a52fbdc5f7b5d2e04 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Wed, 13 Mar 2019 15:52:08 -0400 Subject: Pass the revised value of usePreload to JSON Pass the possibly revised value of usePreload to JSON going to BPMN. Change-Id: Idc46a8786bc7bbdbf860b59998785c1c885689e4 Issue-ID: SO-1652 Signed-off-by: Benjamin, Max (mb388a) --- .../java/org/onap/so/apihandlerinfra/ServiceInstances.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org') diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java index 2dab494b07..ec1c4cb362 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java @@ -1125,12 +1125,16 @@ public class ServiceInstances { mapper.setSerializationInclusion(Include.NON_NULL); if(msoRawRequest != null){ ServiceInstancesRequest sir = mapper.readValue(msoRawRequest, ServiceInstancesRequest.class); - if( !isAlaCarte && Action.createInstance.equals(action) && serviceInstRequest != null && + if( serviceInstRequest != null && serviceInstRequest.getRequestDetails() != null && serviceInstRequest.getRequestDetails().getRequestParameters() != null) { - sir.getRequestDetails().setCloudConfiguration(serviceInstRequest.getRequestDetails().getCloudConfiguration()); - sir.getRequestDetails().getRequestParameters().setUserParams(serviceInstRequest.getRequestDetails().getRequestParameters().getUserParams()); + if( !isAlaCarte && Action.createInstance.equals(action)) { + sir.getRequestDetails().setCloudConfiguration(serviceInstRequest.getRequestDetails().getCloudConfiguration()); + sir.getRequestDetails().getRequestParameters().setUserParams(serviceInstRequest.getRequestDetails().getRequestParameters().getUserParams()); + } + sir.getRequestDetails().getRequestParameters().setUsePreload(serviceInstRequest.getRequestDetails().getRequestParameters().getUsePreload()); } + logger.debug("Value as string: {}", mapper.writeValueAsString(sir)); return mapper.writeValueAsString(sir); } -- cgit 1.2.3-korg