Workflows
Long-running stateful processes that survive restarts, time delays, and external signals.
Workflows model long-running business processes that need to survive time, restarts, and retries. They are defined as a series of steps — actions, sleeps, and signal waits — with persistent state.
Defining a Workflow
Step Types
Action Steps
Execute a registered action as part of the workflow:
Sleep Steps
Pause the workflow for a duration:
The delay can be dynamic:
Wait for Signal Steps
Pause until an external signal arrives, with an optional timeout:
Managing Workflows
Starting a Workflow
Sending Signals
Querying State
Workflow Versioning
Workflows support versioned contracts for safe schema evolution. The tooling package provides schema sync commands to manage workflow contract changes.
Durability
Workflow state is persisted in the _chimpbase_workflows table. Steps are executed transactionally — if the runtime restarts mid-workflow, it resumes from the last committed step.