test570.txml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?xml version="1.0"?>
  2. <!-- test that we generate done.state.id when all a parallel state's children are in final states -->
  3. <scxml initial="p0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  4. <datamodel>
  5. <data conf:id="1" conf:expr="0"/>
  6. </datamodel>
  7. <parallel id="p0">
  8. <onentry>
  9. <send event="timeout" delay="2s"/>
  10. <raise event="e1"/>
  11. <raise event="e2"/>
  12. </onentry>
  13. <!-- record that we get the first done event -->
  14. <transition event="done.state.p0s1">
  15. <assign conf:location="1" conf:expr="1"/>
  16. </transition>
  17. <!-- we should get the second done event before done.state.p0 -->
  18. <transition event="done.state.p0s2" target="s1"/>
  19. <transition event="timeout" conf:targetfail=""/>
  20. <state id="p0s1" initial="p0s11">
  21. <state id="p0s11">
  22. <transition event="e1" target="p0s1final"/>
  23. </state>
  24. <final id="p0s1final"/>
  25. </state>
  26. <state id="p0s2" initial="p0s21">
  27. <state id="p0s21">
  28. <transition event="e2" target="p0s2final"/>
  29. </state>
  30. <final id="p0s2final"/>
  31. </state>
  32. </parallel>
  33. <state id="s1">
  34. <!-- if we get done.state.p0, success -->
  35. <transition event="done.state.p0" conf:idVal="1=1" conf:targetpass=""/>
  36. <transition event="*" conf:targetfail=""/>
  37. </state>
  38. <conf:pass/>
  39. <conf:fail/>
  40. </scxml>