The For Each Number Action steps through an inclusive range of numbers. The number to start from is indicated by the start of range action property, and the end number by end of range. For example, given the range of numbers [0..10], the first time For Each Number Action executes, the number 0 is passed to the job’s flow context for use by successive triggers and actions. If control loops back around to the For Each Number Action again, the second time this action executes, it passed the number 1 to the job’s flow context. This stepping continues with 2, 3, 4, etc until the number 10 is included.
The stepping itself can be changed. Stepping is indicated by the stepping property of a ForEachNumberAction object. The stepping defaults to 1, but if it is changed, for example, to 0.5, the generated number sequence would be 0, 0.5, 1, 1.5, etc.
The range of numbers can progress down as well. For example, given the range [10..0], the first number in the stepping is 10, followed by 9, etc. In this case, the stepping must be set to -1. Otherwise, only the number 10 would be included in the sequence before the sequence was exhausted.
Properties
Start of range
Sets the start of the range of numbers. The start of the range may be a number that is higher than the end of the range, which indicates that the sequence progresses from higher numbers to lower numbers.
End of range
Sets the end of the range of numbers. The end of the range may be a number that is lower than the start of the range, which indicates that the sequence progresses from higher numbers to lower numbers.
Expiration flow
Sets the flow to follow after this for each number action expires. This action expires when the number range has been exhaused. Delegates to setElseFlow().
Stepping
Sets the distance between successive numbers in the range.
Comments
Please sign in to leave a comment.