-
I have a state that should be looped in until a terminating condition is met. I would like that the repeatableState {
onEntry { /* do some important stuff repeatedly */ }
transitionConditionally<SomeEvent> {
direction = { targetState(if (anotherRound()) repeatableState else idleState) }
}
} It seems that the machine doesn't re-enter the state to call Is there a way to express this machine such that a block is called when first arriving at the state, then repeatedly if looping? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I am on vacation now, so cannot go deep into your question. But try changing transitionType argument of your transition to "external". In such case machine should reenter your state if it is already entered. If it does not help I will come back to your question later.) Happy new year! |
Beta Was this translation helpful? Give feedback.
Hi, I am on vacation now, so cannot go deep into your question. But try changing transitionType argument of your transition to "external". In such case machine should reenter your state if it is already entered. If it does not help I will come back to your question later.) Happy new year!