You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bruyn Bill <Br...@mcao.maricopa.gov> on 2005/10/04 02:15:51 UTC
Aggregate flow result
Hi, all.
I've been reading documentation and poking around the sample bundle for
a few days now, and it seems like Cocoon should be a suitable framework
for my current project. I'm in research/proof-of-concept mode ATM
though, and have just found that the design I had in mind is probably
not going to work. I wanted to provide a few reusable resources that
returned XML data, and let my administrator reference them in the
sitemap as necessary. Some of those resources may require user input,
and I thought I'd use flow/continuations for that. E.g.,
<!-- provide reusable data access / collection mechanisms -->
Pipeline 1: Get some data from a database and represent result as XML
Pipeline 2: Present the user with some series of forms, do stuff, and
represent result as XML
Pipeline 3: Present the user with some other forms, do other stuff, and
represent result as XML
<!-- and reference them -->
Pipeline 4: get xml result from pipeline 2
Pipeline 5: get xml result from pipelines 1 and 2
Pipeline 6: get xml result from pipelines 2 and 3
The idea is that the flowscripts themselves don't know anything about
which resource should be called next... Am I barking up the wrong tree
here? Can I 'aggregate' flow results, or is this just bad design?
Alternative approaches or references to additional documentation are
much appreciated.
TIA,
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Aggregate flow result
Posted by Ralph Goers <Ra...@dslextreme.com>.
Well, what you are proposing is an interesting usage of flow, but I'm
not sure it will work exactly the way you have described. The
interesting aspect of your design is that you have multiple requests
going on. Each interaction with the end user will be a new request
through the sitemap. While the continuations will continue the
application where they left off, I'm not sure the results of other
pipelines will still be there. I suspect that if you were to do a
sendPageAndWait from a pipeline being aggregated together with other
data that your form would get merged into the other XML, which is not
the result you want. But hey, I might be wrong.
Ralph
Bruyn Bill wrote:
>Hi, all.
>
>I've been reading documentation and poking around the sample bundle for
>a few days now, and it seems like Cocoon should be a suitable framework
>for my current project. I'm in research/proof-of-concept mode ATM
>though, and have just found that the design I had in mind is probably
>not going to work. I wanted to provide a few reusable resources that
>returned XML data, and let my administrator reference them in the
>sitemap as necessary. Some of those resources may require user input,
>and I thought I'd use flow/continuations for that. E.g.,
>
><!-- provide reusable data access / collection mechanisms -->
>Pipeline 1: Get some data from a database and represent result as XML
>Pipeline 2: Present the user with some series of forms, do stuff, and
>represent result as XML
>Pipeline 3: Present the user with some other forms, do other stuff, and
>represent result as XML
>
><!-- and reference them -->
>Pipeline 4: get xml result from pipeline 2
>Pipeline 5: get xml result from pipelines 1 and 2
>Pipeline 6: get xml result from pipelines 2 and 3
>
>
>The idea is that the flowscripts themselves don't know anything about
>which resource should be called next... Am I barking up the wrong tree
>here? Can I 'aggregate' flow results, or is this just bad design?
>Alternative approaches or references to additional documentation are
>much appreciated.
>
>
>TIA,
>
>
>Bill
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Aggregate flow result
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 4 oct. 05, à 02:15, Bruyn Bill a écrit :
> ...<!-- provide reusable data access / collection mechanisms -->
> Pipeline 1: Get some data from a database and represent result as XML
> Pipeline 2: Present the user with some series of forms, do stuff, and
> represent result as XML
> Pipeline 3: Present the user with some other forms, do other stuff,
> and
> represent result as XML
>
> <!-- and reference them -->
> Pipeline 4: get xml result from pipeline 2
> Pipeline 5: get xml result from pipelines 1 and 2
> Pipeline 6: get xml result from pipelines 2 and 3..
IIUC steps 4,5,6 come later than 1,2,3, so the output of 1,2,3 should
be saved for a while?
If so, the easiest that comes to mind would be to create a temporary
directory (with a unique ID tied to the user's session via a flow
variable), and store the output of 1,2,3 there for later use. Think
REST: 1,2,3 create resources that are referenced later on.
You could also store the results of 1,2,3 in the user's session (as DOM
objects), but depending on the amount of data and load it might be too
heavy.
-Bertrand