-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
send durin parallel is broken in scxml0.9, dont fire events on send i…
…n parallel
- Loading branch information
Showing
4 changed files
with
193 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
bonsai_scxml_engine/src/test/resources/state_machines/parallelBugged.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="init"> | ||
<datamodel> | ||
<data id="#_STATE_PREFIX" expr="'de.unibi.citec.clf.bonsai.skills.'"/> | ||
<data id="condition1" expr="false"/> | ||
<data id="condition2" expr="false"/> | ||
<data id="condition3" expr="false"/> | ||
</datamodel> | ||
|
||
<state id="init" initial="Nop#init"> | ||
<state id="Nop#init"> | ||
<transition event="Nop.fatal" target="Parallel"/> | ||
</state> | ||
</state> | ||
|
||
<parallel id="Parallel"> | ||
<onentry> | ||
<assign name="condition1" expr="false"/> | ||
<assign name="condition2" expr="false"/> | ||
<assign name="condition3" expr="false"/> | ||
</onentry> | ||
|
||
<!-- Transitions that leave parallel have to be defined on the parallel state --> | ||
<transition event="strand.done" cond="condition1 and condition2 and condition3" target="Wait#After"/> | ||
|
||
<state id="stand1" initial="Nop"> | ||
<state id="Nop"> | ||
<transition event="Nop.fatal"> | ||
<assign name="condition1" expr="true"/> | ||
<send event="strand.done"/> | ||
</transition> | ||
</state> | ||
</state> | ||
|
||
<state id="stand2" initial="Wait"> | ||
<state id="Wait"> | ||
<datamodel> | ||
<data id="#_TIMEOUT" expr="'1000'"/> | ||
</datamodel> | ||
<transition event="Wait.*" target="Wait#dummy"> | ||
<assign name="condition2" expr="true"/> | ||
</transition> | ||
</state> | ||
|
||
<state id="Wait#dummy"> | ||
<datamodel> | ||
<data id="#_TIMEOUT" expr="'100'"/> | ||
</datamodel> | ||
<transition event="Wait.*"/> | ||
</state> | ||
</state> | ||
|
||
<state id="srand3" initial="Wait2"> | ||
<state id="Wait2"> | ||
<datamodel> | ||
<data id="#_TIMEOUT" expr="'2000'"/> | ||
</datamodel> | ||
<transition event="Wait2.success"> | ||
<assign name="condition3" expr="true"/> | ||
<send event="strand.done"/> | ||
</transition> | ||
<transition event="Wait2.fatal"/> | ||
</state> | ||
</state> | ||
|
||
|
||
</parallel> | ||
|
||
<state id="Wait#After"> | ||
<transition event="Wait.*" target="End"/> | ||
</state> | ||
|
||
<state id="Fatal" final="true"/> | ||
|
||
<state id="End" final="true"/> | ||
</scxml> |
65 changes: 65 additions & 0 deletions
65
bonsai_scxml_engine/src/test/resources/state_machines/parallelWorking.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="init"> | ||
<datamodel> | ||
<data id="#_STATE_PREFIX" expr="'de.unibi.citec.clf.bonsai.skills.'"/> | ||
<data id="condition1" expr="false"/> | ||
<data id="condition2" expr="false"/> | ||
<data id="condition3" expr="false"/> | ||
</datamodel> | ||
|
||
<state id="init" initial="Nop#init"> | ||
<state id="Nop#init"> | ||
<transition event="Nop.fatal" target="Parallel"/> | ||
</state> | ||
</state> | ||
|
||
<parallel id="Parallel"> | ||
<onentry> | ||
<assign name="condition1" expr="false"/> | ||
<assign name="condition2" expr="false"/> | ||
<assign name="condition3" expr="false"/> | ||
</onentry> | ||
|
||
<!-- Transitions that leave parallel have to be defined on the parallel state --> | ||
<transition event="strand.done" cond="condition1 and condition2 and condition3" target="Wait#After"/> | ||
|
||
<state id="Nop"> | ||
<transition event="Nop.fatal"> | ||
<assign name="condition1" expr="true"/> | ||
<send event="strand.done" delay="1000"/> | ||
</transition> | ||
|
||
</state> | ||
|
||
<state id="Wait"> | ||
<datamodel> | ||
<data id="#_TIMEOUT" expr="'1000'"/> | ||
</datamodel> | ||
<transition event="Wait.success"> | ||
<assign name="condition2" expr="true"/> | ||
<send event="strand.done" delay="1000"/> | ||
</transition> | ||
<transition event="Wait.fatal"/> | ||
</state> | ||
|
||
<state id="Wait2"> | ||
<datamodel> | ||
<data id="#_TIMEOUT" expr="'10000'"/> | ||
</datamodel> | ||
<transition event="Wait2.success"> | ||
<assign name="condition3" expr="true"/> | ||
<send event="strand.done" delay="1000"/> | ||
</transition> | ||
<transition event="Wait2.fatal"/> | ||
</state> | ||
</parallel> | ||
|
||
<state id="Wait#After"> | ||
<transition event="Wait.success" target="End"/> | ||
<transition event="Wait.fatal"/> | ||
</state> | ||
|
||
<state id="Fatal" final="true"/> | ||
|
||
<state id="End" final="true"/> | ||
</scxml> |