Workflows

Workflows are in Preview. APIs and behavior may change without notice, and it is not intended for production use.

This reference covers every primitive, configuration option, and pattern available in the Axon Workflow Engine.

New to the engine? Start with the Getting Started tutorial first.

Steps

  • Execute Steps: Run actions synchronously (awaitExecute) or asynchronously (execute)

  • Waiting for Events: Suspend until external events arrive (awaitEvent, waitForEvent, sleep)

  • Publishing Events: Publish a business event as a durable step (awaitPublish, publish); how workflows talk to each other

  • Understanding Steps: Cross-cutting concerns: timeouts, payload reducers, error handling, event naming, execution semantics

Workflow lifecycle

Orchestration

Patterns

  • Common Patterns: Fan-out/fan-in, saga, scatter-gather, human-in-the-loop, circuit breaker, sub-workflows through published events

Data & configuration

  • Payload & State: Reading, setting, and managing durable workflow state

  • Configuration: Declarative setup, workflow modules, metadata propagation, custom contexts

Testing

Code evolution

  • Workflow Versioning: ctx.migrateVersion(changeId, n) for safe evolution of in-flight workflows