web stats
writing to database upon channel error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 05-05-2010, 12:18 PM
bensong bensong is offline
What's HL7?
Join Date: Dec 2009
Posts: 1
bensong is on a distinguished road
Question writing to database upon channel error

Can anyone give me some pointers on how Mirth can perform a custom action when a channel error is detected (any type of error)?

Ideally, what I would like to be able to is write a row to a SQL table when a channel error has been detected. I can then use another app we have written to monitor the table which will send SMS alerts out to our support team.

Would be nice if the Alerts config did more than just sending emails... maybe in the next version?!?

Reply With Quote
Old 05-05-2010, 12:21 PM
dans dans is offline
Mirth Employee
Join Date: Apr 2007
Location: Irvine, CA
Posts: 590
dans is an unknown quantity at this point

use the post processor. Get the response object from the responseMap. If the status is ERROR you can perform your custom DB operations.
if(responseMap.get("Destination 1").getStatus() == "ERROR"){
//   do your custom code here
Daniel Svanstedt
Software Engineer
Mirth Corporation

Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
Mirth Support | Mirth Training | Mirth Appliances | Online Training | Developer Q&A

Don't forget, Mirth Support gives you access to all of our online training videos, and silver support gives you access to developer Q&As!
Reply With Quote
Old 07-05-2010, 10:19 PM
jasonn jasonn is offline
Mirth Newb
Join Date: May 2010
Posts: 13
jasonn is on a distinguished road


Going by this:

I think you mean the following:

HTML Code:
if(responseMap.get("Destination 1").getStatus() == com.webreach.mirth.model.Response.Status.FAILURE){
//   do your custom code here
Is this right?

Last edited by jasonn; 07-05-2010 at 10:23 PM.
Reply With Quote

alerts, error detection, sms

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 11:57 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation