Skip to content

Eventless transition inside compound state triggers infinite loop #1592

Answered by davidkpiano
rlaffers asked this question in Q&A
Discussion options

You must be logged in to vote

As long as you're still in a compound state that has an always transition, that transition will always be checked, regardless of internal or external transitions, I'm pretty sure. Will have to double-check with the SCXML spec on this, but this is the behavior that makes sense. In the SCXML algorithm:

procedure mainEventLoop():
    while running:
        enabledTransitions = null
        macrostepDone = false
        # Here we handle eventless transitions and transitions 
        # triggered by internal events until macrostep is complete
        while running and not macrostepDone:
            enabledTransitions = selectEventlessTransitions()
            if enabledTransitions.isEmpty():
  …

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@rlaffers
Comment options

@davidkpiano
Comment options

Answer selected by rlaffers
Comment options

You must be logged in to vote
2 replies
@karfau
Comment options

@rlaffers
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants