blob: 2544947b437eb21d2b4572a716262a1d8851617f (
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
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- test that markup specified by 'src' and by <content> is treated the same way. That means that
either we get done.invoke in both cases or in neither case (in which case we timeout) -->
<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">
<scxml:state id="s0">
<scxml:onentry>
<scxml:send event="timeout1" delay="1s"/>
</scxml:onentry>
<scxml:transition event="timeout" target="fail"/>
<scxml:invoke type="http://www.w3.org/TR/scxml/" src="file:test242sub1.scxml"/>
<scxml:transition event="done.invoke" target="s02"/>
<scxml:transition event="timeout1" target="s03"/>
</scxml:state>
<scxml:state id="s02">
<scxml:onentry>
<scxml:send event="timeout2" delay="1s"/>
</scxml:onentry>
<scxml:invoke type="http://www.w3.org/TR/scxml/">
<!-- identical to test242sub1.scxml. -->
<scxml:content>
<scxml:scxml version="1.0" initial="subFinal1" datamodel="ecmascript">
<scxml:final id="subFinal1"/>
</scxml:scxml>
</scxml:content>
</scxml:invoke>
<!-- we got done.invoke last time, so we need it this time too -->
<scxml:transition event="done.invoke" target="pass"/>
<scxml:transition event="timeout2" target="fail"/>
</scxml:state>
<scxml:state id="s03">
<scxml:onentry>
<scxml:send event="timeout3" delay="1s"/>
</scxml:onentry>
<scxml:invoke type="http://www.w3.org/TR/scxml/">
<!-- identical to test242sub1.scxml. -->
<scxml:content>
<scxml:scxml version="1.0" initial="subFinal2" datamodel="ecmascript">
<scxml:final id="subFinal2"/>
</scxml:scxml>
</scxml:content>
</scxml:invoke>
<!-- we got timeout last time, so we need it this time too -->
<scxml:transition event="timeout3" target="pass"/>
<scxml:transition event="done.invoke" 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>
|