This document was generated from CDN thread
Created by: null on 16-03-2004 06:10:44 AM
Hi
I am developing Custom Transfer Element. One of my requirement is
I have an exit state of
"Failure - Identified".
Failure is having different reasons
1) 26 - Fatal Error
2) 27 - Switch Down
3) 28 - No resource Available
I need to store the value of failure in a variable.
How do I do this?
Pl help me with sample code.
Regards,
Siv.
Subject: RE: How do I receive Error Code
Replied by: null on 16-03-2004 03:08:33 PM
Hi,
You simply use the Session API object VoiceElementData and call the setElementData method. See the Javadocs for other versions of this method that allow you to control whether this variable is stored in the activity log.
[code:1:36b31cecec]
public String addXmlBody(VMain vxml, java.util.Hashtable params, VoiceElementData data)
{
data.setElementData("myvarname", "myvarvalue");
...
}
[/code:1:36b31cecec]
See the Programmers Guide for more on the Session API and the Javadocs to see what other things you can do with it (such as creating session data).
Hope this helps.