12345678910111213141516171819202122232425 |
- <?xml version="1.1" ?>
- <diagram author="Sam Pieters" name="ScriptExitTest">
- <description>
- Check if a script works by updating parameters in the exit of a state.
- </description>
- <class name="MainApp" default="true">
- <constructor>
- <body>
- self.value = 0
- </body>
- </constructor>
- <scxml initial="state1">
- <state id="state1">
- <transition target="." cond="self.value < 5" />
- <transition target="../state2" cond="self.value == 5"/>
- <onexit>
- <script>
- self.value += 1
- </script>
- </onexit>
- </state>
- <state id="state2" />
- </scxml>
- </class>
- </diagram>
|