To perform a transition on a state machine, simply call a function with the name of the transition you specified in the machine spec
. For example:
This will perform the pay
transition and bring the state of the machine from placed
to payed
.
These transition functions
accept parameters, which will be passed to Transition Monitors for processing.
Alternatively, you can call the process()
method and specify the desired transition name.