Appearance
Workflow Engine Data Schema
Overview
The Workflow Engine data schema defines how workflow orchestration entities are structured and related.
Core Concepts
The Execution Hierarchy
Work is organised in a hierarchy that enables systematic experimentation:
Study → Contains multiple Experiments → Each creates multiple Trials
Studies group related experiments under a common research goal. You might have a "Route Optimisation" study containing experiments that test different algorithms or parametres.
Experiments represent specific configurations of a workflow. They define what parametres to vary and what inputs to use.
Trials are individual execution runs within an experiment. Each trial captures complete configuration snapshots and results, enabling comparison across runs.
Configuration Precedence
Configuration flows through three layers, with later layers overriding earlier ones:
- Model Configuration (base defaults) - What the model author recommends
- Workflow Task Configuration (workflow-specific) - Adjusted for this workflow's needs
- Experiment Configuration (experiment-specific) - Varied for this specific experiment
This layering enables experiments to vary parametres without modifying the underlying workflow.
The Trial Lifecycle
Trials move through a defined lifecycle:
- PENDING → Created but not yet executed
- RUNNING → Currently executing
- COMPLETED → Finished successfully
- FAILED → Execution encountered errors
- PROMOTED → Selected as the best result
When a trial executes, its configuration is snapshotted as immutable values. This ensures reproducibility even if workflow definitions change later.
Workflow Structure
Workflows and Tasks
Workflows define the execution flow of interconnected tasks. They specify what tasks run, in what order, and how data flows between them.
Workflow Tasks represent individual computational steps. Each task:
- Executes a model, transformation, or data connection
- Accepts inputs from upstream tasks
- Produces outputs for downstream tasks
- Can be configured with parametres
Tasks connect through dependencies that establish execution order and data flow.
Task Dependencies
Dependencies between tasks serve two purposes:
Output Dependencies: Downstream task consumes upstream task's output data. Data is automatically transferred via the data abstraction layer.
Sequential Dependencies: Downstream task waits for upstream completion without data transfer. Used for execution ordering only.
Dependencies support advanced patterns including conditional execution and iterative loops.
Model Interface
The Three-Type Pattern
Every model defines three types that flow through execution:
Input + Parametres → [Model Logic] → Output
Input Types: The data your model processes (customer records, route networks, sensor readings).
Parametre Types: Configuration that controls how the model behaves (algorithm settings, thresholds, options).
Output Types: Results the model produces (predictions, optimisations, analyses).
This pattern is consistent across all models, enabling automatic data routing and validation.
Input and Output Schemas
Models declare their schema through structured field definitions:
Inputs specify what data the model accepts, including field names, types, whether fields are required, and default values.
Outputs specify what data the model produces, enabling compatibility checking with downstream tasks.
The system validates that connected tasks have compatible schemas before execution begins.
Compatibility System
The compatibility system determines which task outputs can connect to which task inputs. Connections are allowed when:
- Field names match
- Data types are compatible
- Required fields are satisfied
This prevents runtime type errors by validating workflow structure before execution.
Execution Models
Test Execution
Run a workflow directly without the full experiment lifecycle. Results are temporary and expire after a short period. Use for:
- Validating workflow logic during development
- Quick testing of changes
- Debugging task configurations
Experiment Execution
Run a workflow within the Study → Experiment → Trial structure. Configuration is snapshotted, results are persisted, and trials are available for comparison. Use for:
- Systematic parametre exploration
- Comparing different approaches
- Production deployments where reproducibility matters
Configuration Snapshots
When an experiment executes, the system:
- Resolves configuration using the three-layer precedence model
- Creates immutable snapshots of all task configurations
- Stores snapshots with the trial
This ensures trials remain reproducible even if workflow or experiment definitions change.
Execution State
Task State
Each task in a trial tracks its execution state:
- PENDING: Task not yet executed
- IN_PROGRESS: Currently executing
- SUCCESSFUL: Completed without errors
- FAILED: Execution encountered errors
- SKIPPED: Skipped due to conditional logic
Trial Outputs
For each task in each trial, the system captures:
- Raw output data from execution
- Execution logs for debugging
- Final execution state
- Performance metrics (duration, resource usage)
- Visualisation metadata for rendering results
This enables comprehensive debugging and result comparison across trials.
Advanced Capabilities
Variable Substitution
Workflows support variables that are substituted at execution time. This enables:
- Running the same workflow with different date ranges
- Parametreising thresholds across experiments
- Dynamic configuration based on runtime context
Variables are defined at the workflow level and can be overridden per experiment.
Loop Handling
Workflows support iterative patterns for algorithms that repeat until convergence. Dependencies can define:
- Maximum iteration counts
- Convergence conditions
- Behaviour when limits are reached
This enables optimisation algorithms and feedback loops.
Versioning
Both workflows and models support versioning:
- Version chains track evolution over time
- Version conflicts are detected when workflows reference outdated models
- Rollback to previous versions is supported
Deployment Configuration
Workflows can be configured for automatic execution through deployment configurations:
Scheduled Execution: Run on a recurring schedule (daily, weekly, custom cron expressions)
Event-Triggered Execution: Run when external data changes (new data arrives, threshold crossed)
One-Time Execution: Run once at a specific time
Startup Execution: Run when the system initializes
Deployments can be enabled/disabled and include custom configuration and variables.
See Also
- Data Flow - How data moves between tasks
- Workflow Execution Manager - How workflows are orchestrated
- Architecture - Overall Workflow Engine architecture
