You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Al Brown <al...@yahoo.com> on 2007/06/26 02:45:35 UTC

flows vs flowscripts

What is the difference when folks talks about flows vs flowscripts?

How is map:flow related to map:call?

How is continuation related to sessions?

I have seen some code examples with cocoon.sendPageAnd Wait().
What happens if the user just surfs off and never sends the next request?

Al

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


Re: flows vs flowscripts

Posted by Tobia <to...@linux.it>.
Al Brown wrote:
> How is map:flow related to map:call?

<map:flow> defines what javascript files to load in the sitemap.
Those files define functions that can be called from pipelines with
<map:call function="">


> How is continuation related to sessions?

In classical web programming, you store the state of the computation in
session variables.  When a subsequent request comes along, the
server-side code is run from the start, but it can choose how to proceed
based on the values of those variables.

In continuation-based web programming you don't need session variables
(although you can use them if you want.)  When a subsequent request
comes along, the server-side code simply restarts from where it was
suspended (when it called sendPageAndWait) and it finds all its local
variables; if the code was in a loop, it will still be there, and so on.
So you can write ifs and loops that span multiple pages.

The pipeline component that invokes a continuation, that will restart
the script from where it was suspended, is <map:call continuation="">


HTH
Tobia

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


Re: flows vs flowscripts

Posted by Derek Hohls <DH...@csir.co.za>.
Shrug.  I never really had to address this before, and
"more time != more knowledge"
 
But yes, I will now read the docs :}

>>> Joerg Heinicke <jo...@gmx.de> 2007/06/29 08:40 AM >>>

On 29.06.2007 08:01, Derek Hohls wrote:

> What other <select type="xxx"> and <when test="xxx"> 
> are there for error trapping?

Hi Derek,

you have been working with Cocoon since years and you have never been 
coming across error handling in the sitemap? The documentation has a 
page how it is supposed to work:
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

Regards,
Joerg

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



-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


Re: flows vs flowscripts

Posted by Tobia <to...@linux.it>.
Joerg Heinicke wrote:
> The documentation has a page how it is supposed to work:
> http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

See also the definition and configuration of the exception selector in
the base sitemap, under <map:selector ... name="exception">


Tobia

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


Re: flows vs flowscripts

Posted by Joerg Heinicke <jo...@gmx.de>.
On 29.06.2007 08:01, Derek Hohls wrote:

> What other <select type="xxx"> and <when test="xxx"> 
> are there for error trapping?

Hi Derek,

you have been working with Cocoon since years and you have never been 
coming across error handling in the sitemap? The documentation has a 
page how it is supposed to work:
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

Regards,
Joerg

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


Re: flows vs flowscripts

Posted by Derek Hohls <DH...@csir.co.za>.
Tobia
 
Thanks - this was useful to me too.
 
What other <select type="xxx"> and <when test="xxx"> 
are there for error trapping?

Derek
 
PS - for newer Cocoon users; you will probably need to prefix
the elements in the snippet below with map:

>>> Tobia <to...@linux.it> 2007/06/28 05:39 PM >>>

Al Brown wrote:
> how do I control what they see when a continuation expires?

<handle-errors>
  <select type="exception">
    <when test="invalid-continuation">

      Put here what to show when a continuation expires, from a simple
      <read src="error-badcont.html"/> to more complex pipelines.

    </when>
  </select>
</handle-errors>


Tobia

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



-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


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


Re: flows vs flowscripts

Posted by Tobia <to...@linux.it>.
Al Brown wrote:
> how do I control what they see when a continuation expires?

<handle-errors>
  <select type="exception">
    <when test="invalid-continuation">

      Put here what to show when a continuation expires, from a simple
      <read src="error-badcont.html"/> to more complex pipelines.

    </when>
  </select>
</handle-errors>


Tobia

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


Re: flows vs flowscripts

Posted by Al Brown <al...@yahoo.com>.
Torsten Curdt wrote:
>
> On 26.06.2007, at 02:45, Al Brown wrote:
>
>> What is the difference when folks talks about flows vs flowscripts?
>
> flow is more general as we have javaflow and javascript flow (aka 
> flowscript)
>
>> I have seen some code examples with cocoon.sendPageAnd Wait().
>> What happens if the user just surfs off and never sends the next 
>> request?
>
> the continuation will expire after a while ...at least from that 
> perspective similar to sessions.
>
So what does my customer see or how do I control what they see when a 
continuation expires?



> cheers
> -- 
>
> Torsten
>
Al

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


Re: flows vs flowscripts

Posted by Torsten Curdt <tc...@apache.org>.
On 26.06.2007, at 02:45, Al Brown wrote:

> What is the difference when folks talks about flows vs flowscripts?

flow is more general as we have javaflow and javascript flow (aka  
flowscript)

> I have seen some code examples with cocoon.sendPageAnd Wait().
> What happens if the user just surfs off and never sends the next  
> request?

the continuation will expire after a while ...at least from that  
perspective similar to sessions.

cheers
--
Torsten



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