Skip to main content
Version: 1.4.0

Go To

Control Flow Pipeline

Synopsis

Jumps to specific points in the processing pipeline.

Schema

- go_to:
target: <string>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>

Configuration

The following fields are used to define the processor:

FieldRequiredDefaultDescription
targetY-Tag of the target processor to jump to
descriptionN-Explanatory note
ifN-Condition to run
ignore_failureNfalseContinue processing if operation fails
ignore_missingNfalseSkip processing if referenced field doesn't exist
on_failureN-See Handling Failures
on_successN-See Handling Success
tagN-Identifier

Details

Transfers control to a specific processor identified by its tag, allowing for non-linear pipeline execution. This enables complex control flow patterns including loops, conditional branching, and jump-based logic.

The go_to processor searches for a processor with the specified tag and continues execution from that point, skipping all processors in between.

note

The target processor must have a unique tag within the pipeline. The go_to processor will jump to the first processor found with the matching tag.

This processor is useful for implementing conditional processing paths, error recovery flows, and complex business logic that requires non-sequential execution.

warning

Be careful to avoid infinite loops when using go_to processors. Ensure that your pipeline logic has proper exit conditions to prevent endless processing cycles.

Examples

Basic Jump

Jumping to a specific processor...

- set:
field: step
value: "start"
- go_to:
target: "validation_step"
- set:
field: skipped
value: true
- set:
field: step
value: "validation"
tag: "validation_step"

skips intermediate processor:

{
"step": "validation"
}

Conditional Jump

Jumping based on field conditions...

- go_to:
target: "error_handler"
if: "logEntry.error_code != null"
- set:
field: normal_processing
value: true
- set:
field: error_handled
value: true
tag: "error_handler"

jumps when error exists:

{
"error_code": "404",
"error_handled": true
}

Error Recovery Flow

Using go_to for error recovery...

- validate:
field: user_input
pattern: "^[a-zA-Z]+$"
on_failure:
- set:
field: validation_error
value: true
- go_to:
target: "cleanup"
- set:
field: processed
value: true
- set:
field: completed
value: true
tag: "cleanup"

jumps to cleanup on validation failure:

{
"user_input": "123invalid",
"validation_error": true,
"completed": true
}

Multi-Path Processing

Creating multiple processing paths...

- go_to:
target: "admin_flow"
if: "logEntry.user_role == 'admin'"
- go_to:
target: "user_flow"
if: "logEntry.user_role == 'user'"
- set:
field: user_type
value: "standard"
tag: "user_flow"
- go_to:
target: "final_step"
- set:
field: user_type
value: "administrator"
tag: "admin_flow"
- set:
field: processing_complete
value: true
tag: "final_step"

routes based on user role:

{
"user_role": "admin",
"user_type": "administrator",
"processing_complete": true
}

Loop Implementation

Creating a simple processing loop...

- set:
field: counter
value: 0
tag: "loop_start"
- math:
field: counter
operation: "add"
value: 1
- go_to:
target: "loop_start"
if: "logEntry.counter < 3"
- set:
field: loop_complete
value: true

increments counter until condition met:

{
"counter": 3,
"loop_complete": true
}