Problem/Motivation
It can be very handy for training and auditing to have visual representation of workflows.
Ideally Mermaid could be used to show the relationship between states and transitions.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Screenshot 2023-05-07 213535.png | 15.04 KB | davidmpickett |
| #3 | Screenshot 2023-05-07 213413.png | 32.59 KB | davidmpickett |
| #2 | workflow.png | 83.22 KB | swirt |
Comments
Comment #2
swirtExample:
results in
Comment #3
davidmpickett commentedModeling this on the Entity Relationship Diagram, here's a series of drop downs that might power workflow diagrams:
Starting from the Approved workflow state might look like this:

flowchart LR
A1(Draft)
A2(Draft)
B1(In review)
B2(In review)
C1(Approved)
C2(Approved)
C3(Approved)
D1(Published)
D2(Published)
E1(Archived)
E2(Archived)
A1 ~~~ C2 ~~~ A2
B1 -->|Approve| C2 ~~~ B2
C1 ~~~ C2 ~~~ C3
D1 ~~~ C2 -->|Publish| D2
E1 ~~~ C2 -->|Archive| E2
Starting from the Edit workflow transition might look like this:

Mermaid markdown:
flowchart LR
A(Draft)
B(In review)
D(Published)
E(Archived)
A -->|Edit| A
B -->|Edit| A
D -->|Edit| A
E -->|Edit| A
Comment #4
swirtThat is great @davidmpickett thank you for the guidance.
Comment #5
swirtI am working on this now.
Comment #7
swirtThe initial take on this has merged. It will go out with 1.0.6
It is missing the diagram that shows a current state and the entry and exit points for that state. It needs some different logic from the other two variants.
Comment #8
swirtClosing this and will add the third display as a new issue.
Comment #9
swirtHere is the new issue I created for the missing diagram
https://www.drupal.org/project/content_model_documentation/issues/3360981
Comment #10
swirt