Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Error controlling

  • Filter
  • Time
  • Show
Clear All
new posts

  • Error controlling

    Hi all,

    I have two questions about error controlling in Mirth.

    *Can I have a channel that if there is any error in source or destination transformers, or destination itself, the channel gets disabled ? I'm interested in this behaviour to ensure the messages are delivered in order, and if any error occurs, next messages will not be processed until manual intervention of the mirth admin.

    *I've defined a simple channel: File reader with transformer and database destination. In the file reader I define a path to read messages, another to move once the message is processed and another path to move if any error occurs wth the message processing.
    In the transformer I have some JS code to create the apropiate INSERT statement,and at the end of this code block, I put the var "strQuery" to the channel map. In the database writer of this channel I get this var "strQuery" and simply execute it to the database connection.

    If I get any error in the transformer code (parsing, nullpointers ...) the message is marked as "error", but is moved to the "moved-to" path. I don't understand this behaviour because if there is an error (in the transformer or the database writer) I expect that this message if marked as errored but moved to the "error-move-to" path.

    This behaviour is related to the "transation endpoints" check in the channel definition ? I really don't understand it. Or to get the desired behaviour I should implement the JS code at the destination transformer, or in a JS reader ?...

    Thanks in advance.

  • #2
    Re:Error controlling

    Mirht can only detect problems at the source JS steps. Move your steps to the source, and then the file will be moved to the error dir.

    Try post-processor to allow detection of failures in a channel. From the post-processor you could exec a Java call to a mirth function to stop the channel.


    • #3
      Re:Error controlling

      So, how can I detect an error from a postprocessor script? is there any code snippet that show this?

      The future releases of Mirth will detect errors at any step (source-transformers, destination-transformers o destination) ?
      I think it's a very important issue, the ability to catch any error and the possiblity to implement a sort of acknowledge protocol, and a way to ensure the delivery order.

      In my scenario, we have a system A and B, and Mirth.


      The system A calls a webservice running in Mirth (SOAP listener), and Mirth, using the database writer or file writer to the system B.

      The "sincronous" approach is: when A sends the message via SOAP, it gets a response that indicates if the message has been processed OK (sent to system B). The communication between A and B trought mirth it like a point to point (A-B). But the problem of this kind of configuration it's that when A sends a request (message) to B, it's mandatory to A wait until Mirth delivers the message to B, and this can delay for a while.

      On the other hand (the "asincronous" approach) is: when A sends a message to Mirth vía SOAP, the response it's almost-immediate (message received, not delivered). From this point, if any error occurs when delivering the message to B, it's Mirth responsability and any retry. If finally the message can't be delivered, Mirth should notify the system A that can't deliver the message "idXXX".... etc

      I'm evaluating these two approaches in our environments, the problem is that the sinc is too slow, and the asinc it's very hard to implement, or impossible to implement (at this moment) if I only can detect errors at JS readers.

      Are my approaches correct? Any clue?

      If anyone had implemented any kind of acknowledge protocol, please share it!


      • #4
        Re:Error controlling

        Post edited by: quimicefa, at: 04/16/2008 07:21