Open
Description
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
{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
, andexit
inside state timeline 🤔. Also separateactivity
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. Maybeactivity
should be separated as a different lifeline