StateMachine icon indicating copy to clipboard operation
StateMachine copied to clipboard

Is it possible to start the machine in a specific state?

Open SemionPar opened this issue 5 years ago • 3 comments

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

SemionPar avatar Aug 02 '19 21:08 SemionPar

+1: Would have been really useful to have this capability.

ovestoerholt avatar Aug 09 '19 09:08 ovestoerholt

Instead of using gradle, just download the code, and introduce the following method in StateMachine class: fun setState(state: STATE) { stateRef.set(state) }

RowanG1 avatar Feb 07 '20 01:02 RowanG1

Instead of using gradle, just download the code, and introduce [a state setter]

Maybe altering the constructor would be more appropriate?

dtbullock avatar Aug 27 '21 03:08 dtbullock