Custom Dispositions?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Custom Dispositions?

  • Creator
    Topic
  • #54893
    Brandon Kerr
    Participant

      Short version: is it possible to make custom dispositions?

      Long version: We’re customizing the cl_check_ack to run an exec command to stop the thread or process if we get a bad ACK. The problem we’re encountering is that calling the hcienginestop or the pstop is ending the process and so can’t return the KILLREPLY etc dispositions.

      One thought I’ve had is to somehow work these exec commands into a disposition so that we can simply add the disposition to the return value and have this new disposition run the exec commands, hoping that it’s possible.

      Any thoughts and advice would be appreciated.

      Thanks!

    Viewing 3 reply threads
    • Author
      Replies
      • #83326
        Jim Kosloskey
        Participant

          I don’t think custom dispositions are possible.

          Try using system instead of exec.

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

        • #83327
          Brandon Kerr
          Participant

            Thanks for the advice, Jim. I had my doubts that it would be possible to make a custom disposition, but was hoping.

            I looked into the system commands instead of exec and I don’t think that solves the problem. The hcienginestop will still shut down the process before I can return the KILLREPLY and ERROR dispositions, as we need to record these in the error database.

          • #83328
            Jim Kosloskey
            Participant

              Oh – I thought you wanted to stop the thread not the process.

              Not sure why you would want to stop the process on a negative acknowledgement.

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

            • #83329
              Charlie Bursell
              Participant

                I am not in favor of trying to stop a thread.  If the process is busy or blocked the thread will not stop.  I prefer to issue hcienginestop for the process even if you have to put the thread in its own process.  If the engine is hung hcienginestop will eventually kick it to death.

                Here is what I would do:

                ERROR the saved message (my_mh) with a reason in the USERDATA meta field and CONTINUE the reply message to another proc.

                By not issuing the KILLREPLY the AWAIT REPLY flag is still set so no more messages are processed.  Then, in the second proc issue the hcienginestop command.

                I wrote cl-check_ack many moons ago but if I remember correctly under both the AR and AE code there is something like:  

                return “{KILLREPLY $mh} {ERROR $my_mh}”

                And the reason for the ERROR is already in the USERDATA field.

                Simply copy cl_check_ack to another file and rename it to whatever then change the above to:

                return “{CONTINUE $mh} {ERROR $my_mh}”

                Then do your process stop in the next proc

                Good luck with it.

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