Mirth Connect 4.1.0 Released!

Mirth Connect 4.1.0 is now available as an appliance update and on our GitHub page. Mirth Connect 4.1.0 includes new features such as new event log messages, additional fields to the Welcome to Mirth Connect screen, new information included in alerts as well as many smaller changes, updates, and improvements. This release also contains several 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

Generating ACK messages - HOW?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Generating ACK messages - HOW?

    I've combed through the forunm today finding multiple responses to questions regarding ACK or response generation. I've tried multiple things and I can't get it to work.

    Is there a STICKY somewhere, or can we decide on a standard method of some sort to forward the auto generated ACK messages and make it a Sticky?

    It seems there are multiple methods in the forum that may span versions? Can anyone please clarify this issue for me? I am running 1.6 and would like to generate ACK messages from a TCP listener that is posting to a database.



  • #2
    Re:Generating ACK messages - HOW?

    Did you ever figure this out? I'm having a similar problem and probing the forums for an answer.




    • #3
      Re:Generating ACK messages - HOW?

      I ended up making a secondary channel to handle ACKs.
      The source is a channel reader, the source transformer maps the ackcode and messageid. The Destinations have filters for each site, and then if true for one of the many destinations, it updates a table in the database to say successful ACK. It basically changes a state from waiting to succcessful or failed.

      This is the description for it internally:
      "Ack Receiver:
      This is a channel reader, receiving the LLP replies from other channels and updating database tables to show message status.
      This is setup with a non-specific source and multiple destinations.
      Each destination is named according to the <site code> <site name> convention used above. (minus the descriptor at this time)
      Currently, filters are setup to match the site code passed back in the ACK message to that of the site configured in the outbound feed. The filter has two steps, joined by an 'AND' clause:
      1. Check for the site code in MSH.4.1 field
      2. Check for the presence of 'AA' in the MSA.1.1 field
      When both are true, the message is transformed and an Update statement is generated, specific to the 'adt_<site code>_msg' table. This changes the status indicator from 'W' to 'Successful ACK' for the specific message control id.
      If MSA.1.1 has an 'AE' (indicating some failure), the status indicator is changed to reflect the message has failed and a NACK has been received."

      I hope that helps.


      • #4
        Re:Generating ACK messages - HOW?

        Nice icon, btw - homebrewer?


        • #5
          Re:Generating ACK messages - HOW?

          Thanks Kerry.

          So your solution doesnt respond with the ACK over the same TCP connection that your source is listening on (on where the message came from). That's where I think this is failing. I have to do this, and sending the ACK to the TCP Listener using the 'Respond From' functionality using an ACK variable I'm building in the source transformer. I posted this to the forum but have not received any feed back on it. For some reason it doesn't look like the 'Respond From' feature is working, or I'm doing something wrong. This is an X12 messaging interface, so I need to respond with an X12 Ack (ISA~TA1~IEA~) with start of text and end of text characters. I'm going to post another question to the support forum and see if I can find someone else that has done this. Seems like a common use-case scenario.

          btw...not a home brewer, but like drinking them!

          Thanks again!



          • #6
            Re:Generating ACK messages - HOW?

            I've ran into a very similar problem some weeks ago.

            I used a code in the postprocessor step of the channel like this:

            var ack_resp = "";

            if ( all_went_ok ) {
            ack_resp = "MSH|..............\rAA..........";
            else {
            ack_resp = "MSH|......\rEE.......";

            responseMap.put('custom_channel', ack_resp )

            Finnally, in the channel source tab, select the "custom_channel" destination as "respond from", then the message you've forged will be sent back over the same tcp connection.

            Hope that helps


            • #7
              in your code are you using the variables available from mirth?