test250.txml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0"?>
  2. <!-- test that the onexit handlers run in the invoked process if it is cancelled. This has to be a
  3. manual test, since this process won't accept any events from the child process once it has been cancelled.
  4. Tester must examine log output from child process to determine success -->
  5. <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">
  6. <state id="s0">
  7. <onentry>
  8. <send event="foo"/>
  9. </onentry>
  10. <invoke type="http://www.w3.org/TR/scxml/" >
  11. <content>
  12. <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">
  13. <state id="sub0" initial="sub01">
  14. <onentry>
  15. <send event="timeout" delay="2s"/>
  16. </onentry>
  17. <transition event="timeout" target="subFinal"/>
  18. <onexit>
  19. <log conf:quoteExpr="Exiting sub0"/>
  20. </onexit>
  21. <state id="sub01">
  22. <onexit>
  23. <log conf:quoteExpr="Exiting sub01"/>
  24. </onexit>
  25. </state>
  26. </state>
  27. <final id="subFinal">
  28. <onentry>
  29. <log conf:quoteExpr="entering final state, invocation was not cancelled"/>
  30. </onentry>
  31. </final>
  32. </scxml>
  33. </content>
  34. </invoke>
  35. <!-- this transition will cause the invocation to be cancelled -->
  36. <transition event="foo" target="final"/>
  37. </state>
  38. <final id="final"/>
  39. </scxml>