Skip to content
Discussion options

You must be logged in to vote

Do you have any object in memory that act as the state holder?

One way to implement is to have a domain object being used as a model. A State machine don't hold any state value, it depends on a model (if no model is provided, it creates a simple one internally).

If you already have a domain model, you can either attach one state machine (maybe using as mixin, or pass the model instance when creating the state machine.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fgmacedo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants