Skip to content

Conversation

@vasdal
Copy link

@vasdal vasdal commented Apr 1, 2025

Problem:

  • Any state does not work if there is a nested state machine within a state machine with any state, as demonstrated in the failing test any_state_nested.

Solution:

  • Modified the get_state_mapping specialization for nested state machines to consider both direct state transitions and any state transitions.
  • The implementation now tries direct transitions first, and if those don't handle the event, it falls back to any state transitions.
  • This ensures consistent behavior between regular states and nested state machines when using the any state.

Issue: #622

Reviewers:
@kris-jusiak

@kris-jusiak kris-jusiak merged commit cd3ef80 into boost-ext:master Apr 1, 2025
5 checks passed
@kris-jusiak
Copy link
Collaborator

Nice, thanks @vasdal 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants