Diagram workflow states and transitions

Created on 28 April 2023, over 1 year ago
Updated 17 May 2023, over 1 year ago

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

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @swirt
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    Example:

        A -->|Edit| A
        A(Draft) -->|Review| B(In review)
        B -->|Review|B
        B -->|Approve| C(Approved)
        C -->|Publish| D(Published)
        D -->|Archive| E(Archived)
        E -->|Restore from Archive|D
        B -->|Edit| A
        D -->|Edit| A
        E -->|Edit| A
        A -->|Publish| D
        B -->|Publish| D
        D -->|Publish| D
        E -->|Publish| D
        A -->|Archive| E
        B -->|Archive| E
        C -->|Archive| E
    
    

    results in

  • πŸ‡ΊπŸ‡ΈUnited States davidmpickett

    Modeling this on the Entity Relationship Diagram, here's a series of drop downs that might power workflow diagrams:

    • Chose Workflow to diagram
      • Workflow #1
      • Workflow #2
      • Workflow #3
    • Chose starting Workflow Element
      • Workflow State
      • Workflow Transition
    • Chose starting Workflow State/Transition
      • Draft
      • In Review
      • Published
    • Chose depth

    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

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    That is great @davidmpickett thank you for the guidance.

  • Assigned to swirt
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    I am working on this now.

    • swirt β†’ committed d729734d on 1.0.x
      Issue #3357232: Add diagram workflow states and transitions
      
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    The 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.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    Closing this and will add the third display as a new issue.

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    Here is the new issue I created for the missing diagram
    https://www.drupal.org/project/content_model_documentation/issues/3360981 ✨ Diagrams: Add worklflow state entry and exit Active

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024