timeoutPush

fun timeoutPush(startState: S, targetMap: String, targetState: S, timeout: C.() -> Long, guard: StateGuard<C, A>?, action: AsyncStateAction<C, A, R>?)

Creates an automatic push transition for startState. When the currentState is startState and guard is true the targetMap and targetState will become current after executing the optional action

Parameters

startState

The transition will apply to the specific state.

targetMap

The map after the transition

targetState

The state after the transition

timeout

The length in milliseconds to wait before the timeout will occur and trigger the transition.

guard

The expression must be true to trigger the transition

action

The optional action will be invoked