X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=sli%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fsdnc%2Fsli%2Fprovider%2FCallNodeExecutor.java;fp=sli%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fsdnc%2Fsli%2Fprovider%2FCallNodeExecutor.java;h=da0bc56312a3a6da893c85df626741364f9fc547;hb=974b67dd4021e6e839eaad25366bffe6d7a414c8;hp=2ce4f0a98fc18f364b9ad948690b37387fe3e107;hpb=e0451f75b26082418757f279351c2d3e29c0a5c8;p=sdnc%2Fcore.git diff --git a/sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/CallNodeExecutor.java b/sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/CallNodeExecutor.java index 2ce4f0a..da0bc56 100644 --- a/sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/CallNodeExecutor.java +++ b/sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/CallNodeExecutor.java @@ -114,24 +114,21 @@ public class CallNodeExecutor extends SvcLogicNodeExecutor { version = SvcLogicExpressionResolver.evaluate(moduleExpr, node, ctx); } + String parentGraph = ctx.getAttribute("currentGraph"); + ctx.setAttribute("parentGraph", parentGraph); SvcLogicStore store = SvcLogicActivator.getStore(); - LOG.debug("Calling ["+module+","+rpc+","+version+","+mode+"]"); - - if (store != null) - { + if (store != null) { SvcLogicGraph calledGraph = store.fetch(module, rpc, version, mode); - - if (calledGraph != null) - { + LOG.debug("Parent " + parentGraph + " is calling child " + calledGraph.toString()); + ctx.setAttribute("currentGraph", calledGraph.toString()); + if (calledGraph != null) { svc.execute(calledGraph, ctx); outValue = ctx.getStatus(); - } - else - { - LOG.debug("Could not find service logic for ["+module+","+rpc+","+version+","+mode+"]"); + } else { + LOG.error("Could not find service logic for [" + module + "," + rpc + "," + version + "," + mode + "]"); } } else @@ -144,6 +141,7 @@ public class CallNodeExecutor extends SvcLogicNodeExecutor { if (LOG.isDebugEnabled()) { LOG.debug("about to execute " + outValue + " branch"); } + ctx.setAttribute("currentGraph", parentGraph); return (nextNode); } @@ -157,6 +155,9 @@ public class CallNodeExecutor extends SvcLogicNodeExecutor { LOG.debug("no " + outValue + " or Other branch found"); } } + ctx.setAttribute("currentGraph", parentGraph); + ctx.setAttribute("parentGraph", null); + return (nextNode); }