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
🎯 Critical Concept
Understanding execution flow is essential for designing robust workflows that behave predictably and handle various scenarios gracefully.
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.
Copy 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
Example Workflow:
Execution Order
The most common execution pattern—nodes execute one by one.
Definition:
Configuration:
Connect them sequentially
Each outputs to next input
Execution Timeline:
Alternative Flow
Multiple independent nodes run in optimized sequence.
Definition:
Configuration:
Set multiple targets from same source
Ensure nodes are independent
Execution Timeline:
Conditional Flow
Branching based on conditions or data.
Definition:
Configuration:
Add If-Then or Switch node
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:
Configure true path (Yes branch)
Configure false path (No branch)
Switch Branching
Route to multiple paths based on a value.
Creating Switch Node:
Select variable to switch on
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:
Proceed to next node despite failure
Automatically retry the node
Configuration:
Automatically retry failed nodes.
Retry Configuration:
Select node prone to failure
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)
Use retry for transient failures:
Temporary service unavailability
Try-Catch Pattern
Implement error recovery.
Implementation:
Add primary node (e.g., API call)
Set error behavior to "Jump to error handler"
Define error recovery logic
Both paths merge to continue workflow
Flow Control Nodes
Pause execution for a specified duration.
Syntax:
Uses:
Configuration:
Optional: Set condition to wait until true
Conditional Wait:
Skip a node based on a condition.
Configuration:
When condition is true, node is skipped and execution continues to next node.
Terminate workflow execution.
Configuration:
Set:
Exit Status : Success, Failure, or custom
Message : Reason for stopping
Optionally set condition to only stop if needed
Data Flow Through Execution
Data flows from node to node through the execution chain.
Variables are accessible based on scope.
Scope
Accessible From
Example
Any node in this workflow
Execution Timeline
Real-Time Execution Monitoring
During workflow execution, monitor:
Current Node - Highlighted in real-time
Execution Time - Elapsed time for current node
Logs - Live logs as execution progresses
Status - Pass/Fail/Running for each node
Stop Control - Can stop execution anytime
Execution Metrics
After completion, review:
Percentage of passed nodes
Timeline Visualization
Advanced Flow Patterns
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
Keep Flows Simple
Avoid overly complex branching
Use sub-workflows for complex logic
Clear Error Handling
Define what happens on failure
Use meaningful error messages
Optimize for Performance
Use efficient execution strategies
Document Flow
Add comments explaining complex branches
Document conditions and decisions
Monitor Execution
Track execution metrics over time
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
Workflows - How workflows orchestrate execution
Next : Learn about environment configuration in Environments .