sccd.xml 763 B

123456789101112131415161718192021222324
  1. <?xml version="1.1" ?>
  2. <diagram author="Sam Pieters" name="ScriptTransitionTest">
  3. <description>
  4. Check if a script works by updating parameters when transitioning.
  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 after="1" target=".">
  15. <script>
  16. self.value += 1
  17. </script>
  18. </transition>
  19. <transition target="../state2" cond="self.value == 2"/>
  20. </state>
  21. <state id="state2" />
  22. </scxml>
  23. </class>
  24. </diagram>