Execution Flow

Overview

Execution Flow defines how a workflow progresses through its nodes—the order of execution, decision points, and control mechanisms that determine which paths are taken during runtime.

circle-exclamation

Execution Models

Test Orchestration supports multiple execution models to handle different workflow patterns.

1. Sequential Execution

Nodes execute one after another in a defined order.

Node 1 ──(complete)──→ Node 2 ──(complete)──→ Node 3 ──(complete)──→ End
   ↓                      ↓                      ↓
 Pass                   Pass                   Pass
 5 sec                  10 sec                  8 sec
              Total Time: 23 seconds

When to Use:

  • Dependencies between steps

  • Data must flow sequentially

  • Each step requires output from previous

  • Logical sequence is important

Example Workflow:

2. Conditional Execution

Different paths execute based on conditions.

When to Use:

  • Different scenarios based on input

  • Environment-specific paths

  • Optional steps

  • Error recovery paths

Example Workflow:


Execution Order

Linear Flow

The most common execution pattern—nodes execute one by one.

Definition:

Configuration:

  1. Add nodes to workflow

  2. Connect them sequentially

  3. Each outputs to next input

Execution Timeline:

Alternative Flow

Multiple independent nodes run in optimized sequence.

Definition:

Configuration:

  1. Add multiple nodes

  2. Set multiple targets from same source

  3. Ensure nodes are independent

Execution Timeline:

Conditional Flow

Branching based on conditions or data.

Definition:

Configuration:

  1. Add If-Then or Switch node

  2. Define conditions

  3. Connect different paths

Execution Timeline:


Branching and Conditionals

If-Then Branching

Execute one of two paths based on a condition.

Condition Syntax:

Use expressions to define conditions:

Creating If-Then Node:

  1. Add If-Then node

  2. Click Edit Condition

  3. Build expression:

    • Select variable or field

    • Choose operator

    • Enter comparison value

  4. Configure true path (Yes branch)

  5. Configure false path (No branch)

  6. Save

Switch Branching

Route to multiple paths based on a value.

Creating Switch Node:

  1. Add Switch node

  2. Click Edit Expression

  3. Select variable to switch on

  4. Add cases:

    • Click Add Case

    • Enter value to match

    • Select node to execute

  5. Configure default case

  6. Save

Combining Multiple Conditions

Create complex decision logic:


Error Handling Flow

Basic Error Handling

Configure what happens when a node fails.

Error Handler Configuration

For each node, set error behavior:

Option
Behavior
Use Case

Continue

Proceed to next node despite failure

Non-critical tests

Stop

Halt entire workflow

Critical step failure

Retry

Automatically retry the node

Transient errors

Jump To

Skip to specific node

Error recovery

Custom

Run custom error handler

Complex logic

Configuration:

  1. Select node

  2. Click Execution Settings

  3. Find On Failure

  4. Choose error behavior

  5. Configure options

  6. Save

Retry Logic

Automatically retry failed nodes.

Retry Configuration:

  1. Select node prone to failure

  2. Click Execution Settings

  3. Enable Retry on Failure

  4. Set:

    • Max Attempts: 2, 3, or custom

    • Interval: Time between retries (seconds)

    • Exponential Backoff: Double wait each time

    • Retry Only On: Specific error types (optional)

  5. Save

circle-info

💡 Exponential Backoff: Increases wait time between retries to give systems time to recover.

Try-Catch Pattern

Implement error recovery.

Implementation:

  1. Add primary node (e.g., API call)

  2. Set error behavior to "Jump to error handler"

  3. Add error handler node

  4. Define error recovery logic

  5. Both paths merge to continue workflow


Flow Control Nodes

Wait Node

Pause execution for a specified duration.

Syntax:

Uses:

  • Let server process data

  • Allow email delivery

  • Stagger API requests

  • Avoid rate limiting

Configuration:

  1. Add Wait node

  2. Set duration

  3. Optional: Set condition to wait until true

  4. Save

Conditional Wait:

Skip Condition

Skip a node based on a condition.

Configuration:

  1. Select node

  2. Click Execution Settings

  3. Set Skip If condition

  4. Save

When condition is true, node is skipped and execution continues to next node.

Stop/End Node

Terminate workflow execution.

Configuration:

  1. Add Stop node

  2. Set:

    • Exit Status: Success, Failure, or custom

    • Message: Reason for stopping

  3. Optionally set condition to only stop if needed


Data Flow Through Execution

Output Chain

Data flows from node to node through the execution chain.

Variable Scope

Variables are accessible based on scope.

Scope
Accessible From
Example

Global

Any node in any workflow

${PROJECT.BASE_URL}

Workflow

Any node in this workflow

${WORKFLOW.SUITE_ID}

Node Output

Downstream nodes only

${NODE_1.user_id}

Local

Only within node

${LOCAL.temp_var}


Execution Timeline

Real-Time Execution Monitoring

During workflow execution, monitor:

  1. Current Node - Highlighted in real-time

  2. Execution Time - Elapsed time for current node

  3. Logs - Live logs as execution progresses

  4. Status - Pass/Fail/Running for each node

  5. Stop Control - Can stop execution anytime

Execution Metrics

After completion, review:

Metric
Meaning

Total Duration

Start to finish time

Node Duration

Time spent in each node

Idle Time

Time spent in Wait nodes

Success Rate

Percentage of passed nodes

Timeline Visualization


Advanced Flow Patterns

Loop Pattern

Repeat a sequence until condition is met.

Fork-Join Pattern

Sequential execution with conditional merging.

Error Recovery Pattern

Graceful error handling with fallback.


Best Practices for Execution Flow

  1. Keep Flows Simple

    • Avoid overly complex branching

    • Use sub-workflows for complex logic

  2. Clear Error Handling

    • Define what happens on failure

    • Use meaningful error messages

  3. Optimize for Performance

    • Use efficient execution strategies

    • Minimize wait times

  4. Document Flow

    • Add comments explaining complex branches

    • Document conditions and decisions

  5. Test Thoroughly

    • Test all execution paths

    • Verify error scenarios

  6. Monitor Execution

    • Review execution logs

    • Track execution metrics over time


Summary

  • Sequential flow executes nodes one after another

  • Conditional flow branches based on data or expressions

  • Error handling defines behavior on failures

  • Data flows through node outputs to downstream inputs

  • Flow control nodes manage execution pace and logic


Next: Learn about environment configuration in Environments.

Last updated