Author Message
SNehaS
Joined: Nov 7, 2016
Messages: 13
Offline
HI,
I have 100s of nodes to forward to one particular data node(which passes the call to agent by blind call). This blind node will forward call to different agents depending upon previous flow.

I need to know the name of "next" node from where call has come to this data node. using name of previous "next" node, i can route the calls.

can anyone please help how can we know previous object from call stack and then name of specified next.



Thanks, Neha
Filename next_node.docx [Disk] Download
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
You should be able to invoke this method in the SCESession. The return a stack of the nodes visited by the application. A node may appear multiple times.



/**
* Returns the call stack, which tracks the requested URLs in LIFO order.
*


* Use <code>mySession.getCallStack().peek()</code> to view the last URL or
*
* <code>mySession.getCallStack().get(mySession.getCallStack().size()-1)</code>
* to view the previous URL.
*


* Implementation note: Because Orchestration Designer-generated VXML
* pages reference a root document, the last URL is often the URL for the
* AppRoot.
*


* Users should also take care when using the call stack to avoid
* over-reading (exhausting) the stack, which may throw
* <code>EmptyStackException</code> or
* <code>IndexOutOfBoundsException</code>.
*


* NOTE: This method returns a reference to the call stack maintained
* by the <code>SCESession</code>. Callers should ONLY use the stack
* in a read-only mode!
*
* @return the callStack
* @since 3.1
*/
public StackUnsynchronized<String> getCallStack() {
return callHistoryStack;
}

SNehaS
Joined: Nov 7, 2016
Messages: 13
Offline
Thanks Ross for the response !

I am able to get previous node name from callStack, but I need name of "next" attribute which was selected in call flow.
Like in my attached doc, if user has reached to "agent_bus_postsales_general" node from first "if" in flow then i need "busAgent" string at "agent_bus_postsales_general" node.

Can you please help!


Thanks, Neha
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
I see you are interested in the "name" not the actual node name. That information is not available. I suggest you add an assignment prior to each "next" item and assign to a variable a name and then check that.
Go to:   
Mobile view