-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directed entry to specific sub-state of nested machine #587
Comments
What you need is an arrow from State 1 -> Composite. If the desired initial state is Sub2 and it makes sense, then make that the initial state. State 1 -> Composite, region 1 kicks off its initial state, region 2 -> Sub1 |
Thank you, appreciate the reply and I see how my grabbing of that particular picture caused confusion. I only used that picture to show a directed transition example. My system is more complex, with a default initial state in Composite that is different from the one I want a particular upper state and event to transition into. |
Then what you need is a Sub0 state which auto transitions to Sub1 or Sub2 as you desire. |
@ekigwana thank you again. My I may be able to refactor my |
Expected Behavior
I am looking to implement a directed transition into a nested submachine state, roughly matching the following diagram
from this boost document:
I have tried to go directly to a substate in a nested state like the following (using the state names of the above picture):
state<State1> + event<GoToCompositeS2> = state<Composite::Sub2>
but that action does not trigger the
on_entry<_>
piece of the largerComposite
state machine, so feels like I am breaking something and should be cautious.Is there a recommended way to do this using SML? Thank you.
The text was updated successfully, but these errors were encountered: