-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Problem
In large state machines, multiple transitions often lead to the same state (e.g., A → B, C → B, D → B).
Currently, only transitions can define actions. However, some actions are related to entering or exiting a state.
With the current implementation, any entry- or exit-related logic must be duplicated across every transition that leads into or out of that state. This results in code duplication and a greater chance of inconsistency.
Solution
Extend the state machine so that states can define on_entry and on_exit actions.
These actions are executed automatically whenever the state is entered or exited, regardless of which transition triggered the change. This eliminates duplication and provides a clearer, more maintainable design.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers