summaryrefslogtreecommitdiffstats
path: root/test/samples/w3c/xpath/test387.scxml
blob: 7b59d237b419396d63bf1db9b37adda5c1243af1 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?xml version="1.0" encoding="UTF-8"?><!-- test that the default history state works correctly.  From initial state s3 we take a transition to s0's default
shallow history state.  That should generate "enteringS011", which takes us to s4.  In s4, we
transition to s1's default deep history state. We should end up in s122, generating "enteringS122".  Otherwise failure.--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s3" version="1.0" datamodel="xpath">

       
<state id="s0" initial="s01">

  <transition event="enteringS011" target="s4"/>
  <transition event="*" target="fail"/>
  
  <history type="shallow" id="s0HistShallow">
    <transition target="s01"/>
    </history>
  <history type="deep" id="s0HistDeep">
    <transition target="s022"/>
    </history>
  <state id="s01" initial="s011">
    <state id="s011">
       <onentry>
         <raise event="enteringS011"/>
         </onentry>
    </state>
    <state id="s012">
      <onentry>
       <raise event="enteringS012"/>
        </onentry>
    </state>
  </state>
 <state id="s02" initial="s021">
     <state id="s021">
       <onentry>
         <raise event="enteringS021"/>
         </onentry>
    </state>
    <state id="s022">
      <onentry>
       <raise event="enteringS022"/>
        </onentry>
    </state>
  </state>
 
</state>

<state id="s1" initial="s11">
 
  <transition event="enteringS122" target="pass"/>
  <transition event="*" target="fail"/>
  
  <history type="shallow" id="s1HistShallow">
    <transition target="s11"/>
    </history>
  <history type="deep" id="s1HistDeep">
    <transition target="s122"/>
    </history>
  <state id="s11" initial="s111">
    <state id="s111">
       <onentry>
         <raise event="enteringS111"/>
         </onentry>
    </state>
    <state id="s112">
      <onentry>
       <raise event="enteringS112"/>
        </onentry>
    </state>
  </state>
 <state id="s12" initial="s121">
     <state id="s121">
       <onentry>
         <raise event="enteringS121"/>
         </onentry>
    </state>
    <state id="s122">
      <onentry>
       <raise event="enteringS122"/>
        </onentry>
    </state>
  </state>
 
</state>


<state id="s3">
  <onentry>
    <send event="timeout" delay="1s"/>
   </onentry>
  <transition target="s0HistShallow"/>
</state>

<state id="s4">
  <transition target="s1HistDeep"/>
</state>
 
<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>

</scxml>