StateMachine
StateMachine copied to clipboard
Is it possible to start the machine in a specific state?
I have a use case where the state machine is governing a long running process that spans over multiple device restarts (android). Is there a way I can start the machine in a specific state (different from default initial state)?
Related to https://github.com/Tinder/StateMachine/issues/7
+1: Would have been really useful to have this capability.
Instead of using gradle, just download the code, and introduce the following method in StateMachine class: fun setState(state: STATE) { stateRef.set(state) }
Instead of using gradle, just download the code, and introduce [a state setter]
Maybe altering the constructor would be more appropriate?