diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-04-22 14:02:03 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-04-22 14:02:03 (GMT) |
commit | 1fb6bcf30f954e426f2d3002d14887574fb941dd (patch) | |
tree | 08cff7f2b879c50efe79e3c04d255075522af862 /test/w3c/ecma/test513.scxml | |
parent | 71c334bf4e35559496feac3f3cf00b72ceb88812 (diff) | |
download | uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.zip uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.tar.gz uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.tar.bz2 |
Major refactoring
- Moved tests
- Changes to promela datamodel
- Implemented Trie
Diffstat (limited to 'test/w3c/ecma/test513.scxml')
-rw-r--r-- | test/w3c/ecma/test513.scxml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/w3c/ecma/test513.scxml b/test/w3c/ecma/test513.scxml new file mode 100644 index 0000000..c26d498 --- /dev/null +++ b/test/w3c/ecma/test513.scxml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- test that we get an HTTP success code back on successful delivery. To run this test, implementations +must support an extension to send: if the parameter httpResponse is present with value 'true', then when +the processor gets an http response code back, it must raise an event 'http.n1.nrest' where 'ni' is +the first digit of the response code and 'nrest' are the remaining digits--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0"> + +<state id="s0" initial="s01"> + <datamodel> + <data id="Var1"/> + </datamodel> + + <onentry> + <send event="timeout" delay="30s"/> + </onentry> + <invoke type="http://www.w3.org/TR/scxml/"> + <content> + <!-- child script. Once we're running send childRunning to parent and include basicHTTPAccess URI --> + <scxml initial="child0" datamodel="ecmascript" version="1.0"> + <state id="child0"> + <onentry> + <send target="#_parent" event="childRunning"> + <param name="uri" expr="_ioprocessors['basichttp']['location']"/> + </send> + </onentry> + </state> + </scxml> + </content> + </invoke> + + <transition event="*" target="fail"/> + + <state id="s01"> + <!-- when we get the event from the child, extract the access uri and use + the basicHTTP event i/o processor to send it an event --> + <transition event="childRunning" target="s02"> + <assign location="Var1" expr="_event.data.uri"/> + <send event="test" targetexpr="Var1" httpResponse="true" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/> + </transition> + </state> + + <state id="s02"> + <!-- the child should send this back automatically. It does not need to take + any transition on the event --> + <transition event="HTTP.2" target="pass"/> + </state> + </state> + + <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> + <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> + +</scxml>
\ No newline at end of file |