aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks
diff options
context:
space:
mode:
authorSANKET KS <sx00562924@techmahindra.com>2025-02-18 13:10:44 +0000
committerGerrit Code Review <gerrit@onap.org>2025-02-18 13:10:44 +0000
commit8c3f7827402555e5897cbea906d62d928c0bebb4 (patch)
treed46058b7cca9f5e7783fe33aa527382b6d039024 /bpmn/so-bpmn-tasks
parent2f4b747bc04a037d6f7d38900184cbc498107101 (diff)
parent01e14ec1feaedc6b8c88bf58edcf7ad636f5a3d8 (diff)
Merge "Reenable tests for the so-bpmn-building-blocks module"
Diffstat (limited to 'bpmn/so-bpmn-tasks')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
index e52866e1af..4dee6f12ba 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -55,13 +55,11 @@ import net.sf.saxon.xpath.XPathFactoryImpl;
@Component
public class SDNCRequestTasks {
+ private static final Logger logger = LoggerFactory.getLogger(SDNCRequestTasks.class);
private static final String NET_SF_SAXON_XPATH_IMPL = "net.sf.saxon.xpath.XPathFactoryImpl";
-
private static final String XPATH_FACTORY_PROPERTY_NAME =
"javax.xml.xpath.XPathFactory:" + NamespaceConstant.OBJECT_MODEL_SAXON;
-
- private static final Logger logger = LoggerFactory.getLogger(SDNCRequestTasks.class);
-
+ private static final JsonPath path = JsonPath.compile("$.GENERIC-RESOURCE-API:output.ack-final-indicator");
private static final String SDNC_REQUEST = "SDNCRequest";
private static final String MESSAGE = "_MESSAGE";
private static final String CORRELATOR = "_CORRELATOR";
@@ -85,7 +83,7 @@ public class SDNCRequestTasks {
try {
String response = sdncClient.post(request.getSDNCPayload(), request.getTopology());
// SDNC Response with RFC-8040 prefixes GENERIC-RESOURCE-API
- String finalMessageIndicator = JsonPath.read(response, "$.GENERIC-RESOURCE-API:output.ack-final-indicator");
+ String finalMessageIndicator = path.read(response);
execution.setVariable("isSDNCCompleted", convertIndicatorToBoolean(finalMessageIndicator));
} catch (PathNotFoundException e) {
logger.error("Error Parsing SDNC Response. Could not find read final ack indicator from JSON.", e);