Skip to content

Workflow Execution Manager ​

Overview ​

The Workflow Execution Manager (WEM) orchestrates workflow execution, managing task scheduling, state tracking, configuration, and coordination across heterogeneous models. Understanding the WEM helps you design workflows that execute efficiently and reliably.

What the WEM Does ​

The WEM handles the complexity of workflow execution so you can focus on designing effective workflows.

Task Scheduling: Determines execution order based on dependencies and priorities

State Management: Tracks task status (pending, running, successful, failed) throughout execution

Configuration: Applies parametre values and resolves configuration precedence

Data Coordination: Routes outputs to downstream task inputs automatically

Execution: Invokes models, operators, and data connections appropriately

Result Capture: Stores outputs, logs, and metadata for review and comparison

Execution Flow ​

Starting a Workflow ​

When you trigger a workflow:

  1. The WEM loads the complete workflow definition (all tasks and dependencies)
  2. If running an experiment, it creates or loads a trial and snapshots configuration
  3. Variables are merged from workflow defaults and execution-time values
  4. All tasks start in pending state
  5. Execution begins

Task Scheduling ​

The WEM analyses dependencies and identifies ready tasks:

Entry Points: Tasks with no upstream dependencies start immediately

Priority Ordering: When multiple tasks are ready, higher priority tasks run first

Parallel Execution: Independent tasks run concurrently when possible

Continuous Monitoring: As tasks complete, newly-ready tasks are identified and queued

Task Execution ​

For each task, the WEM:

  1. Resolves Configuration: Merges values from model defaults, workflow settings, and experiment overrides
  2. Applies Variables: Substitutes variable values into configuration
  3. Determines Execution Method: Based on component type (model, operator, data import, data export)
  4. Executes: Invokes the appropriate handler
  5. Captures Results: Stores outputs, logs, and performance metrics
  6. Updates State: Marks task as successful or failed

Completion ​

When all tasks finish:

  1. Final workflow state is determined (successful vs partial failures)
  2. Experiment results are stored with trial outputs
  3. Execution metadata is recorded (duration, resource usage)
  4. You're notified of completion

Key Capabilities ​

Configuration Precedence ​

Configuration flows through three layers:

  1. Model Configuration (base) - What the model author provides
  2. Workflow Task Configuration (workflow) - Adjusted for this workflow
  3. Experiment Configuration (experiment) - Varied for specific experiments

Later layers override earlier ones. This enables experiments to vary parametres without changing workflows.

Variable Substitution ​

Workflows support variables substituted at execution time:

Use cases:

  • Run the same workflow with different date ranges
  • Parametreise thresholds across experiments
  • Dynamic configuration based on context

Variables are defined at workflow level and can be overridden per experiment.

Loop Handling ​

The WEM supports iterative patterns for algorithms that repeat until convergence:

Iterative Algorithms: Tasks can execute repeatedly in loops

Convergence Logic: Defined through loop configuration on dependencies

Priority-Based Entry: Higher priority tasks become loop entry points

Data Flow: Outputs from iteration N become inputs to iteration N+1

Trial Snapshotting ​

For experiments, the WEM creates immutable snapshots:

  • Every task configuration is captured at execution time
  • Ensures reproducibility even if workflow changes later
  • Trial from three months ago can be re-executed with identical configuration

Caching ​

The WEM integrates with the caching system to avoid redundant computation:

  1. Before executing a task, checks if identical inputs were processed before
  2. If cached result exists, task is skipped
  3. If no cache, task executes and result is cached
  4. Dramatically speeds up experimentation when only part of workflow changes

Execution Modes ​

Test Execution ​

Run a workflow directly for quick validation:

Use for:

  • Testing workflow logic during development
  • Quick validation of model outputs
  • Debugging task configurations

Characteristics:

  • No trial creation
  • Results are temporary
  • Fastest way to validate changes

Experiment Execution ​

Run as part of a structured experiment:

Use for:

  • Systematic parametre exploration
  • Comparing multiple approaches
  • Production deployments
  • Anything requiring reproducibility

Characteristics:

  • Creates or loads a trial
  • Snapshots configuration
  • Stores results permanently
  • Enables comparison across runs

Scheduled Execution ​

Automate workflow execution:

Recurring Schedules: Run daily, weekly, or custom intervals

One-Time Schedules: Execute at a specific future time

Event-Triggered: Run when external data changes

Startup Execution: Run when system initializes

Failure Handling ​

Task Failures ​

When a task fails:

  • Task transitions to failed state
  • Logs and error messages are captured
  • Downstream dependent tasks are blocked
  • Independent branches continue executing

Partial Failures ​

When some tasks succeed and others fail:

  • Successful results are preserved
  • You can review partial outputs
  • Failed tasks can be individually re-run after fixing issues

Retry Logic ​

Tasks can be configured with retry policies:

  • Maximum retry attempts
  • Delays between retries
  • Exponential backoff

This handles transient failures automatically.

Performance Optimisation ​

Parallel Execution ​

The WEM executes independent tasks concurrently:

  • Tasks with no dependencies run in parallel
  • Reduces overall workflow duration
  • Maximises resource utilisation

Data Transfer Optimisation ​

The WEM selects the most efficient data transfer mode:

  • Small data: Cache-based for speed
  • Large data: File-based for reliability
  • Real-time: Direct transfer for low latency

Resource Management ​

  • Models are invoked on demand
  • Idle resources can be scaled down
  • Critical path tasks are prioritised

Best Practices ​

Workflow Design ​

Minimise Dependencies: Parallel paths execute faster than sequential ones

Use Priorities Wisely: Set higher priorities on critical path tasks

Enable Caching: Cache expensive tasks, especially early in workflows

Group Transformations: Combine related operations to reduce task count

Experimentation ​

Start Small: Test with small data before scaling to production

Snapshot Everything: Use experiment execution for important runs to ensure reproducibility

Compare Systematically: Use trials to compare approaches objectively

Production Deployment ​

Use Scheduled Execution: Automate recurring workflows

Monitor Failures: Set up alerts for task failures

Review Logs: Use captured logs to diagnose issues

Test Changes: Use test execution to validate before deploying to production

See Also ​

  • Data Flow - How data moves between tasks during execution
  • Data Schema - The Study → Experiment → Trial hierarchy
  • Architecture - Overall Workflow Engine architecture

User documentation for Optimal Reality