Search code examples
boostboost-statechart

Ways to implement condition-based inner initial state selection in boost::statechart?


What are some possible ways in boost::statechart to implement the initial state selection described on Slide 25 of Comparison of Harel's Statecharts & UML Statecharts ?

"On entering the super-state, which state (whether X,Y,Z) to enter depends on the what the condition C evaluates to."


Solution

  • The use of a custom_reaction to implement dynamic choice points is described in the boost::statechart Rationale document. So, while this was actually an RTM, perhaps someone else starting from square one, both on UML as well as Boost Statecharts, might be helped by this answer.