summaryrefslogtreecommitdiffstats
path: root/test/w3c/namespace/test329.scxml
blob: a0202e14342837af9e2c7e716524deae72ef5c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8"?>
<!-- test that none of the system variables can be modified -->
<scxml:scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" xmlns:scxml="http://www.w3.org/2005/07/scxml" initial="s0" version="1.0" datamodel="ecmascript" name="machineName">
  <scxml:datamodel>
    <scxml:data id="Var1"/>
    <scxml:data id="Var2"/>
    <scxml:data id="Var3"/>
    <scxml:data id="Var4"/>
  </scxml:datamodel>
  <scxml:state id="s0">
    <scxml:onentry>
      <!-- get _event bound so we can use it in s1-->
      <scxml:raise event="foo"/>
      <scxml:assign location="Var1" expr="_sessionid"/>
      <scxml:assign location="_sessionid" expr="27"/>
    </scxml:onentry>
    <scxml:transition event="foo" cond="Var1==_sessionid" target="s1"/>
    <scxml:transition event="*" target="fail"/>
  </scxml:state>
  <scxml:state id="s1">
    <scxml:onentry>
      <scxml:assign location="Var2" expr="_event"/>
      <scxml:assign location="_event" expr="27"/>
    </scxml:onentry>
    <scxml:transition cond="Var2==_event" target="s2"/>
    <scxml:transition target="fail"/>
  </scxml:state>
  <scxml:state id="s2">
    <scxml:onentry>
      <scxml:assign location="Var3" expr="_name"/>
      <scxml:assign location="_name" expr="27"/>
    </scxml:onentry>
    <scxml:transition cond="Var3==_name" target="s3"/>
    <scxml:transition target="fail"/>
  </scxml:state>
  <scxml:state id="s3">
    <scxml:onentry>
      <scxml:assign location="Var4" expr="_ioprocessors"/>
      <scxml:assign location="_ioprocessors" expr="27"/>
    </scxml:onentry>
    <scxml:transition cond="Var4==_ioprocessors" target="pass"/>
    <scxml:transition target="fail"/>
  </scxml:state>
  <scxml:final id="pass">
    <scxml:onentry>
      <scxml:log label="Outcome" expr="'pass'"/>
    </scxml:onentry>
  </scxml:final>
  <scxml:final id="fail">
    <scxml:onentry>
      <scxml:log label="Outcome" expr="'fail'"/>
    </scxml:onentry>
  </scxml:final>
</scxml:scxml>