machines: # heading for multiple machines
- name: machine_name # identifiable name for the machine
states: # heading for multiple states
- name: state1 # name of the state
entry_action: module.EntryActionClass # class name of the action code to execute on entry
do_action: module.DoActionClass # class name of the action code to execute on arrival
exit_action: module.ExitActionClass # class name of the action code to execute on exit
initial: true # true for the initial state of the machine
transitions: # heading for multiple transitions
- target: state2 # destination/target state for the transition
action: module.TransitionActionClass # class name of the action code to execute on transition
event: event1 # event that trigger the transition
- target: final
event: done
- name: state2
entry_action: module.AnotherEntryActionClass
do_action: module.AnotherDoActionClass
exit_action: module.AnotherExitActionClass
transitions:
- target: state1
action: module.AnotherTransitionActionClass
event: event1
- target: final
event: done
- name: final
do_action: module.YetAnotherDoActionClass
final: true # true for the final/terminal state(s) of the machine