Author Message
AlexBuckhurst
Joined: Feb 11, 2014
Messages: 23
Offline
in our application we are calling a subdialog from a vxml servlet, we can successfully pass in IN parameters and we can log out the OUT parameters but we dont know how to store the OUT parameter data to a DD variable so i can use it later in the application.

here is my vxml servel code:

      out.println("<var name=\"Arg2\"/>");
      out.println("<var name=\"Arg3\"/>");
      
      out.println("<var name=\"VOAppURL\" expr=\"'http://192.168.254.189/SIC/ScriptPlayer.jsp?scriptId=9'\"/>");
      out.println("<var name=\"subprog\" expr=\"'false'\"/>");
      out.println("<var name=\"returnScript\" expr=\"'returnScript=alexbuckhurst'\"/>");
   
      out.println("<subdialog method=\"get\" name=\"VOAppSub\" namelist=\" subprog returnScript\" srcexpr=\"VOAppURL\">");

      out.println("<filled>");
      out.println("<assign expr=\"VOAppSub.returnParam1\" name=\"Arg2\"/>");
      out.println("<assign expr=\"VOAppSub.returnParam2\" name=\"Arg3\"/>");
      out.println("<log>LOG OUT TO AVP Reports:- param 1; <value expr=\"VOAppSub.returnParam1\"/> - param 2; <value expr=\"VOAppSub.returnParam2\"/></log>");
      out.println("</filled>");

      out.println("</subdialog>");



can you please let me know what i need to do to achieve this, thank you
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
public void markupLanguageGeneration(PrintStream out, Submit submit, SCESession mySession) {


Use the submit to add Arg2 and Arg3 to the submit list.


   submit.addToSubmitList("Arg2");

The the value of VOAppSub.returnParam1 will be submitted to the application server as Arg2. This assumes you have a variable Named "Arg2" in your DD app.
AlexBuckhurst
Joined: Feb 11, 2014
Messages: 23
Offline
Thats great.

Thanks

Alex
DanielSingleton4
Joined: Dec 3, 2013
Messages: 0
Offline
I'm having a very similar problem not being able to get any data from a vxml servlet back into OD. I have a complex variable "res" that contains fields (data & action). The Java code is below. Any ideas why it doesn't work?

out.println("<subdialog name=\"res\" src=\"" + vxmlURL + "\" namelist=\"LINE ANI DNIS CALLID\">");
out.println("<param name=\"LINE\" expr=\"'" + pLINE + "'\"/>");
out.println("<param name=\"ANI\" expr=\"'" + pANI + "'\"/>");
out.println("<param name=\"DNIS\" expr=\"'" + pDNIS + "'\"/>");
out.println("<param name=\"CALLID\" expr=\"'" + pCALLID + "'\"/>");   
      
out.println("<filled>");
out.println("<var name=\"res___action\" expr=\"res.action\"/>");
out.println("<var name=\"res___data\" expr=\"res.data\"/>");
out.println("</filled>");
out.println("</subdialog>");

submit.addToSubmitList("res___action res___data");

}
AlexBuckhurst
Joined: Feb 11, 2014
Messages: 23
Offline
have you declared the variables?

eg out.println("<var name=\"Arg2\"/>");
out.println("<var name=\"Arg3\"/>");

DanielSingleton4
Joined: Dec 3, 2013
Messages: 0
Offline
Only in the <filled> element although I've have tried defining them at the form level without any luck. It doesn't throw any semantic errors as it stands.

I'd also tried putting just the "res" object in the namelist but this resulted in "Not able to save posted variable" for each sub field.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Daniel,

When you say "does not work". you are positive your module is returning values. Is there any DD trace to go along with this?
DanielSingleton4
Joined: Dec 3, 2013
Messages: 0
Offline
Yes. I added some prompts to the end of the <filled> element and these read out the data correctly. The trace.log extract shows the markup followed by a couple of debug messages. The value of res.action is "x" which I set prior to calling the servlet.


02/11/2012 09:36:35:183 DEBUG - 1A7A9F14912DFB9ECB2211DE86583F16:/test001 : session id:sess3045336 | test001:LogServiceStart | Launching: | LaunchURI : https://128.30.240.150:26100/sandbox/daniel/sl3test.vxml
02/11/2012 09:36:35:183 INFO - 1A7A9F14912DFB9ECB2211DE86583F16:/test001 : Using SCESession 1A7A9F14912DFB9ECB2211DE86583F16:/test001 servlet : LaunchVXML
02/11/2012 09:36:35:183 DEBUG - 1A7A9F14912DFB9ECB2211DE86583F16:/test001 : *** Reply for [/test001/LaunchVXML] ***
02/11/2012 09:36:35:183 DEBUG - 1A7A9F14912DFB9ECB2211DE86583F16:/test001 : 0:<?xml version="1.0" encoding="UTF-8"?>
1:<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml" xml:lang="en-gb">
2:<meta name="author" content="Avaya Aura Orchestration Designer"/>
3:<meta name="runtime-version" content="06.00.09.01"/>
4:<meta name="runtimecommon-version" content="06.00.09.01"/>
5:<meta name="copyright" content="Copyright (c) 2002-2011, Avaya"/>
6:<form id="LaunchVXML">
7:<subdialog name="res" src="https://128.30.240.150:26100/sandbox/daniel/sl3test.vxml" namelist="LINE ANI DNIS CALLID">
8:<param name="LocID" expr="'unknown'"/>
9:<param name="CLI" expr="'undefined'"/>
10:<param name="DNIS" expr="'undefined'"/>
11:<param name="callID" expr="'sess3045336'"/>
12:<filled>
13:<var name="res___action" expr="res.action"/>
14:<var name="res___data" expr="res.data"/>
15:<prompt>Action is: <value expr="res___action"/></prompt>
16:<prompt>Data is: <value expr="res___data"/></prompt>
17:</filled>
18:</subdialog>
19:<block>
20:<submit next="LogServiceEnded?___DDSESSIONID=1A7A9F14912DFB9ECB2211DE86583F16%3A%2Ftest001" namelist="res___action res___data" method="get"/>
21:</block>
22:</form>
23:</vxml>
24:

02/11/2012 09:36:43:403 INFO - 1A7A9F14912DFB9ECB2211DE86583F16:/test001 : Using SCESession 1A7A9F14912DFB9ECB2211DE86583F16:/test001 servlet : LogServiceEnded
02/11/2012 09:36:43:403 DEBUG - 1A7A9F14912DFB9ECB2211DE86583F16:/test001 : session id:sess3045336 | test001:LogServiceEnded | Action = | res:action : x
02/11/2012 09:36:43:403 DEBUG - 1A7A9F14912DFB9ECB2211DE86583F16:/test001 : session id:sess3045336 | test001:LogServiceEnded | Data = | res:data :
02/11/2012 09:36:43:403 INFO - 1A7A9F14912DFB9ECB2211DE86583F16:/test001 : Using SCESession 1A7A9F14912DFB9ECB2211DE86583F16:/test001 servlet : NextAction
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
I guess I am confused now. It seems that the value is submitted bases on the log?

can you email me a test case?

yakulis@avaya.com
DanielSingleton4
Joined: Dec 3, 2013
Messages: 0
Offline
I probably wasn't very clear. The markup code generated by the servlet plays some output which proves that the values set in the subdialog have been returned. Unfortunately the values don't get back into OD. I'd expect the trace.log to include:

"Storing :res___action to complex: res:action as [runapp]"
"Storing :res___data to complex: res:data as [1234]"

Following the servlet I have a debug block that outputs the values of res:action and res:data from within OD. The value of res:action shows the "x" that was set prior to the servlet. This tells me that the servlet didn't change the value.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
looking at this again you variables that you create are out of scope when the submit is processed. They are only in the scope of the filled. In the filled you should be doing an assign and declare the variables at a higher scope. Look at the way OD generated is vxml.
DanielSingleton4
Joined: Dec 3, 2013
Messages: 0
Offline
Thanks - that fixed it.
Go to:   
Mobile view