From 533ba273b08c0676396068eba2246541c31bf7a6 Mon Sep 17 00:00:00 2001 From: pankajjangid05 Date: Thu, 2 Mar 2023 19:28:20 +0530 Subject: [PATCH] NL App - Added logic for service class name --- .../com/uci/orchestrator/Consumer/ReactiveConsumer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/uci/orchestrator/Consumer/ReactiveConsumer.java b/src/main/java/com/uci/orchestrator/Consumer/ReactiveConsumer.java index 6d23d1a..255f8cb 100644 --- a/src/main/java/com/uci/orchestrator/Consumer/ReactiveConsumer.java +++ b/src/main/java/com/uci/orchestrator/Consumer/ReactiveConsumer.java @@ -255,6 +255,14 @@ private XMessage setXMessageTransformers(XMessage xMessage, JsonNode campaign) { metaData.put("hiddenFields", campaign.findValue("hiddenFields").toString()); } + if(transformer.findValue("serviceClass") != null && !transformer.findValue("serviceClass").asText().isEmpty()) { + String serviceClass = campaign.findValue("serviceClass").toString(); + if (serviceClass != null && !serviceClass.isEmpty() && serviceClass.contains("\"")) { + serviceClass = serviceClass.replaceAll("\"", ""); + } + metaData.put("serviceClass", serviceClass); + } + if(transformer.get("meta").get("templateId") != null && !transformer.get("meta").get("templateId").asText().isEmpty()){ metaData.put("templateId", transformer.get("meta").get("templateId").asText()); }