Skip to content

Commit

Permalink
Merge pull request #29 from pankajjangid05/release-5.1.0
Browse files Browse the repository at this point in the history
NL App - Added logic for service class name
  • Loading branch information
surabhi-mahawar authored Mar 2, 2023
2 parents 5527031 + 533ba27 commit 3bf0ccb
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 3bf0ccb

Please sign in to comment.