summaryrefslogtreecommitdiffstats
path: root/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java
diff options
context:
space:
mode:
authorKevin Smokowski <ks6305@att.com>2018-02-09 21:36:38 +0000
committerDan Timoney <dtimoney@att.com>2018-02-09 19:13:58 -0500
commit7f2452b38b0d69ce51888ec0aefc7ada4281e864 (patch)
tree942c202d5d0120167108587c15ee25633a5c5df8 /sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java
parent131cb46f6109a6099a445cb8e1b12ff5b68ae6de (diff)
Reset MDC after invoking node
collapse get node into a common metho, reset MDC right before getting next node for certain executor Change-Id: I85b1cf0dfd595deee42dc93f4095ecbc6c831998 Issue-ID: CCSDK-187 Signed-off-by: Kevin Smokowski <ks6305@att.com>
Diffstat (limited to 'sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java')
-rw-r--r--sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java
index 951536b5..0cfcfb91 100644
--- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java
+++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java
@@ -21,6 +21,7 @@
package org.onap.ccsdk.sli.core.sli.provider;
+import org.onap.ccsdk.sli.core.sli.MetricLogger;
import org.onap.ccsdk.sli.core.sli.SvcLogicAdaptor;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
@@ -28,7 +29,6 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
import org.onap.ccsdk.sli.core.sli.SvcLogicNode;
import org.onap.ccsdk.sli.core.sli.SvcLogicRecorder;
import org.onap.ccsdk.sli.core.sli.SvcLogicResource;
-import org.onap.ccsdk.sli.core.sli.SvcLogicStore;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceReference;
@@ -103,5 +103,26 @@ public abstract class SvcLogicNodeExecutor {
return plugin;
}
}
+ protected SvcLogicNode getNextNode(SvcLogicNode node, String outValue) {
+ MetricLogger.resetContext();
+ SvcLogicNode nextNode = node.getOutcomeValue(outValue);
+ if (nextNode != null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("about to execute " + outValue + " branch");
+ }
+ return (nextNode);
+ }
+ nextNode = node.getOutcomeValue("Other");
+ if (nextNode != null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("about to execute Other branch");
+ }
+ } else {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("no " + outValue + " or Other branch found");
+ }
+ }
+ return (nextNode);
+ }
}