web stats
Mirth Community - View Single Post - How to generate an alert
View Single Post
Old 10-22-2009, 09:40 AM
jerchap jerchap is offline
OBX.3 Kenobi
Join Date: Nov 2007
Location: British Columbia, Canada
Posts: 129
jerchap is an unknown quantity at this point
Question How to generate an alert

I want to generate an alert from within a channel destination so that I can use the alert functionality to email out, rather than make my own emailing mechanism. I can get it to work fine by using throw in a javascript destination, but then the message in the alert contains a bunch of strack trace information. The email is going out to non technical users and they just get confused with all that extraneous information. Is there a way to generate the alert without including all that data?

As an example, all I want is the alert to say "Error adding child 'abc' to parent 'xyz'" but what actually happens is the error message looks like this:

ERROR-414: JavaScript Connector error
ERROR MESSAGE: Error executing script
org.mozilla.javascript.JavaScriptException: Error adding child 'xyz' to parent 'abc':
Error invoking WebService AxisFault ca.mycompany.CustomException: class ca.mycompany.item not found: (SearchCode: xyz) (218b5a03-0936-49b7-b65f-74612ee4096d#27)
at org.mozilla.javascript.gen.c4667._c6(218b5a03-0936-49b7-b65f-74612ee4096d:27)
at org.mozilla.javascript.gen.c4667.call(218b5a03-0936-49b7-b65f-74612ee4096d)
at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)

Last edited by jerchap; 10-22-2009 at 09:50 AM.
Reply With Quote