Skip to content

Stages

Stages are used with Service Catalog flows to track progress through a request fulfillment process.

Definition

yaml
stages:
  - label: Waiting for Approval
    value: waiting_for_approval
    steps:
      - approve_request
    always_show: true
  - label: Fulfillment
    value: fulfillment
    steps:
      - provision_access
      - notify_user
  - label: Completed
    value: completed
    steps:
      - close_task

Fields

FieldTypeRequiredDescription
labelstringYesDisplay name shown in the Service Catalog portal.
valuestringYesInternal value (must be unique across stages).
stepslistNoSteps that belong to this stage (by id or order number).
always_showbooleanNoWhether to always display this stage, even if not reached.

Step References

Steps in a stage can be referenced by:

  • Step ID (string) — the id field on a step definition
  • Order number (integer) — 1-based position in the depth-first step tree
yaml
steps:
  - action: lookup_record
    id: check_approval
  - action: create_task
    id: provision_access
  - action: send_email
    id: notify_user

stages:
  - label: Approval
    value: approval
    steps:
      - check_approval      # By ID (preferred)
  - label: Fulfillment
    value: fulfillment
    steps:
      - 2                   # By order number
      - 3

Using step IDs is recommended as they're stable across reordering.

Validation

The --validate command checks:

  • Each stage has a label and value
  • No duplicate value fields
  • Step references (by ID) point to valid top-level step IDs
  • Step references (by number) are >= 1