Continue
Synopsis
Skips the remaining processors for the current item in a foreach loop and immediately proceeds to the next item, similar to continue in programming languages.
Schema
- continue:
description: <text>
if: <script>
ignore_failure: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if operation fails |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
The continue processor skips to the next iteration when used inside a foreach processor. It behaves like a continue statement in programming languages, allowing you to skip processing for certain items while continuing with the rest of the collection.
Behavior:
- Inside a foreach processor: Skips remaining processors for the current item and moves to the next item
- Outside a foreach context: Acts as an early exit from the current processing scope
The processor executes any on_success handlers before continuing to the next iteration, allowing for logging or metrics collection.
continue skips to the next iteration within a loop, while return exits the entire block. Use continue for selective item processing and return for complete exit logic.
The continue processor is most valuable inside foreach loops where you need to filter or skip certain items without affecting the processing of other items in the collection.
Examples
Skip Items in Foreach Loop
Processing only specific items in a collection... | |
skips ignored items, processes others: | |
Conditional Item Processing
Skipping items based on validation... | |
processes only transactions over threshold: | |
Error Recovery in Loop
Continuing on item-level errors... | |
continues processing other users on enrichment failure: | |
Filter and Transform Collection
Selectively transforming items... | |
applies security processing only to relevant events: | |