Skip to main content

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.

FieldMeaning
NameHuman-readable configuration name.
DescriptionOptional administrative context.
EnabledWhether the configuration can be selected for new starts.
PriorityRouting priority. Lower positive values are selected first for a new subject.
Activation scopeExpression that decides whether the configuration applies to a new subject.
Definition versionsImmutable 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
OperatorConfiguration
allNon-empty list of expressions; every expression must match.
anyNon-empty list of expressions; at least one must match.
eqpath and one value.
inpath and a non-empty values list.
existsA 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 fieldRequiredMeaning
schemaYesDefinition format; currently workflow.definition/v2.
stagesYesNon-empty list of business states.
transitionsYesNon-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.

FieldRequiredMeaning
nameYesStable stage identifier referenced by transitions.
initialConditionalExactly one stage in the definition must set initial: true.
terminalNoBusiness outcome: success or failure.
metadata.labelNoHuman-readable stage label.
metadata.descriptionNoHuman-readable explanation of the stage.
metadata.iconNoPresentation 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.

FieldRequiredMeaning
idRecommendedStable unique identifier used in history.
fromYesSource stage, or null for an initial transition.
toYesTarget stage.
triggerYesSignal that starts the transition.
preconditionsNoOrdered checks that must pass.
actionsNoOrdered side effects executed as part of the transition.
whenNoExpression used to choose between eligible branches.
priorityNoNon-negative priority; lower values are considered first.
metadataNoUser-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:

FieldEvaluated againstPurpose
trigger.config.whereIncoming event payloadDecide whether the event matches the trigger.
transition.whenWorkflow runtime contextChoose 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 1 is still deployed, the first transition moves the instance to DEPLOYED_IN_PREPROD;
  • otherwise, the second transition moves it to BOOTSTRAPPED;
  • a production event with a different newStatus matches 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:

PriorityLocationMeaning
Configuration priorityConfiguration form, outside definitionYamlSelects which matching configuration starts a new instance. Lower positive numbers win.
Transition prioritytransitions[].priorityResolves 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.