Concepts & architecture

This page explains the core concepts behind Quarkus Flow and how they relate to the CNCF Workflow Specification and the Quarkus runtime.

Core concepts

Workflows

  • A workflow describes a unit of work: tasks, transitions, inputs and outputs.

  • In Quarkus Flow, workflows are defined using the CNCF Workflow Java DSL and exposed as CDI beans.

Flow classes

  • A Flow is a CDI bean that provides a descriptor() method returning a Workflow.

  • At build time, Quarkus Flow discovers all Flow beans and generates compiled workflow definitions.

Workflow definitions and instances

  • A workflow definition is the compiled representation used at runtime.

  • A workflow instance is a running execution of that definition with its own data (context) and lifecycle (created, running, completed, failed).

Lifecycle

Build time

  • Quarkus scans for Flow beans or YAML definitions.

  • For each one, it compiles the Java/YAML DSL into a WorkflowDefinition.

  • The definitions are registered for injection and use at runtime.

Runtime

  • Your application code starts instances from injected Flows or definitions.

  • The engine executes tasks, transitions, and event waits.

  • Results and errors are exposed through a simple API (as(…​), etc.).

Integration points

HTTP and OpenAPI

Messaging and events

Agentic workflows

Where to go next