No you cannot have substates without one of them being the default. This is not a restriction from statecharts but rather part of the concept of state machines in general. Imagine that you transition to Action
, by definition one of the substates must also be entered and the SM must know which to enter.
If there is no logical default and you always explicitly transition to leaf states then there dosn't really need to be a default but statecharts still needs a default. You can always create a do nothing third child state that is the default. If you never transition to Active
but rather always to state_1
or state_2
directly then your dummy default state will get optimized away anyway so this is a good work around.