Geert Bevin has a nice write-up here of Spring Web Flow’s “out-of-the-box continuations support”:
Spring Web Flow however only provides continuations in the flow declaration (can be both in XML and in Java), thus lacking what in my opinion is the single most interesting feature of continuations.
Having used Cocoon’s continuation-based Flowscript, I tend to agree with him. The real difference between Cocoon and RIFE, on one side, and Spring Web Flow on the other, is the fact that continuations are a native feature of the flow language and you can create a continuation everywhere in the code.
Rewriting Geert’s example with Cocoon, you’d get:
while (guess != answer)
{
// print the guess form and wait for a response
cocoon.sendPageAndWait(template);
// obtain the guess
guess = cocoon.request["guess"];
....
}
Not that different from the RIFE version, really. Spring’s version would look more like this.
Now, if someone would take Cocoon’s Flowscript (or Javaflow, if you don’t like Javascript) and adapt it to Spring’s Web framework, that would be interesting.


Nice new design