Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Kill Message from within XLT
- This topic has 8 replies, 6 voices, and was last updated 13 years, 7 months ago by Scott Folley.
-
CreatorTopic
-
November 22, 2010 at 4:55 pm #52122Davin StuderParticipant
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. -
CreatorTopic
-
AuthorReplies
-
-
November 22, 2010 at 5:07 pm #73163James CobaneParticipant
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
-
November 22, 2010 at 5:10 pm #73164Davin StuderParticipant
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.
-
November 24, 2010 at 3:50 pm #73165David HarrisonParticipant
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.
-
November 24, 2010 at 3:51 pm #73166David HarrisonParticipant
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.
-
November 24, 2010 at 5:08 pm #73167Jim KosloskeyParticipant
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.
-
January 25, 2011 at 9:39 pm #73168Kirby KnightParticipant
D studer,
Did you use SUPPRESS? If so what was the results you had?
I am looking for a similar solution.
-
January 31, 2011 at 8:58 pm #73169Davin StuderParticipant
Yes, we did use SUPPRESS. It worked fine.
-
February 18, 2011 at 10:43 pm #73170Scott FolleyParticipantJim 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!
-
-
AuthorReplies
- The forum ‘Cloverleaf’ is closed to new topics and replies.