Transition(source, dest, conditions=None, before=None, after=None)¶
Each transition contains a source and a destination state. Furthermore, conditions for transitioning and callbacks before and after transitioning can be specified.
source : str
The source state.
dest : str
The destination state.
conditions : list[callable]
The transition is only executed once the condition(s) have been met.
before : callable
Callback function to be called before exiting the source state.
after : callable
Callback function to be called after entering the destination state.
Execute the transition.