test412.txml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0"?>
  2. <!-- test that executable content in the <initial> transition executes after the onentry handler on the state
  3. and before the onentry handler of the child states. Event1, event2, and event3 should occur in that order. -->
  4. <scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  5. <state id="s0" initial="s01">
  6. <onentry>
  7. <send event="timeout" delay="1s"/>
  8. </onentry>
  9. <transition event="timeout" conf:targetfail=""/>
  10. <transition event="event1" conf:targetfail=""/>
  11. <transition event="event2" conf:targetpass=""/>
  12. <state id="s01" >
  13. <onentry>
  14. <raise event="event1"/>
  15. </onentry>
  16. <initial>
  17. <transition target="s011">
  18. <raise event="event2"/>
  19. </transition>
  20. </initial>
  21. <state id="s011">
  22. <onentry>
  23. <raise event="event3"/>
  24. </onentry>
  25. <transition target="s02"/>
  26. </state>
  27. </state>
  28. <state id="s02">
  29. <transition event="event1" target="s03"/>
  30. <transition event="*" conf:targetfail=""/>
  31. </state>
  32. <state id="s03">
  33. <transition event="event2" target="s04"/>
  34. <transition event="*" conf:targetfail=""/>
  35. </state>
  36. <state id="s04">
  37. <transition event="event3" conf:targetpass=""/>
  38. <transition event="*" conf:targetfail=""/>
  39. </state>
  40. </state> <!-- end s0 -->
  41. <conf:pass/>
  42. <conf:fail/>
  43. </scxml>