Skip to main content

Parallel For-Each Execution and Error Handling

This feature enhances FOR-type groups by providing configurable controls for:

  • Parallel execution of iterations
  • Error tolerance during iteration processing
  • Output ordering when results are collected

These options allow fine-grained control over how iteration-based workflows behave under load and when failures occur.


Error Tolerance

Error tolerance determines how iteration failures affect the execution of the remaining iterations.

Continue on Error

When enabled, the group continues executing remaining iterations even if some iterations fail.

Behavior

  • Iteration failures are recorded.
  • Remaining iterations continue to run.
  • Execution stops only if the configured error threshold is exceeded.

Use cases

  • Processing large batches where some failures are acceptable.
  • Data pipelines where individual record failures should not stop the entire workflow.

Maximum Errors

Defines how many iteration failures are allowed before stopping execution.

Behavior

  • Execution stops when the number of errors exceeds this limit.
  • If set to 0, errors are unlimited (when Continue on Error is enabled).

Example

ConfigurationBehavior
Continue on Error = falseFirst error stops execution
Continue on Error = true, Max Errors = 3Up to 3 iterations may fail
Continue on Error = true, Max Errors = 0Unlimited failures allowed

Parallel Iteration Execution

FOR groups support running iterations in parallel to improve throughput when processing multiple items.

Parallel execution is activated when:

  • Parallel iteration is enabled
  • Parallel execution is not disabled
  • More than one item exists in the iteration list

Maximum Parallel Iterations

Defines the maximum number of iterations that may run simultaneously.

Behavior

  • Limits concurrency to prevent excessive resource usage.
  • Actual parallelism is determined by the smallest value among:
    • The number of items in the iteration list
    • The configured maximum parallel iterations
    • The system's global parallel iteration limit

Example

ItemsConfigured Parallel LimitActual Parallel Execution
1055
353

Disable Parallel Execution

Forces iterations to run sequentially, even when parallel execution is otherwise possible.

Behavior

  • Iterations execute one after another.
  • Useful when iteration steps depend on shared state or ordering.

Typical scenarios

  • Iterations update the same external resource
  • Strict processing order is required
  • Debugging workflows

Iteration Limit Protection

To prevent runaway execution or unexpected large workloads, the system validates the number of iterations before execution begins.

If the number of items exceeds the configured maximum iteration limit, execution fails immediately.

This safeguard helps protect system stability and resource consumption.


Output Collection and Ordering

When a FOR group collects output from iterations, results may arrive out of order during parallel execution.

Sort Accumulated Output

When enabled, the system sorts collected outputs to match the original iteration order.

Behavior

SettingResult Order
EnabledOutput order matches input iteration order
DisabledOutput order reflects completion time of iterations

Recommendation

Enable sorting when:

  • Output order matters
  • Results must align with the input list

Disable sorting when:

  • Order is not important
  • Slightly better performance is desired

Parallel Execution Summary

FeaturePurpose
Continue on ErrorPrevent failures from stopping all iterations
Maximum ErrorsControl acceptable failure threshold
Disable Parallel ExecutionForce sequential iteration processing
Maximum Parallel IterationsLimit concurrent iteration execution
Sort Accumulated OutputPreserve original iteration order in outputs