-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Persistence #38
Comments
Found the The constructor for the class inheriting from
returns a class Here is output from the program that follows:
|
What works better is to make a state machine factory, that uses the DSL via https://en.wikipedia.org/wiki/Factory_(object-oriented_programming) Here is output from the program that follows:
|
Reposted at stackoverflow as http://stackoverflow.com/questions/31040725/peter-murach-finite-machine-restore-persisted-state |
Pardon me for making this an issue. It's really a question.
I'm having trouble persisting the state. More specifically, I'd like to instantiate the state machine with the prior saved state.
All I've been able to find is the DSL that lets me define an initial state, or define an event that transitions to an initial state. Both require me to define the initial state at coding time.
In practice, I'm defining a "standalone" along the lines of,
What I'd like is to define the initial state in the initializer for that class, something like:
However that does not work. Should it? I get
:none
as the current state after initialization. Still reading the code.The text was updated successfully, but these errors were encountered: