sccd.xml 799 B

12345678910111213141516171819202122232425
  1. <?xml version="1.1" ?>
  2. <diagram author="Sam Pieters" name="ScriptExitTest">
  3. <description>
  4. Check if a script works by updating parameters in the exit of a state.
  5. </description>
  6. <class name="MainApp" default="true">
  7. <constructor>
  8. <body>
  9. self.value = 0
  10. </body>
  11. </constructor>
  12. <scxml initial="state1">
  13. <state id="state1">
  14. <transition target="." cond="self.value &lt; 5" />
  15. <transition target="../state2" cond="self.value == 5"/>
  16. <onexit>
  17. <script>
  18. self.value += 1
  19. </script>
  20. </onexit>
  21. </state>
  22. <state id="state2" />
  23. </scxml>
  24. </class>
  25. </diagram>