test307.txml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="UTF-8"?><scxml xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel=""
  2. xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" binding="late">
  3. <!-- with binding=late, in s0 we access a variable that isn't created until we get to s1. Then in s1
  4. we access a non-existent substructure of a variable. We use log tags to report the values that both operations
  5. yield, and whether there are errors. This is a manual test, since the tester must report whether the output
  6. is the same in the two cases -->
  7. <state id="s0">
  8. <onentry>
  9. <log label="entering s0 value of Var 1 is: " conf:varExpr="1"/>
  10. <raise event="foo"/>
  11. </onentry>
  12. <transition event="error" target="s1">
  13. <log label="error in state s0" conf:expr="_event"/>
  14. </transition>
  15. <transition event="foo" target="s1">
  16. <log label="no error in s0" conf:expr=""/>
  17. </transition>
  18. </state>
  19. <state id="s1">
  20. <datamodel>
  21. <data conf:id="1" conf:expr="1"/>
  22. </datamodel>
  23. <onentry>
  24. <log label="entering s1, value of non-existent substructure of Var 1 is: " conf:varNonexistentStruct="1"/>
  25. <raise event="bar"/>
  26. </onentry>
  27. <transition event="error" target="final">
  28. <log label="error in state s1" conf:expr="_event"/>
  29. </transition>
  30. <transition event="bar" target="final">
  31. <log label="No error in s1" conf:expr=""/>
  32. </transition>
  33. </state>
  34. <final id="final"/>
  35. </scxml>