Replies: 1 comment 3 replies
-
Hi Robin 👋 Thanks for using The To implement this feature, I'd suggest adding Are you willing to implement this feature? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
Firstly - thanks for a great gem! :)
I'm using it to model a fairly complex system containing multiple inter-operating entities each with their own state machines that transition in response to message events.
My goals are to use this modelling exercise to:
Reason about any invalid/redundant state scenarios (the cerebral process of modelling in itself helps me get a better grasp of which entities need to be considered as a part of the system and which don't etc)
Use the state transition logs + additional logging as the basis for auto-generating API specifications for functions that the entities implement (quite literally a parse, infer and generate type thing)
What I seem to be missing is context in the transition logs about which FiniteMachine instance's states are being transitioned through. As an example, if I create 2 FiniteMachine instances and arrange for suitable events to be triggered for both of them, what emerges in the transition logs is 'trace' that doesn't identify which FiniteMachine instance is involved.
Eg:
The first 2 events are in the context of different FiniteMachine instances and what I seek is an identifier to also be emitted in the logs.
I note that there is an unused namespace variable here:
finite_machine/lib/finite_machine/state_machine.rb
Line 35 in 8b1e421
Perhaps that could be the basis for what I need ?
My problem is that I am a Ruby n00b so wasn't sure what would be the best way to do this.
Would be grateful for any advice.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions