Solprovider Lenya Kongregate Registration for Free Flash Games and Chat with solprovider

Flow Setup

The next page contains much more detail.

Normal Continuation

For Flow called from the normal process
FILE: formname/template.xml
<ft:form-template action="#{$continuation/id}.more" method="POST">

FILE: publication-sitemap.xmap
<map:match pattern="**/*.more">
<map:call continuation="{2}"/>
</map:match>


The Form uses an unique extension. The XMAP sees that extension and passes control to the saved place in the JavaScript.

Usecase Continuation

When using Flow in a Usecase, Lenya needs to know where to continue. It would default to publication-sitemap.xmap. But if you put the "map:call continuation" in publication-sitemap.xmap, then the return pipelines must exist in that sitemap. The return pipelines should be kept in the Usecase, so Lenya must know to pass control to the Usecase. The bad answer is to add:
<map:match pattern="**/*.MoreUsecase">
<map:mount uri-prefix="" src="usecase-myUsecase.xmap" check-reload="yes" />
</map:match>

to publication-sitemap.xmap. While this passes control to the Usecase, the Usecase is now dependent on outside code.

The better answer is to change the form to pass directly to the usecase:
FILE: formname_template.xml
<ft:form-template action="#{$continuation/id}.more?lenya.usecase=myUsecase" method="POST">

This loads the correct usecase without looking at publication-sitemap.xmap. All the XMAP code for the usecase is in the usecase, making maintenance much easier.

<< DefinitionFlow Process >>

Contact Solprovider
Paul Ercolino