cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Which hotevent can be used to catch com.audium.server.AudiumException ?

61
Views
0
Helpful
0
Comments
This document was generated from CDN thread

Created by: Feroz Syed on 11-11-2009 03:48:30 PM
Hi,
 
Which event type could be used to catch the com.audium.server.AudiumException? I have checked the generated VXML and I see the appropriate event com.audium.error could be used for this. When I added this event in the hotevent element and tryied to  run updateApp.bat, it is showing the error message saying that, this event cannot be used in the hotevent...
 
            Actually I have to continue some other callflow when I get any kind of errors. I am working on CVP 3.1.
 
Please help.
 
Regards,
Feroz

Subject: RE: Which hotevent can be used to catch com.audium.server.AudiumException ?
Replied by: Janine Graves on 11-11-2009 07:14:07 PM
Sadly, you can't com.audium.server.AudiumException using a HotEvent element.
 
HotEvent elements are only for VXML events. The com.audium.server.AudiumException error is a Java exception. The only way to catch a Java exception is by 'extending' the Java code and executing the java class within a try/catch block. This can be done to each of the elements that comes with Studio and with the Say it Smarts. You'd have to look up the Java class names in the Element Specifications and Say it Smart Specifications reference manuals.
 
The easier, but not as effective, way to deal with the java exception, is to designate an element (the SubdialogReturn or CVPSubdialogReturn) as your 'Error' element (right click the element in the Studio Workspace, and select Error Element > Yes). This allows you to return data to ICM who can apologize to the caller and queue them to an agent (or send the call back to a Studio app).
 
Janine
www.TrainingTheExperts.com

Subject: RE: Which hotevent can be used to catch com.audium.server.AudiumException ?
Replied by: Feroz Syed on 12-11-2009 03:36:27 PM
 
Thank you for your quick response Janine!
 
I have a custom Action element and as you know this will have only exit state which is "done".  I am thinking to tweak this custom action element code to set some session variable if any exceptions are thrown in the finally clause,   and have a decision element after this custom element to check the value of the session variable for any error and proceed accordingly.

Please suggest if this is possible.

Regards,
Feroz

Subject: RE: Which hotevent can be used to catch com.audium.server.AudiumException ?
Replied by: Janine Graves on 12-11-2009 03:49:33 PM
Yes, that's perfectly reasonable. and you can create as many variables as you need. For example, use the mthod setSessionData. For example setSessionData("status", "success") or setSessionData("status", "failure")
 
If you wrote the Action element yourself, then you might consider re-coding it as a custom Decision element, so it can branch the code automatically. Decision elements are just like Action elements except they have to define the exit states for Studio (getExitStates method), and then end the doDecision() method with a return "exitStateName"  clause that returns a string containing the real name of an exit state defined in the getExitStates method.
 
Either way will work just fine.
 
Janine
CreatePlease to create content
Content for Community-Ad
FusionCharts will render here