mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
71.05k stars 6.39k forks source link

Define entry and exist actions for states in a state diagram #2899

Open bitbonk opened 2 years ago

bitbonk commented 2 years ago

Is there a way to define an entry action and/or an exit action in state machine, as described here?

If not, can I add some arbitrary text to the content of a state?

knsv commented 2 years ago

We have no specific function for that. Good idea though, putting this also into the backlog.

serranomorante commented 1 year ago

This would be really nice, please!

serranomorante commented 1 year ago

Current workaround

stateDiagram-v2
    LocalOrderSearchDone : LocalOrderSearchDone
    LocalOrderSearchDone : entry / decide_next_execution()
    LocalOrderSearchDone --> CheckingLocalData: NextStep [ order_found_locally() ]
serranomorante commented 1 year ago

Current workaround

Not working on composite states...