timeoutPop

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

Create an automatic pop transition when currentState is startState and when guard is true. The transition will target targetMap and targetState

Parameters

startState

The transition will apply to the specific state.

targetState

The state after the transition

targetMap

The map 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