Closed jgiacobbi closed 4 years ago
Hi,
What do you try to accomplish? If you want to log then you should take a look at the state machine extensions. They provide you with much more information than the state machine events.
You can add an extension with machine.AddExtension(myExtension)
. You can derive your extension from Appccelerate.StateMachine.Extensions.ExtensionBase
(non async/await version) or Appccelerate.StateMachine.AsyncMachine.AsyncExtensionBase
(async/await version).
The events are a legacy, but NewStateId
should get you the target state. StateId
always points to the source state.
I'll look into extensions, sounds like that's what I was missing. Thank you.
Hello, it appears that the transition completed event refers to the state you transitioned from. Is this intentional? Am I misunderstanding something? These are my events:
This is a print function I added to each state to get the actual state I transitioned into:
This is the result:
Somewhat related, there doesn't appear to be a way to query the machine to get the state it's currently in. Again if I'm just wrong and someone can point me in the right direction I would really appreciate it.
It works great, it just seems a little difficult to get in flight logs about what it's doing. Thanks for your time.