summaryrefslogtreecommitdiffstats
path: root/test/w3c/lua/test173.scxml
blob: c9044385e3eee4f33badd1d372114217bbe5d63c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version="1.0" standalone="no"?>
<!-- we test that targetexpr uses the current value of var1, not its initial value
(If it uses the initial value, it will generate an error.  If it uses the current value, event1 will be raised  -->
<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="s0" version="1.0" datamodel="lua">
  <datamodel>
    <data expr="-1" id="testvar1"/>
  </datamodel>
  <state id="s0">
    <onentry>
      <assign expr="'#_internal'" location="testvar1"/>
      <send event="event1" targetexpr="testvar1"/>
    </onentry>
    <transition event="event1" target="pass"/>
    <transition event="*" target="fail"/>
  </state>
  <final id="pass"/>
  <final id="fail"/>
</scxml>