summaryrefslogtreecommitdiffstats
path: root/test/uscxml/test-jvoicexml.scxml
blob: 311f1c8692058bf1dffafea6d251155486a0f9b4 (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
<scxml xmlns="http://www.w3.org/2005/07/scxml" 
	     xmlns:vxml="http://www.w3.org/2001/vxml" 
	     datamodel="ecmascript">
	<script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" />
	
	<state id="start">
		<invoke type="heartbeat">
			<param name="interval" expr="'5s'" />
		</invoke>

		<state id="vxmlHello">
			<invoke type="vxml" id="vxml">
				<param name="target" expr="'http://localhost:9090/mmi'" />
				<finalize>
					<script>dump(_event);</script>
				</finalize>
				
				<content>
					<vxml:vxml version="2.1" xml:lang="en" 
						xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
						xsi:schematicLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd">
						<vxml:form id="say_hello">
							<vxml:block>
								Hello World!
								<vxml:goto next="#say_goodbye" />
							</vxml:block>
						</vxml:form>
						<vxml:form id="say_goodbye">
							<vxml:block>
								<vxml:prompt>Goodbye!</vxml:prompt>
							</vxml:block>
						</vxml:form>
					</vxml:vxml>
				</content>
			</invoke>
			
			<transition event="heartbeat" target="idle" />
		</state>
		
		<state id="idle">
			<onentry>
				<log expr="'Idling!'" />
			</onentry>
			
			<transition event="heartbeat" target="vxmlHello">
				<log expr="'Foo!'" />
			</transition>
		</state>
		
	</state>
</scxml>