<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>helma.org/wiki/Continuations</title>
<pubDate>Mon, 08 Sep 2008 16:46:17 +0200</pubDate>
<description>Updates for Page helma.org/wiki/Continuations</description>
<link>http://dev.helma.org/wiki/Continuations/</link>
<item>
<title>Version 26</title>
<pubDate>Thu, 03 Apr 2008 23:32:09 +0200</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;65&lt;/td&gt;&lt;td&gt;As of &lt;span class=&apos;diffremoved&apos;&gt;2007&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;2008&lt;/span&gt;/02/08, serialization issues in combination with Continuations and Javascript functions in general have been fixed in Subversion, so it&apos;s no longer a problem to use continuations in combination with persistent sessions.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=26</link>
<author>hannes</author>
</item>
<item>
<title>Version 25</title>
<pubDate>Mon, 18 Feb 2008 16:17:26 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;11&lt;/td&gt;&lt;td&gt;While adding continuation and callback support to existing Helma releases has been a bit of a hack, recent Helma snapshots have added features to make that easier, namely the introduction of *req.uri|https://dev.helma.org/trac/helma/changeset/8774* and *req.&lt;span class=&apos;diffremoved&apos;&gt;actionProcessor&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;actionHandler&lt;/span&gt;|https://dev.helma.org/trac/helma/changeset/&lt;span class=&apos;diffremoved&apos;&gt;8775&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;8792&lt;/span&gt;*. &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=25</link>
<author>hannes</author>
</item>
<item>
<title>Version 24</title>
<pubDate>Fri, 08 Feb 2008 17:03:16 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;65&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffremoved&apos;&gt;An area that still needs work is serialization support&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;As of 2007/02/08&lt;/span&gt;, &lt;span class=&apos;diffremoved&apos;&gt;as continuations currently will not work &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;serialization issues &lt;/span&gt;in &lt;span class=&apos;diffremoved&apos;&gt;conjunction &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;combination &lt;/span&gt;with &lt;span class=&apos;diffremoved&apos;&gt;persistent sessions. Persistent HopObjects shouldn&apos;t be included in a serialized continuation, so we need to convert Nodes into NodeHandles in the output stream, &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;Continuations &lt;/span&gt;and &lt;span class=&apos;diffremoved&apos;&gt;convert back to Nodes &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;Javascript functions &lt;/span&gt;in &lt;span class=&apos;diffremoved&apos;&gt;the input stream. The latter currently fails &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;general have been fixed &lt;/span&gt;in &lt;span class=&apos;diffremoved&apos;&gt;session restore because it requires a Transactor thread.&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;Subversion,&lt;/span&gt;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;For global references we need to make sure they&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;so it&lt;/span&gt;&apos;&lt;span class=&apos;diffremoved&apos;&gt;re excluded from serialization. Helma 1.7 seems like &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;s no longer &lt;/span&gt;a &lt;span class=&apos;diffremoved&apos;&gt;good timeframe &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;problem &lt;/span&gt;to &lt;span class=&apos;diffremoved&apos;&gt;fix these issues&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;use continuations in combination with persistent sessions&lt;/span&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=24</link>
<author>hannes</author>
</item>
<item>
<title>Version 23</title>
<pubDate>Tue, 05 Feb 2008 17:49:18 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;41&lt;/td&gt;&lt;td&gt;This action displays three pages: the first renders a form, the second a link, and the third will show a message containing the string entered in the first page. Remember that for &lt;span class=&apos;diffremoved&apos;&gt;continuatino &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;continuation &lt;/span&gt;support to work, you must call Continuation.resume() in onRequest():&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=23</link>
<author>hannes</author>
</item>
<item>
<title>Version 22</title>
<pubDate>Tue, 05 Feb 2008 17:45:10 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;22&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;23&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;And although continuations work best with POST forms and ordinary links, if you must use GET forms, there also is:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;24&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=22</link>
<author>hannes</author>
</item>
<item>
<title>Version 21</title>
<pubDate>Tue, 05 Feb 2008 17:41:01 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;38&lt;/td&gt;&lt;td&gt;This action displays three pages: the first renders a form, the second a link, and the third will show a message containing the string entered in the first page. &lt;span class=&apos;diffadded&apos;&gt;Remember that for continuatino support to work, you must call Continuation.resume() in onRequest():&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;40&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; function onRequest() {&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;41&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; Continuation.resume();&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;42&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;43&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=21</link>
<author>hannes</author>
</item>
<item>
<title>Version 20</title>
<pubDate>Tue, 05 Feb 2008 17:29:49 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;22&lt;/td&gt;&lt;td&gt;* Continuation.nextId() - returns the ID for the next contiuation for &lt;span class=&apos;diffremoved&apos;&gt;cases &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;GET forms &lt;/span&gt;where it isn&apos;t possible to use Continuation.nextUrl() and the continuation_id has to be set via hidden input &lt;span class=&apos;diffremoved&apos;&gt;field (GET requests)&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;field&lt;/span&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=20</link>
<author>hannes</author>
</item>
<item>
<title>Version 19</title>
<pubDate>Tue, 05 Feb 2008 17:24:13 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;17&lt;/td&gt;&lt;td&gt;This adds &lt;span class=&apos;diffremoved&apos;&gt;four &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;the following &lt;/span&gt;static methods to the Continuation constructor:&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;19&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffremoved&apos;&gt;* Continuation.nextId() - returns the ID for the next contiuation for cases where it isn&apos;t possible to use Continuation.nextUrl() and the continuation_id has to be set via hidden input field (GET requests).&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;23&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;* Continuation.nextId() - returns the ID for the next contiuation for cases where it isn&apos;t possible to use Continuation.nextUrl() and the continuation_id has to be set via hidden input field (GET requests).&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=19</link>
<author>hannes</author>
</item>
<item>
<title>Version 18</title>
<pubDate>Tue, 05 Feb 2008 17:23:15 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;19&lt;/td&gt;&lt;td&gt;* Continuation.nextId() - returns the ID for the next contiuation for cases where it isn&apos;t possible to use Continuation.nextUrl() &lt;span class=&apos;diffadded&apos;&gt;and the continuation_id has to be set via hidden input field &lt;/span&gt;(&lt;span class=&apos;diffremoved&apos;&gt;namely &lt;/span&gt;GET requests&lt;span class=&apos;diffremoved&apos;&gt;, as Continuation.nextUrl()&lt;/span&gt;).&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;20&lt;/td&gt;&lt;td&gt;* Continuation.nextUrl() - returns the URL to the next continuation of the currently running action to be used in HTML &lt;span class=&apos;diffadded&apos;&gt;POST &lt;/span&gt;forms and links. Note that the continuation doesn&apos;t exist yet until Continuation.nextPage() is called.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=18</link>
<author>hannes</author>
</item>
<item>
<title>Version 17</title>
<pubDate>Tue, 05 Feb 2008 17:21:48 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;17&lt;/td&gt;&lt;td&gt;This adds &lt;span class=&apos;diffremoved&apos;&gt;three &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;four &lt;/span&gt;static methods to the Continuation constructor:&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;19&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;* Continuation.nextId() - returns the ID for the next contiuation for cases where it isn&apos;t possible to use Continuation.nextUrl() (namely GET requests, as Continuation.nextUrl()).&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=17</link>
<author>hannes</author>
</item>
<item>
<title>Version 16</title>
<pubDate>Tue, 05 Feb 2008 17:18:15 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;50&lt;/td&gt;&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; res.debug(&amp;quot;&lt;span class=&apos;diffremoved&apos;&gt;continuation &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;Continuation &lt;/span&gt;invalid or expired. &lt;span class=&apos;diffremoved&apos;&gt;starting &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;Starting &lt;/span&gt;over.&amp;quot;);&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;52&lt;/td&gt;&lt;td&gt;&amp;nbsp; &amp;nbsp; // &lt;span class=&apos;diffremoved&apos;&gt;...&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;Continue rendering first page&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=16</link>
<author>hannes</author>
</item>
<item>
<title>Version 15</title>
<pubDate>Tue, 05 Feb 2008 17:17:32 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;47&lt;/td&gt;&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Request has a continuation_id, but we landed at the &lt;span class=&apos;diffadded&apos;&gt;beginning&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;50&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;/&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;res.debug(&lt;/span&gt;&lt;span class=&apos;diffremoved&apos;&gt;/&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;quot;continuation invalid or expired.&lt;/span&gt;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;Do what needs to be done&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;starting over&lt;/span&gt;.&lt;span class=&apos;diffadded&apos;&gt;&amp;quot;);&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;54&lt;/td&gt;&lt;td&gt;&amp;nbsp; &amp;nbsp; // From &lt;span class=&apos;diffremoved&apos;&gt;now &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;here &lt;/span&gt;on, req.data.continuation_id is expected to be set&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=15</link>
<author>hannes</author>
</item>
<item>
<title>Version 14</title>
<pubDate>Tue, 05 Feb 2008 17:05:01 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;7&lt;/td&gt;&lt;td&gt;Rhino continuations only work in interpreter mode with the compiler disabled, &lt;span class=&apos;diffremoved&apos;&gt;i.e. with optlevel -1&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;so make sure that you have the following in your app&lt;/span&gt;.&lt;span class=&apos;diffadded&apos;&gt;properties:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;9&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; rhino.optlevel = -1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;10&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=14</link>
<author>hannes</author>
</item>
<item>
<title>Version 13</title>
<pubDate>Tue, 05 Feb 2008 16:55:58 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;41&lt;/td&gt;&lt;td&gt;This has the great benefit that trying to run a non-existing continuation (either because the link has been passed outside the originating session, or because the session has expired, or because the client does not support cookies) will actually result in the right &lt;span class=&apos;diffremoved&apos;&gt;page &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;action &lt;/span&gt;being invoked - it will simply result in the action to be started from the beginning. So in order to detect all these cases, it is sufficient to test for a &amp;lt;code&amp;gt;continuation_id&amp;lt;/code&amp;gt; parameter at the very beginning of the action:&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=13</link>
<author>hannes</author>
</item>
<item>
<title>Version 12</title>
<pubDate>Tue, 05 Feb 2008 16:31:59 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;17&lt;/td&gt;&lt;td&gt;* Continuation.nextUrl() - &lt;span class=&apos;diffremoved&apos;&gt;This &lt;/span&gt;returns the URL to the next continuation of the currently running action to be used in HTML forms and links. Note that the continuation doesn&apos;t exist yet until Continuation.nextPage() is called.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;18&lt;/td&gt;&lt;td&gt;* Continuation.nextPage() - &lt;span class=&apos;diffremoved&apos;&gt;This actually &lt;/span&gt;suspends execution and stores the suspended action in the user&apos;s session.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;19&lt;/td&gt;&lt;td&gt;* Continuation.resume() - &lt;span class=&apos;diffremoved&apos;&gt;This &lt;/span&gt;must be called in the onRequest() method of the current object in order to allow the continuation to be resumed.&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=12</link>
<author>hannes</author>
</item>
<item>
<title>Version 11</title>
<pubDate>Tue, 05 Feb 2008 16:29:59 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;24&lt;/td&gt;&lt;td&gt;&amp;nbsp; &amp;nbsp; res.write(&amp;lt;form method=&amp;quot;post&amp;quot; action={&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp;&lt;/span&gt;Continuation.nextUrl()&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp;&lt;/span&gt;}&amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=11</link>
<author>hannes</author>
</item>
<item>
<title>Version 10</title>
<pubDate>Tue, 05 Feb 2008 16:28:49 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;41&lt;/td&gt;&lt;td&gt;This has the great benefit that trying to run a non-existing continuation (either because the link has been passed outside the originating session, or because the session has expired, or because the client does not support cookies) will actually result in the right page being invoked - it will simply result in the action to be started from the beginning. So in order to detect all these cases, it is sufficient to test for a &amp;lt;code&amp;gt;continuation_id&amp;lt;/code&amp;gt; parameter at the &lt;span class=&apos;diffadded&apos;&gt;very &lt;/span&gt;beginning of the action:&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=10</link>
<author>hannes</author>
</item>
<item>
<title>Version 9</title>
<pubDate>Tue, 05 Feb 2008 16:28:02 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;17&lt;/td&gt;&lt;td&gt;* Continuation.nextUrl() - This returns the URL to the next continuation of the currently running &lt;span class=&apos;diffremoved&apos;&gt;action. The URL can &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;action to &lt;/span&gt;be used in HTML forms and links.&lt;span class=&apos;diffadded&apos;&gt; Note that the continuation doesn&apos;t exist yet until Continuation.nextPage() is called.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;37&lt;/td&gt;&lt;td&gt;When running the example, you will notice that the continuations have the same URI path as the original action, just with a &amp;lt;code&amp;gt;continuation_id&amp;lt;/code&amp;gt; query parameter added&lt;span class=&apos;diffremoved&apos;&gt;. This has the great benefit that trying to run a non-existing continuation (either because the link has been passed outside the originating session, or because the session has expired, or because the client does not support cookies) will actually result in the right page being invoked - it will simply result in the action to be started from the beginning. So in order to detect all these cases, it is sufficient to test for a &amp;lt;code&amp;gt;continuation_id&amp;lt;/code&amp;gt; parameter at the beginning of the action&lt;/span&gt;:&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;39&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; /test.continuation?continuation_id=at5fgn5zz18g&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;40&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;41&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;This has the great benefit that trying to run a non-existing continuation (either because the link has been passed outside the originating session, or because the session has expired, or because the client does not support cookies) will actually result in the right page being invoked - it will simply result in the action to be started from the beginning. So in order to detect all these cases, it is sufficient to test for a &amp;lt;code&amp;gt;continuation_id&amp;lt;/code&amp;gt; parameter at the beginning of the action:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;42&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=9</link>
<author>hannes</author>
</item>
<item>
<title>Version 8</title>
<pubDate>Tue, 05 Feb 2008 16:25:18 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;43&lt;/td&gt;&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // or the link comes from another session. &lt;span class=&apos;diffremoved&apos;&gt;Do what needs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;44&lt;/td&gt;&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // &lt;span class=&apos;diffadded&apos;&gt;Do what needs &lt;/span&gt;to be done.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=8</link>
<author>hannes</author>
</item>
<item>
<title>Version 7</title>
<pubDate>Tue, 05 Feb 2008 16:24:50 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;39&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;function continuation_action() {&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;40&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;if (req.data.continuation_id) {&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;41&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;// Request has a continuation_id, but we landed at the &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;42&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;// beginning of the action. Either the session timed out, &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;43&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;// or the link comes from another session. Do what needs&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;44&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;// to be done.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;45&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;46&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ...&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;47&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Continuation.nextPage();&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;48&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffremoved&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // From now on, req.data.continuation_id is expected to be set&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;41&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; // ...&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;42&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; Continuation.nextPage();&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;43&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; // From now on, req.data.continuation_id is expected to be set&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;44&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=7</link>
<author>hannes</author>
</item>
<item>
<title>Version 6</title>
<pubDate>Tue, 05 Feb 2008 16:23:58 +0100</pubDate>
<description>&lt;div class=&apos;diffbody&apos;&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;11&lt;/td&gt;&lt;td&gt;The following &lt;span class=&apos;diffremoved&apos;&gt;framework makes use of these features &lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;script is a first prototype for adding Continuation support &lt;/span&gt;to &lt;span class=&apos;diffremoved&apos;&gt;allow storing suspended functions in &lt;/span&gt;the &lt;span class=&apos;diffremoved&apos;&gt;user&apos;s session object and resuming them at a later time:&lt;/span&gt;&lt;span class=&apos;diffadded&apos;&gt;Helma 1.7 web framework. &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;15&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;This adds three static methods to the Continuation constructor:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;16&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;17&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;* Continuation.nextUrl() - This returns the URL to the next continuation of the currently running action. The URL can be used in HTML forms and links.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;18&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;* Continuation.nextPage() - This actually suspends execution and stores the suspended action in the user&apos;s session.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;19&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;* Continuation.resume() - This must be called in the onRequest() method of the current object in order to allow the continuation to be resumed.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;20&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;30&lt;/td&gt;&lt;td&gt;This action displays three pages: the first renders a form, the second a link, and the third will show a message containing the string entered in the first page.&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;31&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;32&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;When running the example, you will notice that the continuations have the same URI path as the original action, just with a &amp;lt;code&amp;gt;continuation_id&amp;lt;/code&amp;gt; query parameter added. This has the great benefit that trying to run a non-existing continuation (either because the link has been passed outside the originating session, or because the session has expired, or because the client does not support cookies) will actually result in the right page being invoked - it will simply result in the action to be started from the beginning. So in order to detect all these cases, it is sufficient to test for a &amp;lt;code&amp;gt;continuation_id&amp;lt;/code&amp;gt; parameter at the beginning of the action:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;33&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;34&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; function continuation_action() {&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;35&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (req.data.continuation_id) {&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;36&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Request has a continuation_id, but we landed at the &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;37&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // beginning of the action. Either the session timed out, &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;38&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // or the link comes from another session. Do what needs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;39&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // to be done.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;40&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;41&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ...&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;42&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Continuation.nextPage();&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;43&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // From now on, req.data.continuation_id is expected to be set&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;width:2em; color:#999;&quot;&gt;44&lt;/td&gt;&lt;td&gt;&lt;span class=&apos;diffadded&apos;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description>
<link>http://dev.helma.org/wiki/Continuations/history.diff?v=6</link>
<author>hannes</author>
</item>
</channel>
</rss>
