(sample transition above which has multiple targets might have a slight syntax or target specification errors, but it should work something like that, I tried before :))
In SCXML:
<scxml>
<parallel id="ButtonActivity">
<state id="Button">
<state id="BtnOff">
<!-- NOTE here multiple targets states are specified separated by space -->
<transition cond="_event.data == 1" event="click" target="Button.BtnOn StateShape2"/>
</state>
<state id="BtnOn">
</state>
</state>
<state id="StateShape1"/>
<state id="StateShape2">
<transition event="on.released" target="StateShape3"/>
</state>
<state id="StateShape3">
<transition event="on.released" target="StateShape4"/>
</state>
</parallel>
</scxml>
It would be very nice to have something like this in kstatemachine.
If I'm not mistaken, this feature is currently missing from
kstatemachine
.I'll use existing statechart implementations as an example (again).
In xstate.js having this state machine:
(sample transition above which has multiple targets might have a slight syntax or target specification errors, but it should work something like that, I tried before :))
In SCXML:
It would be very nice to have something like this in
kstatemachine
.