Filter messages on multiple conditions

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Filter messages on multiple conditions

  • Creator
    Topic
  • #52717
    Bob Deemer
    Participant

      We need to filter order messages (ORM) based on multiple conditions:

      1. If OBR-24 eq LAB, send the message OR

      2. If OBR-24 eq RT and ORC-1 eq NA send the message

      otherwise, DO NOT send the message.

      What would be the best way to accomplish this, using tcl or can it be done in a translation?

    Viewing 1 reply thread
    • Author
      Replies
      • #75266
        Jim Kosloskey
        Participant

          Bob,

          This can be done either in a Tcl proc or via the Translate.

          Generally the preferred method is to use Tcl.

          Here we generally place the Tcl proc (we typically use one argument driven Tcl proc for nearly all of our filtering) in the route (pre Xlate). Another method is to use the TrxID UPoC (Tcl).

          If using the Xlate, you would do a SUPPRESS when you want to KILL the message.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #75267
          Richard Hart
          Participant

            Hi Bob.

            We do this two ways.

            If we have a tclproc that has already parsed the message, we use this proc to set message meta data to store routing information. The trx proc just returns the meta data.

            e.g.

            proc har_code_trx_id {aMsgId} {

                   #

                   # The Route is in the user data

                   #

               set myTrxId [msgmetaget $aMsgId USERDATA]

               return $myTrxId

            }

            If we don’t have a proc, then we code a trx proc.

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