Issue with resend_ob_msg

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Issue with resend_ob_msg

  • Creator
    Topic
  • #51995
    Mike Keys
    Participant

      I have an outbound thread configured to use resend_ob_msg in the Tiemout Handling area of the OUtbound thread configuration. resend_ob_msg is the proc used for reply generation.

      I know basics of how this works, but it is causing issue on an interface we are migrating from eGate to Cloverleaf.

      In eGate, if a message sent to the receiving system is rejected, then eGate is set up to “skip” the message, journal it and move on.

      However, Cloverleaf, because of the resend_ob_msg will resend this message 4 times, which is causing the receiving system’s interface application to shutdown.

      What I would like to do for this thread only is configure the reply generation to interrogate the MSA and if either a NACK or an application reject, to write the message sent to an error log, but to continue processing.

      Is this possible with a built-in or am I looking at a custom proc?

      Mike Keys

      Interface Engineer

      Decatur Memorial Hospital

    Viewing 15 reply threads
    • Author
      Replies
      • #72621
        Jim Kosloskey
        Participant

          Mike,

          You will need a tcl proc that handles the reply you receive.

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

        • #72622
          Mike Keys
          Participant

            Jim: Thanks. Has someone already written something like this?

          • #72623
            James Cobane
            Participant

              Mike,

              Here is a proc to check the replies (written for 5.6, using the OBMSGID handle).  Modify as you see fit.

              Hope this helps.

              Jim Cobane

              Henry Ford Health

            • #72624
              Mike Keys
              Participant

                @James:

                Thanks. I’ll check it out. 🙂

              • #72625
                Mike Keys
                Participant

                  James. I put it in as is. No failures but Browse Output shows:

                  ‘KILL ‘ (returned by ‘checkHL7_reply ‘) does not match { }

                  Suggestions as to what this means?

                • #72626
                  Robert Kersemakers
                  Participant

                    Hi Mike,

                    As you are using ‘resend_ob_msg’, I assume you have all the ‘recover_xx’ procs available.

                    You can use the ‘validate_reply’ in TPS Inbound Reply. You can define your own VALIDEXP and set RETRIES to 0 so no message is resend. You can even set ERRORDISP so the error-message is written to the log instead of to the error-db.

                    I think this is what you are looking for.

                    Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                  • #72627
                    James Cobane
                    Participant

                      Mike,

                      If you are not on version 5.6 (or greater), then the proc will need to be modified to use the older logic of the saved ob message handle, rather than the OBMSGID handle. As Robert pointed out, you should have the recover_xx procs available, and you can use the ‘validate_reply’ proc, modifying as needed.  

                      Jim Cobane

                      Henry Ford Health

                    • #72628
                      Mike Keys
                      Participant

                        Yes, we are on 5.6. Yes, we have the recover_33_mck.tcl proc as this is McKesson’s implementation of Cloverleaf.

                        All of my outbound threads are configured using the same methodology that I was taught. This is the first “one off” that I’ve had to do, so I will need help placing the procs in the right area. Right now, here’s what I have.

                        Outbound

                        Send OK Procs: save_ob_msg

                        TPS Inbound Reply: checkHL7_reply kill_ob_save

                        Timeout Handling

                        Reply Generation:  resend_ob_msg

                        Is this correct?

                      • #72629
                        Robert Kersemakers
                        Participant

                          Mike,

                          Try using the ‘validate_reply’ proc instead of the ‘checkHL7_reply’. And have a look at the code (and documentation/comments) of the ‘validate_reply’ proc: it explains a lot.

                          I am wondering if you have the recover_xx proc-file. I’m using recover_38.tcl right now and all the procs have the number in their name: save_ob_msg_38, resend_ob_msg_38, validate_reply_38 and kill_ob_save_38. Either your proc-names have been changed or you are using an old version. I think you can get the latest version of recover_xx through support. Not sure if I can post these freely.

                          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                        • #72630
                          James Cobane
                          Participant

                            Mike,

                            With 5.6, you can turn on the ‘Resend OB message” option under the “Timeout Handling…” and remove the save_ob_msg and kill_ob_save procs from your configuration.  The engine automatically saves a copy of the outbound message (to state 16, hence the use of the OBMSGID logic in the proc), and the checkHL7_reply proc uses this saved message and also kills the saved message handle after it’s processed the reply.

                            Our threads are configured this way.

                            Hope this helps.

                            Jim Cobane

                            Henry Ford Health

                          • #72631
                            Mike Keys
                            Participant

                              Robert,

                              We have what is called Pathways Interface Manger, which is McKesson’s tweaked version of Cloverleaf. They have tweaked some of the tcl’s or added some that aid development with the McKesson environment.

                              The recover_33.tcl is actually called recover_33_mck.tclin this implementation. It is placed at the global level and contains the validate_hl7ack procedure. I do not have a validate_reply proc with this implementation.

                              If I ‘vi’ the recover_33_mck.tcl proc I can see in the validate_hl7ack section that there is a resend count that I could adjust. Right now, this is set to three resends upon receiving an AR or CR. However, if I change this it will affect all of my outbounds using the validate_hl7ack proc.

                            • #72632
                              Mike Keys
                              Participant

                                James, I’ll give this a try.

                                James Cobane wrote:

                                Mike,

                                With 5.6, you can turn on the ‘Resend OB message” option under the “Timeout Handling…” and remove the save_ob_msg and kill_ob_save procs from your configuration.

                              • #72633
                                Mike Keys
                                Participant

                                  James: I think this did the trick. Thanks!

                                • #72634
                                  Bob Richardson
                                  Participant

                                    One and All,

                                    Recollecting from the Annual Conference of 2009,  the only official recover procs have either 33 or 56 in the name – anything else is not an official distribution from (now) Healthvision/Lawson.  That is names = recover_33.tcl or recover_56.tcl.  I usually keep an original unspoiled version in our shop and then clone/modify as needed.

                                    There are myriads of clones and creations out there in user-land so buyer beware.  These are not official versions.

                                    Enjoy.

                                  • #72635
                                    Bob Schmid
                                    Participant

                                      in case of receiving system NOT returning a reply at all …what would be the best method of handling this situation.  Does not seem that 56 addresses this situation.

                                      Thanks

                                    • #72636
                                      Russ Ross
                                      Participant

                                        There is the ability to wirte a TCL proc to proactively do whatever you want when a message times out and gets resent.

                                        For example, you could write each resent message out to a file or simply increment a counter if that is all you need.

                                        Here is one of my old posts illustrating how a resend TCL proc sends out an alert once a message is resent x number of times, which you could use as a tangible example and leverage for you own needs:

                                            <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=1862&#8243; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=1862

                                        You might also want to read this URL since resend procs can only be used if opting not to use the built in resend capability with later versions of cloverleaf from what I currently understand:

                                            <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=4212&highlight=tspcheckresendcount&#8221; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=4212&highlight=tspcheckresendcount

                                        Anyway this is the main reason we are still on the older method plus no need for us to retrofit everything.

                                        Our tps_check_reply_2 proc does some of the things you are asking about like it can write the NAKed message to a file and has an argument to keep on going after skipping that NAKed messages or shutdown completely, plus send out alerts if desired.

                                        Here is a URL where I already posted our tps_check_reply_2 proc:

                                            <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=1997&&#8221; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=1997&amp;

                                        Russ Ross
                                        RussRoss318@gmail.com

                                    Viewing 15 reply threads
                                    • The forum ‘Cloverleaf’ is closed to new topics and replies.