Investigate workflow modules

Changed

Context

In order to get a handle on how to architect tasks, I need to find out how well these modules fit:

I think picking between workflow and state machine is a big aspect of this.

Questions

What's the difference between core Workflows and contrib View Workflow on Drupal.orgWorkflowCovered by the Drupal security advisory policy (2,865 installs) modules?

https://www.webwash.net/build-content-workflows-in-drupal/

TODO

Create a prototype of the task system with the various modules and report what the options and limitations are.

Results

Field States Transitions

Define states/transitions with yaml, visualize with mermaid.js.

Has transition guards, actions, workflows. (What do workflows do?)

Field widget and transition buttons.

Some wonkyness in setup, mostly understanding the yaml format.

View on Drupal.org #3410795 Doesn't support ECA Status: Closed (won't fix).

Could work, but not much module use yet.

Formatter includes transition buttons.

Issues
View on Drupal.org #3577762 Error when JS is aggregated v2.0.0/10.x Status: Closed (won't fix)
Fix is in dev branch, verify this fixes it.

Content Moderation

Default content workflow has non-task states/transitions.

Can config be used to customize workflows?

Yes, but "draft" is still required.

Very wrapped up in published status/revision.

Workflows Field

Seems similar to Field States Transitions, except based on core Workflows (but not Content Moderation type).

More users than Field State Transitions, but less recent development.

Issues
View on GitLab #3272744 Crash if the workflow have no state when field added Status: Reviewed & tested by the community
This fixed the ability to add the field, but I still got an error when trying to save one of the items.

View on GitLab #3205446 Add State switcher formatter Status: Needs work
Old issue to add transition button formatter, similar to Field States Transitions.

State Machine

Used within Commerce ecosystem.

Define workflows in YAML files.

Guards protect against disallowed transitions.

Good for rigid workflows defined in code.

Issues
View on GitLab #2979901 Buttons field formatter doesn't show the current state Status: Reviewed & tested by the community
Default formatter shows current state, but transition buttons are in another formatter which does not. MR fixes it.

State Machine UI

Configure state machine via UI.

Can be used to customize state machine config from module yaml files.

New module, needs some work.

Issues
View on Drupal.org #3608746 Errors when installing module Status: Needs review

Workflow

Older contrib module.

Customized via UI.

Seems like development effort has moved on.

Workflows Field could be a better replacement.

Related tasks