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 Stateless to manage a state machine with predefined states and transitions, and I would like to make my state machine work by targeting specific states rather than by triggering transitions by name. My goal is to simplify the usage so that, if I specify a target state (e.g., GoToState("Approved")), the state machine would check if a valid transition exists to that state from the current state. If the transition is valid, it would perform it; if not, it would block it.
To clarify, I want to:
Specify the target state directly instead of calling Fire() with a trigger name.
Check for a valid transition path from the current state to the target state before making the transition.
Is there a way to implement or extend Stateless to support this kind of "state-based" transition approach, rather than using trigger names?
The text was updated successfully, but these errors were encountered:
Hello,
I'm using Stateless to manage a state machine with predefined states and transitions, and I would like to make my state machine work by targeting specific states rather than by triggering transitions by name. My goal is to simplify the usage so that, if I specify a target state (e.g., GoToState("Approved")), the state machine would check if a valid transition exists to that state from the current state. If the transition is valid, it would perform it; if not, it would block it.
To clarify, I want to:
Specify the target state directly instead of calling Fire() with a trigger name.
Check for a valid transition path from the current state to the target state before making the transition.
Is there a way to implement or extend Stateless to support this kind of "state-based" transition approach, rather than using trigger names?
The text was updated successfully, but these errors were encountered: