Author Message
SaifulIslam2
Joined: Nov 7, 2009
Messages: 3
Offline
Hi,
I have a main flow and several sub flows. In the main flow, I am using the following code to generate the next node:
public void updateBranches(Collection branches,
         com.avaya.sce.runtimecommon.SCESession mySession) {

      branches.clear();
      String strNextNode = mySession.getVariableField(
            IProjectVariables.GET_MENU_BY_DNIS,
            IProjectVariables.GET_MENU_BY_DNIS_FIELD_SUB_MENU)
            .getStringValue();
      String shortCode = mySession.getVariableField(
            IProjectVariables.GET_MENU_BY_DNIS,
            IProjectVariables.GET_MENU_BY_DNIS_FIELD_ID_DNIS)
            .getStringValue();
      strNextNode="billNode\\"+strNextNode;
      
      System.out.println("Node " + strNextNode);
      // Goto branch = new Goto(strNextNode, 0, true);
      Goto branch = new Goto(strNextNode, 0, true, strNextNode);
      branches.add(branch);
      System.out.println("Branch Generated " + branch.getName());
   }

In the main flow, it is working Okay. But when going inside a subflow, the above code is getting a node's name from database but it is saying that the node doesn't exist.

i.e. in the subflow "bill_node" the code gets branch name "getBillAudio" which is also a servlet node inside the same subflow. But in simulator, it says the "getBillAudio" is not found.

Please help.
SaifulIslam2
Joined: Nov 7, 2009
Messages: 3
Offline
Actually the use code is:
public void updateBranches(Collection branches,
         com.avaya.sce.runtimecommon.SCESession mySession) {

      branches.clear();
      String strNextNode = mySession.getVariableField(
            IProjectVariables.GET_MENU_BY_DNIS,
            IProjectVariables.GET_MENU_BY_DNIS_FIELD_SUB_MENU)
            .getStringValue();
      String shortCode = mySession.getVariableField(
            IProjectVariables.GET_MENU_BY_DNIS,
            IProjectVariables.GET_MENU_BY_DNIS_FIELD_ID_DNIS)
            .getStringValue();
            
      System.out.println("Node " + strNextNode);
      // Goto branch = new Goto(strNextNode, 0, true);
      Goto branch = new Goto(strNextNode, 0, true, strNextNode);
      branches.add(branch);
      System.out.println("Branch Generated " + branch.getName());
   }
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
When you are in a subflow the node name is preceeded by the subflow name. Example:


      com.avaya.sce.runtime.Next next = new com.avaya.sce.runtime.Next("mysub2-untitledSubReturn1", "Default");
SaifulIslam2
Joined: Nov 7, 2009
Messages: 3
Offline
I got it Ross, thank you.
Go to:   
Mobile view