How to implement state transition involving multiple states

176 views Asked by At

So far when dealing with simple state machines I hadn't have a situation where upon transitioning from one state to another the context needs to pass through other states. That's to say, for example there is an entity which has following states: Running, Shutdown, and Disabled, and the transition from Running to Disabled functionally goes through the Shutdown state:

Running->Shutdown->Disabled

The question is how in terms of proper state machine implementation I should do this kind of transition with more than two states involved.

Best regards

0

There are 0 answers