Kill Message from within XLT

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Kill Message from within XLT

  • Creator
    Topic
  • #52122
    Davin Studer
    Participant

    Is it possible to kill a message from within an XLT based on an “IF” action?  Basically, I would want it to be at the top of my XLT and if a certain criteria was true, then kill the message and don’t continue processing the XLT.  I know I could easily do it with a pre/post proc, but I want to make it also maintainable for those who come after me.

Viewing 7 reply threads
  • Author
    Replies
    • #73163
      James Cobane
      Participant

      While it is not the most efficient, you can simply use ‘SUPPRESS’ as the action when your IF condition is true.  This suppresses the message.

      Hope this helps.

      Jim Cobane

      Henry Ford Health

    • #73164
      Davin Studer
      Participant

      I was wondering about using SUPPRESS, but the documentation on it in the help files is kinda lame.  It doesn’t really explain it very well.

    • #73165
      David Harrison
      Participant

      Put the SUPPRESS at the beginning of the Xlate. In the dialogue following the IF statement, if you want to send the message put a CONTINUE. The message will be killed if you don’t execute the IF.

    • #73166
      David Harrison
      Participant

      Put the SUPPRESS at the beginning of the Xlate. In the dialogue following the IF statement, if you want to send the message put a CONTINUE. The message will be killed if you don’t execute the IF.

    • #73167
      Jim Kosloskey
      Participant

      The Xlate always tries to generate a message.

      Even if you do CONTINUE or SEND the Xlate will output one more message unless you do a SUPPRESS.

      So what SUPRESS means is kill the message this Xlate would produce (with or without CONTINUE or SEND).

      Where you place it is up to you.

      If you unilaterally SUPPRESS by placing it a the beginning, then your following logic must use a CONTNUE or a SEND.

      If you have your filtering conditions at the beginning and do the SUPPRESS in the true branch and the rest of your logic to define how the mesage should be constructed in the false (else) path no CONTINUE or SEND is necessary.

      I believe the actual SUPPRESSION occurs after all of the Xlate logic is completed just before the Xlate is supposed to generate the message.

      So having a condition with a SUPPRESS and no else followed by the unconditional building of the message will cause all of those actions to occur andf then the result thrown away.

      So if what I believe is true, then using SUPPRESS within a condition but not having a false path to build the message only if the condition is not true is probably a little less efficient.

      I also believe that with the enhancements in 5.8 for message parse sharing and stacking of Xlates, the performance of filtering in an Xlate may be improved sufficiently to warrant re-thinking the advantages of pre-xlate filtering versus in Xlate filtering.

      One might also be able to have a filter Xlate followed by the actual message build Xlate. The filter Xlate would either SUPPRESS or CONTINUE the message depending on the filter conditions (probably use BULKCOPY or a series of PATHCOPYs to get the entire message passed on).

      The messag build Xlate would then actually build the message based on the integration specification to the needs of the receiving system.

      This would allow an architecture of having Xlates that build messages without fiiltering logic present (like now when using pre-xlate filtering via Tcl) which can be used when there is different filtering criteria and the filtering criteria would be in whatever filter Xlate was stacked ahead.

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

    • #73168
      Kirby Knight
      Participant

      D studer,

      Did you use SUPPRESS?  If so what was the results you had?

      I am looking for a similar solution.

    • #73169
      Davin Studer
      Participant

      Yes, we did use  SUPPRESS.  It worked fine.

    • #73170
      Scott Folley
      Participant

      Jim Kosloskey wrote:

      The Xlate always tries to generate a message.

      Even if you do CONTINUE or SEND the Xlate will output one more message unless you do a SUPPRESS.

      So what SUPRESS means is kill the message this Xlate would produce (with or without CONTINUE or SEND).

      Where you place it is up to you.

      If you unilaterally SUPPRESS by placing it a the beginning, then your following logic must use a CONTNUE or a SEND.

      If you have your filtering conditions at the beginning and do the SUPPRESS in the true branch and the rest of your logic to define how the mesage should be constructed in the false (else) path no CONTINUE or SEND is necessary.

      I believe the actual SUPPRESSION occurs after all of the Xlate logic is completed just before the Xlate is supposed to generate the message.

      So having a condition with a SUPPRESS and no else followed by the unconditional building of the message will cause all of those actions to occur andf then the result thrown away.

      So if what I believe is true, then using SUPPRESS within a condition but not having a false path to build the message only if the condition is not true is probably a little less efficient.

      I also believe that with the enhancements in 5.8 for message parse sharing and stacking of Xlates, the performance of filtering in an Xlate may be improved sufficiently to warrant re-thinking the advantages of pre-xlate filtering versus in Xlate filtering.

      One might also be able to have a filter Xlate followed by the actual message build Xlate. The filter Xlate would either SUPPRESS or CONTINUE the message depending on the filter conditions (probably use BULKCOPY or a series of PATHCOPYs to get the entire message passed on).

      The messag build Xlate would then actually build the message based on the integration specification to the needs of the receiving system.

      This would allow an architecture of having Xlates that build messages without fiiltering logic present (like now when using pre-xlate filtering via Tcl) which can be used when there is different filtering criteria and the filtering criteria would be in whatever filter Xlate was stacked ahead.

      Jim, I love that idea.  We are not yet on 5.8 but we are rapidly moving in that direction and I can see many instances where this would drastically improve our performance and eliminate the creation of a bunch of extraneous messages that will never be used…

      Thanks for that!

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10