summaryrefslogtreecommitdiffstats
path: root/apps/samples
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-29 11:22:54 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-29 11:22:54 (GMT)
commit1ad01fcefad64f29268e0ed6a2f0068212f37a2f (patch)
treebb8afa3856b1958f79d3252d6411eb475caee908 /apps/samples
parent944c17d31993cdf6a651f6a40ca0f7ea02100bd3 (diff)
downloaduscxml-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.scxml19
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' &amp;&amp; _event.data.pathComponent[2] === 'query'" >
+ cond="_event.data.path Component[1] === 'basichttp' &amp;&amp;
+ _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" />