summaryrefslogtreecommitdiffstats
path: root/test/samples/w3c/txml
diff options
context:
space:
mode:
Diffstat (limited to 'test/samples/w3c/txml')
-rw-r--r--test/samples/w3c/txml/test193.txml22
-rw-r--r--test/samples/w3c/txml/test344.txml5
-rw-r--r--test/samples/w3c/txml/test488.txml2
-rw-r--r--test/samples/w3c/txml/test509.txml21
-rw-r--r--test/samples/w3c/txml/test510.txml28
-rw-r--r--test/samples/w3c/txml/test518.txml25
-rw-r--r--test/samples/w3c/txml/test519.txml21
-rw-r--r--test/samples/w3c/txml/test520.txml21
-rw-r--r--test/samples/w3c/txml/test522.txml27
-rw-r--r--test/samples/w3c/txml/test531.txml22
-rw-r--r--test/samples/w3c/txml/test532.txml22
-rw-r--r--test/samples/w3c/txml/test534.txml20
-rw-r--r--test/samples/w3c/txml/test543.txml22
-rw-r--r--test/samples/w3c/txml/test567.txml32
-rw-r--r--test/samples/w3c/txml/test568.txml2
15 files changed, 289 insertions, 3 deletions
diff --git a/test/samples/w3c/txml/test193.txml b/test/samples/w3c/txml/test193.txml
new file mode 100644
index 0000000..ba1598b
--- /dev/null
+++ b/test/samples/w3c/txml/test193.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- we test that omitting target and targetexpr of <send> when using the
+basichttp event i/o processor puts error.communication on the internal queue. -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <!-- this should put an error in the internal queue -->
+ <send event="event1" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ <send event="fail"/>
+ </onentry>
+
+ <transition event="error.communication" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test344.txml b/test/samples/w3c/txml/test344.txml
index 8bf6270..7723f78 100644
--- a/test/samples/w3c/txml/test344.txml
+++ b/test/samples/w3c/txml/test344.txml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that a non-boolean cond expression evaluates to false and causes error.execution to be raised -->
+<!-- test that a cond expression that cannot be evaluated as a
+boolean cond expression evaluates to false and causes error.execution to be raised.
+In some languages, any valid expression/object can be converted to a boolean, so conf:nonBoolean will
+have to be mapped onto something that produces a syntax error or something similarly invalid -->
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
conf:datamodel="" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
diff --git a/test/samples/w3c/txml/test488.txml b/test/samples/w3c/txml/test488.txml
index c0bb5e4..49c338a 100644
--- a/test/samples/w3c/txml/test488.txml
+++ b/test/samples/w3c/txml/test488.txml
@@ -27,7 +27,7 @@
event has empty event.data -->
<state id="s1">
- <transition event="done.state.s0" conf:eventdataVal="" conf:targetpass=""/>
+ <transition event="done.state.s0" conf:emptyEventData="" conf:targetpass=""/>
<transition event="*" conf:targetfail=""/>
</state>
diff --git a/test/samples/w3c/txml/test509.txml b/test/samples/w3c/txml/test509.txml
new file mode 100644
index 0000000..3140456
--- /dev/null
+++ b/test/samples/w3c/txml/test509.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<!-- test that Basic HTTP Event I/O processor uses POST method and that it can receive messages
+at the accessURI -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" conf:basicHTTPAccessURITarget="" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ </onentry>
+ <!-- if the event was send by http and we get it, we succeed -->
+ <transition event="test" conf:methodIsPost="" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test510.txml b/test/samples/w3c/txml/test510.txml
new file mode 100644
index 0000000..9ffa2ea
--- /dev/null
+++ b/test/samples/w3c/txml/test510.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!-- test that Basic HTTP messages go into external queue. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" conf:basicHTTPAccessURITarget="" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ <!-- this creates an internal event -->
+ <raise event="internal"/>
+
+ </onentry>
+ <!-- we should get 'internal' first, then 'test' -->
+ <transition event="internal" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <transition event="test" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test518.txml b/test/samples/w3c/txml/test518.txml
new file mode 100644
index 0000000..b1314ee
--- /dev/null
+++ b/test/samples/w3c/txml/test518.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!-- test that that namelist values get encoded as POST parameters. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="2"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" conf:basicHTTPAccessURITarget="" conf:namelist="1"
+ type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ </onentry>
+
+ <transition event="test" conf:eventIdParamHasValue="1 2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test519.txml b/test/samples/w3c/txml/test519.txml
new file mode 100644
index 0000000..67b64cc
--- /dev/null
+++ b/test/samples/w3c/txml/test519.txml
@@ -0,0 +1,21 @@
+<!-- test that that <param> values get encoded as POST parameters. . -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" conf:basicHTTPAccessURITarget="" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <param name="param1" conf:expr="1"/>
+ </send>
+ </onentry>
+
+ <!-- if other end sends us back this event, we succeed -->
+ <transition event="test" conf:eventNamedParamHasValue="param1 1" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test520.txml b/test/samples/w3c/txml/test520.txml
new file mode 100644
index 0000000..32ada62
--- /dev/null
+++ b/test/samples/w3c/txml/test520.txml
@@ -0,0 +1,21 @@
+<!-- test that that <content> gets sent as the body of the message. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send conf:basicHTTPAccessURITarget="" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <content>this is some content</content>
+ </send>
+ </onentry>
+
+ <!-- if other end sends us back this event, we succeed -->
+ <transition event="HTTP.POST" conf:messageBodyEquals="this is some content" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test522.txml b/test/samples/w3c/txml/test522.txml
new file mode 100644
index 0000000..2d7b35d
--- /dev/null
+++ b/test/samples/w3c/txml/test522.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<!-- test that location field the entry for Basic HTTP Event I/O processor can be used
+to send a message to the processor -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"
+conf:basicHTTPAccessURITarget=""/>
+
+ </onentry>
+ <!-- the event we receive should be called 'test', but that's not actually
+ required for this test. Only that the send deliver some event to us. So if
+ we get something other than timeout or error, we call it success -->
+ <transition event="timeout" conf:targetfail=""/>
+ <transition event="error" conf:targetfail=""/>
+ <transition event="*" conf:targetpass=""/>
+
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test531.txml b/test/samples/w3c/txml/test531.txml
new file mode 100644
index 0000000..cffe7b5
--- /dev/null
+++ b/test/samples/w3c/txml/test531.txml
@@ -0,0 +1,22 @@
+<!-- test that that the value of the <param> _scxmleventname gets used as the name
+of the raised event. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ <send conf:basicHTTPAccessURITarget="" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <content>_scxmleventname=test</content>
+ </send>
+ </onentry>
+
+ <!-- if we get an event named 'test' we succeed. Otherwise fail -->
+ <transition event="test" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test532.txml b/test/samples/w3c/txml/test532.txml
new file mode 100644
index 0000000..e8de172
--- /dev/null
+++ b/test/samples/w3c/txml/test532.txml
@@ -0,0 +1,22 @@
+<!-- test that that if _scxmleventname is not present, the name of the HTTP method is used
+as the name of the resulting event. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ <send conf:basicHTTPAccessURITarget="" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <!-- this content will be ignored, but it's here to make sure we have a message body -->
+ <content>some content</content>
+ </send>
+ </onentry>
+
+ <transition event="HTTP.POST" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test534.txml b/test/samples/w3c/txml/test534.txml
new file mode 100644
index 0000000..e02123d
--- /dev/null
+++ b/test/samples/w3c/txml/test534.txml
@@ -0,0 +1,20 @@
+<!-- test that that <send> 'event' value gets sent as the param _scxmleventname . -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" conf:basicHTTPAccessURITarget="" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ </send>
+ </onentry>
+
+ <!-- if other end sends us back this event, we succeed -->
+ <transition event="test" conf:eventNamedParamHasValue="_scxmleventname test" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test543.txml b/test/samples/w3c/txml/test543.txml
new file mode 100644
index 0000000..d179749
--- /dev/null
+++ b/test/samples/w3c/txml/test543.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+ <!-- test that event fields are present as children of _event -->
+
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" name="scxmltest"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+
+
+<state id="s0">
+ <onentry>
+ <!-- event isn't bound until an event is raised -->
+ <raise event="someevent"/>
+ </onentry>
+ <!-- origintype sendid, invokeid and data will not be bound in this event. name, type, and origin
+ are guaranteed to be there. -->
+ <transition event="*" cond="$_event/name and $_event/origin and $_event/type" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test567.txml b/test/samples/w3c/txml/test567.txml
new file mode 100644
index 0000000..d15953f
--- /dev/null
+++ b/test/samples/w3c/txml/test567.txml
@@ -0,0 +1,32 @@
+<!-- test that that any content in the message other than _scxmleventname is used to populate
+_event.data. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="2"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ <!-- in this case, 'test' will be placed in _scxmleventname. The <param> should
+ be used to populate _event.data -->
+ <send event="test" conf:basicHTTPAccessURITarget="" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <param name="param1" conf:expr="2"/>
+ </send>
+ </onentry>
+
+ <!-- if we get this event, we succeed -->
+ <transition event="test" target="s1">
+ <assign conf:location="1" conf:eventDataParamValue="param1"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <transition conf:idVal="1=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+ <conf:pass/>
+ <conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test568.txml b/test/samples/w3c/txml/test568.txml
index ab00644..89efe73 100644
--- a/test/samples/w3c/txml/test568.txml
+++ b/test/samples/w3c/txml/test568.txml
@@ -8,7 +8,7 @@ send events. -->
<state id="s0">
- <transition cond="$_ioprocessors/scxml/location/text()" conf:targetpass=""/>
+ <transition cond="$_ioprocessors/[@name='http://www.w3.org/TR/scxml/#SCXMLEventProcessor']/location/text()" conf:targetpass=""/>
<transition conf:targetfail=""/>
</state>