Accessing the Loop Repeat count for an operator

22 views
Skip to first unread message

Rob

unread,
Oct 14, 2015, 6:16:30 AM10/14/15
to CA Process Automation Forum
I want to loop an operate using the operaters Loop setting in the Execution Settings area and, crucially, have access to which iteration I am on for use in the code in the operator.

I can't find anything in the documentation on how to access the iteration value.  I can see it in the logs as per the example so I would assume it should exist as a value I could reference in the script of the operator.


I want to do this to be able to create an elegant way for the SNMP trap operator to send traps to multiple hosts by looping that operator based on the size of an array holding the list of trap hosts and using that array with the iteration index as the destination value for the operator.  This allows me to use this throughout the script in many places and keeps it all very simple.

Any ideas welcome.



Auto Generated Inline Image 1

Bee Jay

unread,
Oct 14, 2015, 6:40:29 AM10/14/15
to CA Process Automation Forum

Hi Rob,

There's a variable in the operator dataset called CurrentLoopIteration that you can use for your purpose. You can access it using Process{OpName}.CurrentLoopIteration in post execution or any of the other operator dataset variants.

Thanks,
Victor


--
You received this message because you are subscribed to the Google Groups "CA Process Automation Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itpam-forum...@googlegroups.com.
To post to this group, send email to itpam...@googlegroups.com.
Visit this group at http://groups.google.com/group/itpam-forum.
For more options, visit https://groups.google.com/d/optout.

Rob

unread,
Oct 14, 2015, 7:02:08 AM10/14/15
to CA Process Automation Forum
Thanks for the response,

My guess is that this variable was only exposed in later versions - doesn't seem to return anything in version 3.0 (Yes I know that is V old but and unsupported).

:-(
Reply all
Reply to author
Forward
0 new messages