Author Message
HSINKAIHO
Joined: Mar 14, 2015
Messages: 10
Offline
Hi Sir,

How to throw custom-event (ex: com.microsoft.sqlserver.jdbc.SQLServerException ) in Java BasicServlet
then let the AppRoot to catch.

Thank you.
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
You would have to catch the Java exception in a data node, then route the execution to a VXML node which will throw a customer event that can be defined in the event editor.
HSINKAIHO
Joined: Mar 14, 2015
Messages: 10
Offline
Hi Sir,
but how to call java servlet in Data Node
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Not sure I understand your question. But you can create a custom servlet by using the Servlet item from the flow palette. Then you can connect the data node to it.
HSINKAIHO
Joined: Mar 14, 2015
Messages: 10
Offline
Hi WilsonYu,


Sorry for my English
I use Servlet Node ( java code to call microsoft SQL JDBC DB function ), if any exception occour .
How I can throw it to the AppRoot to capture the custom error event .

Thank you so much.
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
In your java code, you can use a OD project variable to store a flag to indicate if an exception has occurred. Then in the next Data node, you can use logic to check the flag to invoke a Form node that can throw a custom event.
Go to:   
Mobile view