<snip/>
Then I have a pipeline that looks like this, to actually execute the flowscript and save the output of a particular pipeline:
<map:pipeline>
<map:match pattern="saveFile.html">
<map:call function="saveToFile"/>
<map:select type="request-attribute">
<map:parameter name="attribute-name" value="centralPrint.status"/>
<map:when test="success">
<!-- Do something useful here, since the saveToFile succeeded -->
.....
</map:when>
<map:otherwise>
<map:read src="html/saveToFileFailed.html" mime-type="text/html"/>
</map:otherwise>
</map:select>
</map:match>
</map:pipeline>
Mmmh... careful here : you're relying on a unspecified behaviour that allows a flow script to not send a page. And we still have to decide if this allowed or not.
From my point of view, this should not be allowed. And for this kind of purpose, I would better go for a "flowscript-action" that calls a script function that returns parameters to the sitemap but which is not allowed to create a continuation.
I also just checked in a new CopySourceAction that has been in use for ages in one of my projects. It doesn't create a temp file, but allows to copy any source (including, but not restricted to, cocoon:) to any ModifiableSource :
<map:act type="copy-source" src="cocoon://pipeline.xml">
<map:parameter name="dest" value="context://WEB-INF/data/file.xml"/>
</map:act>
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
