› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › ITERATE on an outbound variant
Pretty sure the answer is that you can’t iterate on the outbound side. I remember trying it and I thought I had asked the question on Clovertech but I can’t find it. Here is where someone else asked.
No you cannot iterate using an outbound element.
However, if you are on a release of Cloverleaf which supports Xlate Chaining then you can chain two Xlates, one that does the original ITERATE and then asecond one which now can ITERATE over the output of the first Xlate.
If you are not on such a release, then a method that can be used is to have two instances of the ITERATE, the first builds the outbound, the second is a complement over the inbound which simulates what would have been built to decide how to proceeed. I have done this in the past for various reasons.
While the multiple ITERATE in one Xlate can get the job done, the process is convoluted and difficult to maintain.
Now that we are on Cloverleaf 6.0 I would try the chaining if the need arises again.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
No you cannot iterate using an outbound element.
However, if you are on a release of Cloverleaf which supports Xlate Chaining then you can chain two Xlates, one that does the original ITERATE and then asecond one which now can ITERATE over the output of the first Xlate.
If you are not on such a release, then a method that can be used is to have two instances of the ITERATE, the first builds the outbound, the second is a complement over the inbound which simulates what would have been built to decide how to proceeed. I have done this in the past for various reasons.
While the multiple ITERATE in one Xlate can get the job done, the process is convoluted and difficult to maintain.
Now that we are on Cloverleaf 6.0 I would try the chaining if the need arises again.
I hadn’t thought to do that – that would do the trick, but yes it would be messy to maintain. We are not yet on V6.0.
Funny though, that cloverleaf allows you to set it up using point and click in the gui, and then simply doesn’t execute it.
One and All,
Running Cloverleaf Integrator 5.8.6.0 on AIX 6.1 TL 7 virtualized.
We have done a chained xlate to solve the exact problem that you describe in your post, that is, take the output from an xlate and use it
as input in a chained or following xlate. Works fine!
If you look in the process log you should find error messages about
invalid (illegal) references for your looping attempts (iterates) on
output groups. The xlate will not fail only not work!
But then we have not experimented with the option to elevate warnings to error levels for threads.
Hope this helps to support a neat feature of xlate chaining.
Enjoy.
Jim,
What release of Cloverleaf are you on?
Xlate chaining was introduced post 5.6 but I am not sure what release exactly.
Maybe you are on a release which provides chaining.
Another method is to send the message after the first Xlate to aa thread which does an ‘OVER’ (to get the message on the inbound side of that thread) then routes that to the real target. In this second thread routing one could apply a second Xlate which would ITERATE overf the ‘outbound’ of the first Xlate.
There may be others as well – but for my money chaining offers the best alternative I think.
In some of the cases where I have had to use the multiple ITERATEs it actually was not too bad – it all depends on what the need is.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
Jim,
The Xlate Configurator will also allow you to use anything you want in an address path other than an Iteration counter (%xn) like this 0.1(@variable).NTE… but it won’t work.
Who knows maybe some day they will allow iteraion over outbound just as someday we may be able to use anything in the address path like other fields, temp variables. This has been requested but so far not provided.
I can get that to work (using temp variables in address pathing anyway) by using Tcl so it should not be too hard for the developers.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
Jim
We are on 5.7. Thanks for all the advice and alternatives. I had a solution for my particular issue, but was just curious if it was do-able to iterate on the outbound variant.
Since I had a minimum of 2 OBX and a max limit of 3 OBX’s (for a blood pressure vital), I ended up simply doing an ITERATE on a list where the list was 0 1 2, then used the %l1 as the index to the outbound variant.
Thanks everyone.
Jim