mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown

Home Page:https://mermaid.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot add behaviors to parent composite states

emmby opened this issue · comments

Description

You can add a UML-style behavior ("trigger [guard] / action()") to state nodes in diagrams, but you cannot add a behavior to a parent node.

stateDiagram
    Parent: Parent
    Parent: enter [guard] / action()
    [*] --> Parent
    state Parent {
        Child: Child
        Child: trigger [guard] / action()
        [*] --> Child
        Child --> [*]
    }

Steps to reproduce

See description

Screenshots

Screenshot 2024-05-14 at 6 53 05 PM

Code Sample

No response

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

Proposed documentation about adding behaviors to state machines: #5512