diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-10 22:47:14 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-10 22:47:14 (GMT) |
commit | 6f56474450b7c54f2c95b5dea6a7a42623141649 (patch) | |
tree | 420c52085d8cf778360c09baf9722b21d01259da /test/samples/uscxml/test-mmi-mc.scxml | |
parent | a154682fc1b25581742d38dd5fe9aa06ede167b7 (diff) | |
download | uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.zip uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.tar.gz uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.tar.bz2 |
W3C MMI Architecture framework
Diffstat (limited to 'test/samples/uscxml/test-mmi-mc.scxml')
-rw-r--r-- | test/samples/uscxml/test-mmi-mc.scxml | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/test/samples/uscxml/test-mmi-mc.scxml b/test/samples/uscxml/test-mmi-mc.scxml new file mode 100644 index 0000000..e2197ff --- /dev/null +++ b/test/samples/uscxml/test-mmi-mc.scxml @@ -0,0 +1,83 @@ +<scxml datamodel="ecmascript" name="sample-mc"> + <!-- + This is a sample implementation for a modality component in the W3C MMI Architecture using SCXML. + We enter an idle state and wait for StartRequests from an IM. + --> + <state id="idle"> + <onentry> + <log expr="'Entering idle state'" /> + </onentry> + <transition event="mmi.prepare.request" target="idle"> + <log expr="'Received PrepareRequest'" /> + <send type="mmihttp"> + <mmi:PrepareResponse + mmi:SourceExpr="_ioprocessors['mmihttp'].location" + mmi:TargetExpr="_event.data.getElementsByTagName('PrepareRequest')[0].getAttribute('Source')" + mmi:ContextExpr="_event.data.getElementsByTagName('PrepareRequest')[0].getAttribute('Context')" + mmi:RequestIDExpr="_event.data.getElementsByTagName('PrepareRequest')[0].getAttribute('RequestID')" + mmi:Status="success"/> + </transition> + + <transition event="mmi.start.request" target="running"> + <log expr="'Received StartRequest'" /> + </transition> + + <transition event="mmi.clearcontext.request" target="terminate"> + <log expr="'Received ClearContextRequest'" /> + </transition> + </state> + + <state id="paused"> + <onentry> + <log expr="'Entering pause state'"> + </onentry> + + <transition event="mmi.prepare.request" target="paused"> + <log expr="'Received PrepareRequest'" /> + </transition> + + <transition event="mmi.start.request" target="running"> + <log expr="'Received StartRequest'" /> + </transition> + + <transition event="mmi.resume.request" target="running"> + <log expr="'Received ResumeRequest'" /> + </transition> + + <transition event="mmi.cancel.request" target="idle"> + <log expr="'Received CancelRequest'" /> + </transition> + + <transition event="mmi.clearcontext.request" target="terminate"> + <log expr="'Received ClearContextRequest'" /> + </transition> + </state> + + <state id="running"> + <onentry> + <log expr="'Entering running state'"> + </onentry> + + <transition event="mmi.prepare.request" target="running"> + <log expr="'Received PrepareRequest'" /> + </transition> + + <transition event="mmi.pause.request" target="paused"> + <log expr="'Received PauseRequest'" /> + </transition> + + <transition event="mmi.cancel.request" target="idle"> + <log expr="'Received CancelRequest'" /> + </transition> + + <transition event="mmi.clearcontext.request" target="terminate"> + <log expr="'Received ClearContextRequest'" /> + </transition> + </state> + + <final id="terminate"> + <onentry> + <log expr="'Entering terminate state'"> + </onentry> + </final> +</scxml>
\ No newline at end of file |