You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the StateMachine library to handle state transitions, but I want to streamline the process by transitioning directly to a target state instead of firing an event name. Ideally, I would specify a target state (e.g., GoToState("Approved")), and the state machine would check if there’s a valid transition path from the current state to that target state. If the transition is allowed, it should proceed; if not, it should prevent the transition.
To summarize, I'm looking to:
Specify a target state directly instead of firing an event.
Have the state machine validate if a transition to the target state exists before moving.
Is there a way to configure StateMachine to support this state-based approach rather than relying on event names?
Thank you for any help!
The text was updated successfully, but these errors were encountered:
I don't know any way to achieve this in a simple way. It's against the principles that are at the design of this state machine: states are only known to the state machine, the outside can only observe the effects of transitions.
Hello,
I'm using the StateMachine library to handle state transitions, but I want to streamline the process by transitioning directly to a target state instead of firing an event name. Ideally, I would specify a target state (e.g., GoToState("Approved")), and the state machine would check if there’s a valid transition path from the current state to that target state. If the transition is allowed, it should proceed; if not, it should prevent the transition.
To summarize, I'm looking to:
Specify a target state directly instead of firing an event.
Have the state machine validate if a transition to the target state exists before moving.
Is there a way to configure StateMachine to support this state-based approach rather than relying on event names?
Thank you for any help!
The text was updated successfully, but these errors were encountered: