Parallel For Each

Runs the body for every item in a collection, several items at a time.

Behaviour

Built-in workflow activity · type id velophex.parallelforeach

Properties#

Input#

Item name#

ItemName · String · Required · Default: item

Name of the item variable available in the body; each iteration has its own.

Item type#

ItemType · Type · Required · Default: Object

The type of each item in the collection.

Values#

Values · IEnumerable · Required · Default: Not specified

The expression producing the items.

Options#

Max degree of parallelism#

MaxDegreeOfParallelism · Int32 · Optional · Default: 8

How many items run at once, at least 1; the next item starts when one completes. Empty: 8.

Completion condition#

CompletionCondition · Boolean · Optional · Default: Not specified

Checked after each item completes; when True the items in flight are canceled and no more start. Empty: run every item.

How it works#

Parallel For Each runs its Body once per item as parallel branches, at most Max degree of parallelism at a time. Each iteration has its own item value and its own variables. Unbounded parallelism is not offered, because every iteration in flight is in the checkpoint. Completion and cancellation follow the same rules as Parallel.

Properties

Input

Options

How it works