Workflow Configuration and Definition Reference
This page describes only the configuration and definition structure shared by workflow types. Each workflow type defines its own subject, activation-scope paths, events, triggers, preconditions, actions, stages, and additional constraints:
Configuration fields
A configuration controls which new subjects use one workflow definition. Configuration fields are not part of the versioned definition YAML.
| Field | Meaning |
|---|---|
| Name | Human-readable configuration name. |
| Description | Optional administrative context. |
| Enabled | Whether the configuration can be selected for new starts. |
| Priority | Routing priority. Lower positive values are selected first for a new subject. |
| Activation scope | Expression that decides whether the configuration applies to a new subject. |
| Definition versions | Immutable published snapshots of the workflow definition. |
Changing configuration routing does not move existing instances. Each instance remains pinned to the configuration version selected when it started.
Activation scope expression
Activation scope is evaluated only when selecting a configuration for a new subject. An empty scope matches every subject supported by that workflow type and is represented as:
exists:
path: subject.ref
| Operator | Configuration |
|---|---|
all | Non-empty list of expressions; every expression must match. |
any | Non-empty list of expressions; at least one must match. |
eq | path and one value. |
in | path and a non-empty values list. |
exists | A path that must be present. |
Example: route one domain
Use eq to apply a configuration only to subjects belonging to a specific
domain:
eq:
path: system.domain
value: finance
For a subject outside the finance domain, the expression evaluates to false
and the engine continues evaluating configurations with a higher priority
number.
Example: route by a descriptor value
Use a descriptor path when routing depends on a field from the project
descriptor. The environment segment is optional:
descriptor.<environmentName>.<fieldPath>reads the project descriptor for the named environment;descriptor.<fieldPath>reads the descriptor for the configured environment with the lowest numeric priority.
This example selects Systems with classification: restricted in the
production environment:
all:
- eq:
path: system.type
value: dataproduct
- eq:
path: descriptor.production.classification
value: restricted
The expression matches only when both conditions are true. Descriptor paths can reference only scalar fields supported by every System Type selected for the configuration.
The workflow type owns the available paths and the meaning of their values. See the workflow type page before writing an activation scope; a path available to one workflow type is not automatically available to another.
Definition root
Definitions use workflow.definition/v2:
schema: workflow.definition/v2
stages:
- name: READY
initial: true
- name: COMPLETED
terminal: success
transitions:
- id: complete
from: READY
to: COMPLETED
trigger:
type: <trigger-supported-by-the-workflow-type>
| Root field | Required | Meaning |
|---|---|---|
schema | Yes | Definition format; currently workflow.definition/v2. |
stages | Yes | Non-empty list of business states. |
transitions | Yes | Non-empty list of movements between stages. |
A workflow type can register additional root fields and validation rules. Those fields are documented on its workflow type page.
Stages
Each stage requires a unique name.
| Field | Required | Meaning |
|---|---|---|
name | Yes | Stable stage identifier referenced by transitions. |
initial | Conditional | Exactly one stage in the definition must set initial: true. |
terminal | No | Business outcome: success or failure. |
metadata.label | No | Human-readable stage label. |
metadata.description | No | Human-readable explanation of the stage. |
metadata.icon | No | Presentation icon, when supported by the workflow UI. |
Workflow types can require particular stages, terminal outcomes, or additional stage metadata.
Transitions
Transitions describe how an instance moves between stages.
| Field | Required | Meaning |
|---|---|---|
id | Recommended | Stable unique identifier used in history. |
from | Yes | Source stage, or null for an initial transition. |
to | Yes | Target stage. |
trigger | Yes | Signal that starts the transition. |
preconditions | No | Ordered checks that must pass. |
actions | No | Ordered side effects executed as part of the transition. |
when | No | Expression used to choose between eligible branches. |
priority | No | Non-negative priority; lower values are considered first. |
metadata | No | User-facing label and graph presentation, including show: false. |
The structure of a trigger, precondition, or action is:
type: <registered-type>
config:
<type-specific-fields>
metadata:
label: <optional-label>
Availability and config fields are owned by the workflow type. Definitions
cannot use an event or building block that the selected type does not expose.
Event where compared with transition when
For workflow types that expose event triggers, where and when answer
different questions:
| Field | Evaluated against | Purpose |
|---|---|---|
trigger.config.where | Incoming event payload | Decide whether the event matches the trigger. |
transition.when | Workflow runtime context | Choose an eligible branch after the trigger matches. |
Both use the activation-scope expression operators. The event payload is
available under payload in where; runtime paths available to when depend
on the workflow type.
For example, these System Lifecycle transitions handle an undeploy from
production. Both transitions accept only a production event whose new status is
NOT_DEPLOYED. The when expressions then inspect the current pre-production
deployment status to select the destination:
- id: production-undeployed-preprod-still-deployed
from: DEPLOYED_IN_PROD
to: DEPLOYED_IN_PREPROD
trigger:
type: EVENT
config:
eventTypes: [coordinator.system-provisioning-status-updated]
environmentPriority: 0
where:
eq:
path: payload.newStatus
value: NOT_DEPLOYED
when:
type: EXPRESSION
value:
eq:
path: deployment.priority.1.status
value: deployed
- id: production-undeployed-no-preprod-deployment
from: DEPLOYED_IN_PROD
to: BOOTSTRAPPED
trigger:
type: EVENT
config:
eventTypes: [coordinator.system-provisioning-status-updated]
environmentPriority: 0
where:
eq:
path: payload.newStatus
value: NOT_DEPLOYED
when:
type: EXPRESSION
value:
in:
path: deployment.priority.1.status
values:
- not-deployed
- partially-deployed
- provisioning
- corrupt
Given a production NOT_DEPLOYED event:
- if environment priority
1is stilldeployed, the first transition moves the instance toDEPLOYED_IN_PREPROD; - otherwise, the second transition moves it to
BOOTSTRAPPED; - a production event with a different
newStatusmatches neither transition, regardless of the current pre-production status.
The stages referenced by this fragment must be declared in the surrounding System Lifecycle definition.
Priorities
Configuration priority and transition priority are independent:
| Priority | Location | Meaning |
|---|---|---|
| Configuration priority | Configuration form, outside definitionYaml | Selects which matching configuration starts a new instance. Lower positive numbers win. |
| Transition priority | transitions[].priority | Resolves multiple eligible transitions. Lower non-negative numbers win; ties preserve YAML order. |
Some workflow types also expose an environment selector called
environmentPriority. It identifies a configured environment; it does not
order configurations or transitions. Its availability and usage are documented
by the workflow type.
Validation
Saving and publishing validates the shared YAML structure, identifiers, stage references, and transition graph. The selected workflow type then applies its own rules for subjects, context paths, events, terminal outcomes, additional fields, and building-block configuration.
Invalid drafts remain editable and never replace the published version.