-
Notifications
You must be signed in to change notification settings - Fork 966
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
Force a state without lifecycle events #132
Comments
I had the same problem and didn't find a solution. |
Yes, I am using a similar workaround, thanks G. |
I found "hackly" solution: const stateMachine = new OrderDeliveryStateMachine()
stateMachine._fsm.state = order.deliveryStatus |
Looking for the same thing too...will try this solution. Although because its something you shouldn't typically do, I thinks solution is ok. |
@dolgarev thanks man! |
Hi,
I am using the module to run a fsm in a serverless environment.
After the fsm reach a state the system saves the session (the current state) and then exits.
When the fsm is actviated again, it retrieve the previous state, creates a new fsm and enter that old state
(with 'goto').
My problem is that onEnter is called twice, I would like to force the fsm to the old state when the session is restored without calling any lifecyle methods, a sort of 'goto' without side effects.
Regards.
G.
The text was updated successfully, but these errors were encountered: