Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 33650 invoked from network); 4 Mar 2006 00:17:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Mar 2006 00:17:33 -0000 Received: (qmail 70320 invoked by uid 500); 4 Mar 2006 00:18:08 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 70269 invoked by uid 500); 4 Mar 2006 00:18:08 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 70258 invoked by uid 99); 4 Mar 2006 00:18:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2006 16:18:07 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [65.110.60.10] (HELO scusa.it) (65.110.60.10) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 03 Mar 2006 16:18:06 -0800 Received: (qmail 15057 invoked from network); 3 Mar 2006 23:22:32 -0000 Received: from 85-18-136-98.fastres.net (HELO ?192.168.0.9?) (85.18.136.98) by scusa.it with SMTP; 3 Mar 2006 23:22:32 -0000 Message-ID: <4408DCA5.8080606@thebug.it> Date: Sat, 04 Mar 2006 01:17:41 +0100 From: Simone Gianni User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050807) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: [FLOW] sendPageAndWait continuation storage References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------010605030509040902070302" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------010605030509040902070302 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Bruyn Bill wrote: >Just what I was looking for. Thanks, Simone! > >BTW, if I wanted to pass my bizData from flow to the sitemap and then >into another pipeline, I could just: > > > >(or something like that anyway) - right? > > Yeah, right, you can find a complete list with (sometimes brief) explanations of input modules here http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html . Input modules are quite easy to understand reading the code directly (just a couple of methods, one to return the supported keywords, the other one to convert it to a value, and something else i can't remember :) ), but are commonly based on a list of keywords, a map retrival (like the request-param) or xpath over a defined object (like the flow-continuation). You can also "stream" the content of a bizdata directly inside a pipeline using the "module:" pseudoprotocol (see this articole http://www.planetcocoon.com/node/2190 ) and access the input modules functionalities from inside a flow, but i can't find where it's explained anymore :( Simone > > >>-----Original Message----- >>From: Simone Gianni [mailto:s.gianni@thebug.it] >>Sent: Friday, March 03, 2006 4:52 PM >>To: users@cocoon.apache.org >>Subject: Re: [FLOW] sendPageAndWait continuation storage >> >> >>Hi Bruyn, >>there is a continuation input module, that you can use inside the >>sitemap to pass any continuation information to any object (an xsl, a >>flow, a custom object of yours). For example, to pass the >>continuation >>id as a parameter to an XSLT you can simply write : >> >> >> >value="{flow-continuation:id}"/> >> >>The syntax of the input module is xpath based, so to obtain >>for example >>the id of the parent continuation you can use >>flow-continuation:parentContinuation/id . You can find the >>javadocs for >>the input module class here >>http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/compone >>nts/modules/input/FlowContinuationModule.html >>. >> >>Regarding bizdata, they are live only within the request, so once you >>have serialized the page (or PDF or whatever else) they are lost, but >>all you need is still in the flow, so once you get back there >>using the >>continuation id ... >> >>Hope this helps, >>Simone >> >>Bruyn Bill wrote: >> >> >> >>>When a continuation is created by sendPageAndWait, where is >>> >>> >>it stored? >> >> >>>Can I access it with flowscript or in the sitemap? >>> >>>I have a scenario similar to the 'flowscript continuation >>> >>> >>from external >> >> >>>reply' problem discussed recently. What I'm trying to do is iterate >>>over a list, and for each item in it, call out to some >>> >>> >>remote process >> >> >>>that will render a 'PDF Form' with my continuation-id in its submit >>>button. So something like the following: >>> >>>//for each element in the list >>>for (var i=0; i>> >>> //get some more input, if you want >>> var subject = subjects.get(i); >>> bindFormInput("subject", subject, {subject:subject}); >>> >>> //format xml input via jx generator >>> var dom = pipeline.processToDOM("4pointsresult.xml", {doc:doc, >>>subject:subject}); >>> >>> //let some other pipeline do stuff and a sendPage >>> >>> >>(actually another >> >> >>>top-level flowscript function) >>> cocoon.sendPageAndWait("forms-server.flow", {dom: dom}); >>> >>> //and then move on to the next element >>>} >>> >>>I guess I could stick a jx template in the middle, grab the >>>continuation-id from there, and then post a form to my >>> >>> >>flowscript, but >> >> >>>I don't see how I'd preserve my bizData (dom) across requests like >>>that... And if the continuation os available to the jx generator, >>>shouldn't I be able to get to it without going thru all that? >>> >>> >>>TIA, >>> >>> >>>Bill Bruyn >>> >>> >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>>For additional commands, e-mail: users-help@cocoon.apache.org >>> >>> >>> >>> >>> >>-- >>Simone Gianni >> >>--------------------------------------------------------------------- >>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 > > > -- Simone Gianni --------------010605030509040902070302 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Bruyn Bill wrote:
Just what I was looking for.  Thanks, Simone!

BTW, if I wanted to pass my bizData from flow to the sitemap and then
into another pipeline, I could just:

<map:parameter name="obj" value="{flow-attribute:bizData}"/> 

(or something like that anyway) - right?
  
Yeah, right, you can find a complete list with (sometimes brief) explanations of input modules here http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html . Input modules are quite easy to understand reading the code directly (just a couple of methods, one to return the supported keywords, the other one to convert it to a value, and something else i can't remember :) ), but are commonly based on a list of keywords, a map retrival (like the request-param) or xpath over a defined object (like the flow-continuation).

You can also "stream" the content of a bizdata directly inside a pipeline using the "module:" pseudoprotocol (see this articole http://www.planetcocoon.com/node/2190 ) and access the input modules functionalities from inside a flow, but i can't find where it's explained anymore :(

Simone
  
-----Original Message-----
From: Simone Gianni [mailto:s.gianni@thebug.it] 
Sent: Friday, March 03, 2006 4:52 PM
To: users@cocoon.apache.org
Subject: Re: [FLOW] sendPageAndWait continuation storage


Hi Bruyn,
there is a continuation input module, that you can use inside the  
sitemap to pass any continuation information to any object (an xsl, a 
flow, a custom object of yours). For example, to pass the 
continuation 
id as a parameter to an XSLT you can simply write :

<map:transform src="my.xsl">
  <map:parameter name="contid" 
value="{flow-continuation:id}"/> </map:transform>

The syntax of the input module is xpath based, so to obtain 
for example 
the id of the parent continuation you can use 
flow-continuation:parentContinuation/id . You can find the 
javadocs for 
the input module class here 
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/compone
nts/modules/input/FlowContinuationModule.html 
.

Regarding bizdata, they are live only within the request, so once you 
have serialized the page (or PDF or whatever else) they are lost, but 
all you need is still in the flow, so once you get back there 
using the 
continuation id ...

Hope this helps,
Simone

Bruyn Bill wrote:

    
When a continuation is created by sendPageAndWait, where is 
      
it stored? 
    
Can I access it with flowscript or in the sitemap?

I have a scenario similar to the 'flowscript continuation 
      
from external 
    
reply' problem discussed recently.  What I'm trying to do is iterate 
over a list, and for each item in it, call out to some 
      
remote process 
    
that will render a 'PDF Form' with my continuation-id in its submit 
button.  So something like the following:

//for each element in the list
for (var i=0; i<subjects.size(); i++) {

 //get some more input, if you want
 var subject = subjects.get(i);
 bindFormInput("subject", subject, {subject:subject});
 
 //format xml input via jx generator
 var dom = pipeline.processToDOM("4pointsresult.xml", {doc:doc, 
subject:subject});
 
 //let some other pipeline do stuff and a sendPage 
      
(actually another 
    
top-level flowscript function)
 cocoon.sendPageAndWait("forms-server.flow", {dom: dom});
 
 //and then move on to the next element
}

I guess I could stick a jx template in the middle, grab the 
continuation-id from there, and then post a form to my 
      
flowscript, but 
    
I don't see how I'd preserve my bizData (dom) across requests like 
that... And if the continuation os available to the jx generator, 
shouldn't I be able to get to it without going thru all that?


TIA,


Bill Bruyn



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org

 

      
-- 
Simone Gianni

---------------------------------------------------------------------
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

  
--
Simone Gianni
--------------010605030509040902070302--