Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple transitions on same event in parallel not working #203

Open
KannebTo opened this issue Jun 29, 2021 · 1 comment
Open

Multiple transitions on same event in parallel not working #203

KannebTo opened this issue Jun 29, 2021 · 1 comment

Comments

@KannebTo
Copy link

I found a case, where only one of two parallel transitions on the same event are executed.

SCXML:

<scxml initial="parallel">
    <parallel id="parallel">
        <state id="s1" initial="s11">
            <state id="s11">
                <transition event="e" target="s12"></transition>
            </state>
            <state id="s12"></state>
        </state>
        <state id="s2">
            <state id="wrapper_state">
                <transition event="x" target="s23"></transition>
                <state id="s21">
                    <transition event="e" target="s22"></transition>
                </state>
                <state id="s22"></state>
            </state>
            <state id="s23"></state>
        </state>
    </parallel>
</scxml>

1624952219

Initial configuration:

['parallel', 's1', 's11', 's2', 'wrapper_state', 's21']

Configuration after event e:

['parallel', 's1', 's12', 's2', 'wrapper_state', 's21']

s11 transitions to s12 but sadly s21 stays.
I need to trigger event e a second time to make the transition to s22.

But when I delete the transition on event x in the SCXML, it is working fine.

@alexzhornyak
Copy link
Contributor

This is a very good catch because I found additional issue in your example which is related to issue #176

1. Event 'e' is accepted only to 's1' and 'done.state.p1' is generated when only 's1' reached final configuration

issue_with_done_state3

2. 'done.state.p1' is generated when only 's1' reached final configuration

issue_with_done_state

I made 3 tests which cover issues #176, #203

  1. testIssue176_DoneStateParallelNotBeforeFinal.scxml
  2. testIssue176_DoneStateParallelNotBeforeFinal2.scxml
  3. testIssue203_MultipleTransitionsOnSameEvent.scxml

alexzhornyak added a commit to alexzhornyak/uscxml that referenced this issue Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants