on Event
fun onEvent(event: EventState<E, S>, action: SyncStateAction<C, A, R>?): DslStateMapDefaultEventHandler<S, E, C, A, R>
Defines a default transition when an on is received to a specific state.
Parameters
event
Pair representing an on and targetState for transition. Can be written as EVENT to STATE
action
The action will be performed before transition is completed
fun onEvent(event: E, action: SyncStateAction<C, A, R>?): DslStateMapDefaultEventHandler<S, E, C, A, R>
Defines a default internal transition for a specific event with no change in state.
Parameters
event
The event that triggers this transition
action
The action will be invoked for this transition