From b23f7320796f71ee97ab8c034dc3ee69a766193e Mon Sep 17 00:00:00 2001 From: Reshmasree Date: Tue, 10 Nov 2020 17:10:45 +0000 Subject: Fix Json parse issues in AN allocate NSSMF workflow Issue-ID: SO-3374 Signed-off-by: Reshmasree Change-Id: Ia4c66ba5e92df63563bafd1273f1d930d55fcaeb --- .../main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bpmn/MSOCommonBPMN') diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy index 4eb9eedad5..c91316ee5c 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy @@ -50,7 +50,7 @@ import org.onap.so.db.catalog.beans.HomingInstance import org.slf4j.Logger import org.slf4j.LoggerFactory import com.google.gson.JsonObject - +import com.google.gson.JsonParser import com.fasterxml.jackson.databind.ObjectMapper class OofUtils { @@ -596,6 +596,7 @@ String correlator = requestId String callbackUrl = UrnPropertiesReader.getVariable("mso.adapters.oof.callback.endpoint") + "/" + messageType + "/" + correlator ObjectMapper objectMapper = new ObjectMapper(); String profileJson = objectMapper.writeValueAsString(profileInfo); +JsonParser parser = new JsonParser() //Prepare requestInfo object JsonObject requestInfo = new JsonObject() @@ -615,9 +616,11 @@ nsstInfo.addProperty("name", name) JsonObject json = new JsonObject() json.add("requestInfo", requestInfo) json.add("NSSTInfo", nsstInfo) -json.addProperty("sliceProfile", profileJson) +json.add("sliceProfile", (JsonObject) parser.parse(profileJson)) + return json.toString() } + /** * Method to create NSI/NSSI termination request * (OOF response will be synchronous in G-Release) -- cgit 1.2.3-korg