Author Message
DaveSolarz
Joined: Nov 15, 2013
Messages: 18
Offline
I''m usind OD and I'm trying to have 1 application exit and transfer to a second application (It can not be a module) they are two independent applications. I need to pass a variable from app 1 to app2.

Do I use the input and output parameter but how do I execute the transfer.
I can perform the transfer successfully executing this code:
out.println("<block>");
out.println("<goto next=" +strUrl + "/>");
out.println("</block>");
But I need to pass a variable.

I was tod I could pass a variable using the namelist, but how in OD do I receive the variable.
Any help would be much appreciated.
desirekengfack
Joined: Nov 13, 2013
Messages: 10
Offline

You can use subdialog


out.println(<subdialog name="GIVE_A_NAME" src="/URL" namelist="LIST OF PARAMS"/>
DaveSolarz
Joined: Nov 15, 2013
Messages: 18
Offline
Thank-you for your response. My next question is how does the receiving OD appllication receive the list of params?
desirekengfack
Joined: Nov 13, 2013
Messages: 10
Offline
The URL in sudialog must be a servlet URL.

then, if you use AAOD servlet, then inside the method,

servletImplementation(com.avaya.sce.runtimecommon.SCESession mySession)

get your parameters values like :

String param1 = mySession.getRequest().getParameter("PARAM_NAME1");
String param2 = mySession.getRequest().getParameter("PARAM_NAME2");
DaveSolarz
Joined: Nov 15, 2013
Messages: 18
Offline
I'm not able to get the subdialog to go to the called application the application hangs up the call. I can get the submit next to transfer to the application, but the variable is not coming across.
First this is the subdialog code that executes with no errors but continues to the end of the script and the call hangs up:
public void markupLanguageGeneration(PrintStream out, Submit submit, SCESession mySession) {
String strDnis = "100000";
out.println("<block>");
out.println("<var name=\"sendDNIS\" expr=" + strDnis + "/>");
out.println("<subdialog name=\"CallApp\" src=\"/EGID/Start\" namelist=\"sendDNIS\"/>");
out.println("</block>");

super.markupLanguageGeneration(out, submit, mySession);
}

This is the submit next line that does send the call to the app2.
out.println("<submit next=\"/EGID/Start\" namelist=\"sendDNIS\" method=\"post\"/>");

And the receiving app code for receiving the varaiable is
String passedDNIS = mySession.getRequest().getParameter("sendDNIS");

Is there a piece that I'm missing?
desirekengfack
Joined: Nov 13, 2013
Messages: 10
Offline
Maybe you have a vxml error.

The parent of <subdialog> is <form>.
You may not put a <subdialog> inside a <block>.
DaveSolarz
Joined: Nov 15, 2013
Messages: 18
Offline
Ok, I'm able to sent the application to the second application, but not able to receive the passed variable.

The servlet node is the the first node from the AppRoot, is that correct?

This is the code to pass the variable:
out.println("<var name=\"sendDNIS\" expr=\"'100001'\"/>");
out.println("<subdialog name=\"CallApp\" src=\"/EGID/Start\" namelist=\"sendDNIS\" method=\"post\"/>");

Code to receive the variable:
String passedDNIS = mySession.getRequest().getParameter("sendDNIS");

Any other suggestions would be greatly appreciated! Thanks!
Go to:   
Mobile view