German English

ForEachLoop
ForEachLoop

Loop that is run through each element of a collection.

Classification

Library Core
Art CompoundNode
Exceptions
Categories Loops, Core Activities, Sequencer, Activities

Description

The OTX ForEachLoop activity contains a sequence of activities for all elements of a List or Map be executed repeatedly. It is used to iterate through collections, and thereby obtain the desired information. It should not be used to modify the contents of the collection, so unpredictable side effects can be avoided.

The Listing is represented by an expression, see Property Collection, Calculated at the beginning of the loop. Then go through the loop for each element of the collection. can on the current element of the collection by the Locator-variable be accessed. It contains a List the corresponding Index and for a Map each Key.

Is the collection of type List, The iterations in the given Order . Through The loop starts with the first element (index = 0) and ends with the last element. For collections the type map, the order is undetermined.

The Locator-variable is valid inside and outside the loop. After the last iteration, it contains the index or key of the last element of the collection.

The loop is about the activitiesBreak,Return orThrow be terminated. TheContinueActivity stops the current iteration and continue with the next iteration, without leaving the loop.

Properties

Listed below are all properties of the activity are listed.
NameTypeArtMInRDescription
NameStringValueInName of Activity title
DescriptionStringValueInDescription (specification) of the activity
EnabledBooleanValueInActivity is enabled or not
LocatorVariableI / OLocator variable of the loop type Integer at a library or String at a map, see Collection Properties.
CollectionTermInCollection of type List or Map, Which is iterated through in the loop
Legend: No Type = Indeterminate type, see description; M = Property is required (mandatory); In = Verkettbares Element; R = Datenrichtung I = In, O = Out, I/O = In/Out; italic: Standardeigenschaften

See also

  • Created
    17. January 2011
  • Version
    37
  • Amended
    14. February 2011
  • Hits
    945