-
Notifications
You must be signed in to change notification settings - Fork 768
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
Is there a way to do OnEntry with parameter trigger right before updating the state #409
Comments
Thank you for those kind words, but I must point out that there are many contributors to this project. When we first added OnActivate we thought "something" would restore the state from disk / database, and then execute Activate to get the object up and ready for action. We thought that the object would have all its required information contained in the object. I can, however, see that having parameters to Activate could be an advantage. I wonder if an InternalTransition would do the trick for you? This doesn't change the state. |
Thank you for your fast reply.
The same "activation work" shall be done independently of the trigger. The workaround I found so far, is to still use If no one every requested an Thank you ! |
I think your use case is valid, but not very common 😉 I think an |
Hi @HenningTorsteinsenBouvet,
Thanks for this project, this is definitely a "must-have" for .NET applications ! I searched in the already posted questions but did not find an anwser. This is the closest match I found, but I would need the parameter trigger.
I am configuring states with OnEntry/OnExit with parameter trigger. Very much exactly as your ObjectsAsStates example.
Somehow, I am interested to perform an
OnActivate
(no state change), but with the trigger as input parameter.I would like to prevent
StateMachine.State
to be updated before I can execute some "activation work". This "activation work" is really specific to this state, but I would like to prevent other processes to think that the state is already active if I am still in the activation work.But I fully agree that the existing
OnActivate
andOnEntry
functions have the right signature and work as expected. Have you ever required to perform some activation work of a specific state, with trigger paramter as input?Thank you for you help, take care !
The text was updated successfully, but these errors were encountered: