No announcement yet.

writing to database upon channel error

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?!?


  • #2
    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!


    • #3

      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, 09:23 PM.