cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1059
Views
0
Helpful
5
Replies

Throw custom HotEvent from Java

chanon.wn
Level 1
Level 1

Hello,

     Is it possible to throw custom Hotevent from Java code?

     My intention is to throw this custom event from Java file when back-end integration error like WebService timeout etc.

     So how to i archive this? Do you have a code example?

     What i research is

     1. Implement HoteventInterface but what should i put there so i can create "error.mycustom" event that catch-able in HotEvent element.

     2. Throw Hotevent from Java code. How to archive this i have no idea at all.

Thanks guy.

5 Replies 5

ptindall
Cisco Employee
Cisco Employee

To throw a custom event you'd have to create a custom voice element and use the VAction class to add the <throw> tag.  If you want to trap server-side processing events then making use of the version 10.5 event handling enhancements would probably be a better (and far simpler) way to go.

Paul

Paul,

Do you know how to enter multiple java exceptions (or vxml events)? Are

they comma separated?

You're referring to the event list on the element config event tab?   If so, it's comma separated.

Hello Paul,

I don't have 10.5 to try yet. Currently i'm working on V9. Is it corrent that it is no possible to throw HotEvent from ActionElement?

And do you have any code example to add the custom event to the root document?

HotEvent's relate to VoiceXML events so I don't understand why you'd want to get involved with throwing custom VoiceXML events based on server-side exceptions.   Maybe I misunderstood your use case.

I'm assuming you're trying to handle a server-side event resulting from some back-end processing so I would simply use a custom Decision Element, catch the Java exception(s) of interest and return via an error exit state.  Then, perform whatever caller dialogue actions, retries, alternative integration actions etc as appropriate to the error.

Paul