test187.txml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0"?>
  2. <!-- we test that delayed <send> is not sent if the sending session terminates. In this case,
  3. a subscript is invoked which sends the event childToParent delayed by 1 second, and then terminates. The
  4. parent session, should not receive childToParent. If it does, we fail. Otherwise the
  5. 10 sec timer expires and we pass -->
  6. <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">
  7. <state id="s0" >
  8. <onentry>
  9. <send event="timeout" conf:delay="1"/>
  10. </onentry>
  11. <invoke type="scxml" >
  12. <content>
  13. <!-- exit before the delayed send can execute -->
  14. <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  15. <state id="sub0">
  16. <onentry>
  17. <send event="childToParent" target="#_parent" conf:delay=".5"/>
  18. </onentry>
  19. <transition target="subFinal"/>
  20. </state>
  21. <final id="subFinal"/>
  22. </scxml>
  23. </content>
  24. </invoke>
  25. <transition event="childToParent" conf:targetfail=""/>
  26. <transition event="timeout" conf:targetpass=""/>
  27. </state>
  28. <conf:pass/>
  29. <conf:fail/>
  30. </scxml>