Skip to main content

Loop Collection

Synopsis

This operator iterates over a collection of objects. It is a nested operator and its subprocess executes once for each object of the given collection.

Description

Objects can be grouped into a collection using the Collect operator. In the Process View, collections are indicated by double lines. The Loop Collection operator loops over its subprocess once for every object in the input collection. The output of this operator is also a collection, any additional results of the subprocess can also be delivered through its output ports (as collections). If theunfoldparameter is set to true then the output will be the union of all elements of the input collections.

Collections can be useful when you want to apply the same operations on a number of objects. The Collect operator will allow you to collect the required objects into a single collection, the Loop Collection operator will allow you to iterate over all collections and finally you can separate the input objects from collection by individually selecting the required element by using the Select operator.

Input

collection

This input port expects a collection. It is the output of the Collect operator in the attached Example Process.

Output

output

This operator can have multiple outputs. When one output is connected, anotheroutputport becomes available which is ready to deliver another output (if any). The order of outputs remains the same. The object supplied at the firstoutputport of the subprocess of the Loop Collection operator is delivered through the first output port of this operator. The objects are delivered as collections.

Parameters

Set iteration macro

This parameter specifies if a macro should be defined for the loop. The macro value will increment after every iteration. The name and start value of the macro can be specified by themacro nameandmacro start valueparameters respectively.

Macro name

This parameter is only available when theset iteration macroparameter is set to true. This parameter specifies the name of the macro.

Macro start value

This parameter is only available when theset iteration macroparameter is set to true. This parameter specifies the starting value of the macro. The value of the macro increments after every iteration of the loop.

Unfold

This parameter specifies whether collections received at the input ports should be unfolded. If theunfoldparameter is set to true then the output will be the union of all elements of the input collections.