diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-29 11:22:54 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-29 11:22:54 (GMT) |
commit | 1ad01fcefad64f29268e0ed6a2f0068212f37a2f (patch) | |
tree | bb8afa3856b1958f79d3252d6411eb475caee908 /apps/samples | |
parent | 944c17d31993cdf6a651f6a40ca0f7ea02100bd3 (diff) | |
download | uscxml-1ad01fcefad64f29268e0ed6a2f0068212f37a2f.zip uscxml-1ad01fcefad64f29268e0ed6a2f0068212f37a2f.tar.gz uscxml-1ad01fcefad64f29268e0ed6a2f0068212f37a2f.tar.bz2 |
Fixed miles library inclusion on linux
Diffstat (limited to 'apps/samples')
-rw-r--r-- | apps/samples/put-that-there/put-that-there.scxml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/apps/samples/put-that-there/put-that-there.scxml b/apps/samples/put-that-there/put-that-there.scxml index 43a6b37..301e34b 100644 --- a/apps/samples/put-that-there/put-that-there.scxml +++ b/apps/samples/put-that-there/put-that-there.scxml @@ -2,6 +2,11 @@ xmlns="http://www.w3.org/2005/07/scxml" xmlns:scenegraph="http://uscxml.tk.informatik.tu-darmstadt.de/scenegraph.xsd"> <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" /> + + <datamodel> + <data id="foo">This is foo!</data> + </datamodel> + <state id="start"> <invoke type="scenegraph"> <content> @@ -27,8 +32,10 @@ </content> </invoke> <state id="main"> + <transition event="http" target="main" type="internal" - cond="_event.data.pathComponent[1] === 'basichttp' && _event.data.pathComponent[2] === 'query'" > + cond="_event.data.path Component[1] === 'basichttp' && + _event.data.pathComponent[2] === 'query'" > <!-- a request for /ptt/basichttp/query --> <script>dump(_event);</script> <if cond="_event.data.header['X-XPath']"> @@ -41,6 +48,11 @@ _event.reply = "No nodes!"; } </script> + <elseif cond="_event.data.header['X-ECMAPath']" /> + <script> + // an ecmascript expression evaluate and set reply on event + _event.reply = eval(_event.data.header['X-ECMAPath']); + </script> </if> <send type="basichttp" targetexpr="_event.data.header['X-Reply-To']"> <content expr="_event.reply" /> @@ -61,6 +73,11 @@ _event.reply = "No nodes!"; } </script> + <elseif cond="_event.data.header['X-ECMAPath']" /> + <script> + // an ecmascript expression evaluate and set reply on event + _event.reply = eval(_event.data.header['X-ECMAPath']); + </script> </if> <respond to="_event.origin"> <content expr="_event.reply" /> |