Stop Thread after receiving a NAK

Clovertech Forums Cloverleaf Stop Thread after receiving a NAK

  • Creator
    Topic
  • #118281
    ronald kalmeijer
    Participant

      How can I stop the thread (Status STOP) after receiving a NAK (AR) with 3 Retries.
      After stopping the Thread I want to sent a mail.
      Which steps must I take to solve this problem?

      Ronald

    Viewing 2 reply threads
    • Author
      Replies
      • #118282
        James Cobane
        Participant

          You can do this by utilizing a proc in the ‘TPS Inbound Reply’ context of your outbound thread.  The proc can check the reply, and if it is a NAK, write the message to the error database and send an e-mail.  Attached is a proc that we have on one of our thread that does this type of logic.  You can use it as a reference to develop one of your own.  We also have an alert configured that if something gets written to the error database for this thread, it puts the thread “on hold”.

          Hope this helps.

          Jim Cobane – Henry Ford Health System

          Attachments:
          You must be logged in to view attached files.
          • #118288
            ronald kalmeijer
            Participant

              Hi Jim,
              Thanks for your tcl-script, it it very usefull.
              You mentioned also an alert that puts the thread on hold. Can I have the configuration for the alert.

              Ronald

          • #118285
            Charlie Bursell
            Participant

              You already have a proc that does most of what Jim says, cl_check_ack in $HCIROOT/tclprocss/recover.tcl.

              Simply copy this to a name of your own choosing then simply modify the part where after three tries it sends to the Error DB.  Make sure it still goes to Error DB and send your email at that point.

              I would suggest you shut down the process and not the thread.  If the process is busy the command may time out and the thread not stopped.  Either put this thread in its own process or with other threads that are OK to go down at the same time.

              As for the shutdown, I would exec a shell script in the background that would wait a couple of seconds to allow the thread  to continue long enough to get message to the Error DB

              • #118289
                ronald kalmeijer
                Participant

                  We don’t have the cl_check_ack tclproc. For that we have a validateReply60 that handle the ACK messages.
                  Good to know that the Thread must have his own process.
                  Do you have an example of the shell script? Thanks

              • #118294
                Charlie Bursell
                Participant

                  You should have the cl_check_ack proc.  It is shipped with Cloverleaf.  As I said it is in the file $HCIROOT/tclprocs/recover.tcl.  I have no idea what validateReply60 does.

                  The shell script would be a two line script like;
                  sleep 2

                  hcienginestop -p <processname> &

                  • #118295
                    ronald kalmeijer
                    Participant

                      Check, I found the proc cl_check_ack. In the Netherlands we use tclprocs from Enovation which are located in de sites.
                      Thanks for the script.

                Viewing 2 reply threads
                • You must be logged in to reply to this topic.