How it looks like? (maybe)
entry |> State1 |> exit
state State2 {
State21 >< activity
initial -> State21
State21 -> State22 @ Event
}
initial -> State1
State1 -> State2 @ Event[guard] |> action
State2 -> State1 @ Reset |> action
From 👆 to 👇

{signal: [
{name: 'execution', wave: '03524.02350', data: ['entry', 'exit', 'action', 'activity', 'action', 'entry', 'exit']},
{name: 'trigger', wave: '0..=0.==0..', data: ['Event [<i>guard</i>]', 'Event', 'Reset']},
{name: 'State1', wave: '01.x...1..0'},
['State2',
{name: 'State21', wave: '0x.1..x...0'},
{name: 'State22', wave: '0x....1x..0'},
],
],
config: { hscale: 3 }
}
Paste 👆 to https://wavedrom.com/editor.html
I think I should move action, entry, and exit inside state timeline 🤔. Also separate activity to different lifeline, especially when in the compound state.
However, for easier implementation, it should lay flat. Imagine having an action that executed many times, how long the data will be 😅
Something needs to watch out!
- waveform doesn't automatically fit the diagram with the texts
- probably there will be a need for sorting (I hope not because I use
wave: 0.x..0) if I want to support Arrows Splines
activity inside Compound State could be tricky to visualize. Maybe activity should be separated as a different lifeline
References
Related issues
Viewers
Other approachs
- transpile into LLHD then visualize using gtkwave or alike
- generate VCD file
How it looks like? (maybe)
From 👆 to 👇

Paste 👆 to https://wavedrom.com/editor.html
Something needs to watch out!
wave: 0.x..0) if I want to support Arrows Splinesactivityinside Compound State could be tricky to visualize. Maybeactivityshould be separated as a different lifelineReferences
Related issues
Viewers
Other approachs