Execution Runtime

The runtime system responsible for executing Blueprint workflows.

The execution runtime is responsible for running Blueprint workflows.

It provides deterministic, observable execution across connected systems.

The runtime operates asynchronously and ensures that each workflow run is fully recorded.


Runtime Components

The execution system consists of several components.

API Layer

The API layer receives workflow triggers.

Examples include:

• user actions
• scheduled jobs
• system events

The API layer performs authentication and creates a BlueprintRun record.


Worker Runtime

The worker runtime executes workflows.

Workers process jobs from a queue and execute steps sequentially.

Responsibilities include:

• executing workflow steps
• updating run state
• persisting step outputs

Workers operate without HTTP request context.


Job Queue

The runtime uses a job queue to manage execution.

Typical configuration:

• Redis job broker
• ARQ worker runtime

This allows workflows to execute asynchronously and scale horizontally.


Database Ledger

All workflow state is persisted in the database.

Records include:

BlueprintRun
StepRun
execution metadata

Frequent commits ensure that workflow progress is observable.


Execution Lifecycle

Every workflow run follows the same sequence.

Trigger

A workflow is triggered by a user action or scheduled event.

Preflight

The runtime creates BlueprintRun and StepRun records.

Execution

The worker processes steps sequentially.

Completion

The run is marked as:

SUCCEEDED
FAILED
CANCELLED


Step Execution Loop

Each step follows the same execution loop.

  1. mark step RUNNING
  2. execute verb
  3. persist result
  4. mark step SUCCEEDED

If a step fails, the workflow stops immediately.


Suspension

Some workflows require human approval.

When a step returns a suspension signal:

• the workflow pauses
• state is persisted
• execution resumes later

This allows governance checks before critical actions.


Cancellation

Workflows can be cancelled while running.

When cancellation occurs:

• remaining steps are skipped
• the run is marked CANCELLED

External system changes are not automatically rolled back.


Runtime Guarantees

The execution runtime guarantees:

• deterministic workflow order
• persistent execution state
• explicit failure handling
• observable system behavior

These guarantees allow complex enterprise workflows to run safely across multiple systems.


---