Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

State Machine UI adds an admin interface to the State Machine module. You configure workflow groups, workflows, states and transitions from the admin pages instead of editing YAML files.

It also includes a custom field widget that handles per-transition permissions, conditional field visibility and a transition history table, plus a Mermaid diagram on each workflow edit page.

Features

  • Build workflow groups, workflows, states and transitions through the UI
  • Two metadata schemas (one for states, one for transitions) to tag elements with typed key/value pairs, validated on save
  • Filter states or transitions by their metadata, using AND or OR logic
  • Custom "State (rules)" field widget:
    • Per-transition permission check. A transition is hidden if the user lacks the matching permission.
    • Conditional fields: show, hide or mark a field as required depending on the target state
    • Transition comment, with three modes: none, optional, required
    • Transition history table, backed by content entity revisions
    • Configurable empty option, label source and select wording
  • Mermaid state diagram on every workflow edit page
  • French translation included (.po)

Use this module when:

  • non-developers need to configure workflows directly on the site
  • the same entity needs different visible or required fields depending on its state
  • editors need a clear audit trail of who moved an entity from state A to state B
  • stakeholders want to see the workflow visually instead of reading YAML

Post-Installation

When the module is enabled, any State Machine workflow already declared in YAML is imported as a config entity, along with its group and transitions. Only the basic structure is copied over (label, states, transitions with their from/to mapping). State and transition metadata are not part of the YAML format and can be added afterwards from the UI. Entries that already exist as config entities are skipped, so enabling the module on a site that mixes YAML and UI-managed workflows is safe. The original YAML files keep priority until they are removed, so the UI-managed versions only take effect once the YAML files are deleted.

  1. Enable the module.
  2. Go to Configuration, Workflow, State Machine (/admin/config/workflow/state-machine).
  3. Create a Workflow group (groups workflows by domain, for example "Editorial" or "Order").
  4. Create a Workflow inside the group, then add states and transitions.
  5. Optional: create Metadata schemas to tag your states or transitions with typed key/value pairs.
  6. On your content type, add a State field pointing to your workflow.
  7. Set the form widget to State (rules) and configure its options (history, permissions, conditional fields).

No extra step is required. The workflow is immediately available to any state_machine-aware field.

Additional Requirements

  • State Machine 1.14 or newer
  • Drupal 11.1 or newer
  • PHP 8.3 or newer
  • Diff: improves how the transition history table renders when revisions also carry field changes.

Similar projects

  • Content Moderation (core): built-in, but limited to content entities and tied to the Workflows core module. No per-transition permission UI, no conditional fields, no field widget customization.

Supporting this Module

Issues and merge requests are welcome on the project page.

Activity

Total releases
1
First release
Jun 2026
Latest release
14 hours ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Jun 14, 2026