cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Re: Process incomplete pipeline with redirect-to
Date Mon, 14 May 2007 06:45:54 GMT
To clarify: It seems we can't do a client-side/"global" redirect without 
getting an
"Attempted to process incomplete pipeline"/"Response already submitted" 
because pipeline processing continues after the redirect occured. 

We generally have the following pipeline setup:

=> Pipeline-entry (root sitemap )
      map:match *.cont -> map:generate contcall-{1}

   => Pipeline-entry (subsitemap)
         map:match contcall-* -> map:call continuation="{1}"

        => Flow Code (sendPageAndWait ...)
           => JX-Generate
           => Serialize xml ...
    => Pipeline-return

   map:transform ...
   map:serialize html ...

=> Pipeline-return

The use-case we try to achieve: Conditional CLIENT-SIDE/global redirect 
depending on status in Flow.

We tried the following:
- Obvious: Redirect in Flowcode: cocoon.redirectTo ( uri, global=true) => 
Exception "Attempted to process incomplete pipeline"
- cocon.sendPage to a matcher which does a map:redirect (i.e. instead of 
JX-Generate above)  =>  Exception "Attempted to process incomplete 
- Doing redirect "manually" by Setting HTTP status and Location header 
directly (in sitemap or flow) => Does not work, headers set from 
subsitemap are thrown away/overwritten
- Setting a request-attribute in flow code and deciding in root-sitemap 
wether to serialize or to redirect via map:select => Does not work 
map:select gets evaluated on pipeline creation, i.e. too early
- same as last one with custom Redirect-Action which redirect depending on 
request-attribute => Does not work: action also gets executed too early on 
pipeline creation

It almost seems you cannot achieve a "late" conditional redirect  in 
Cocoon, only when the condition is 
known at the beginning of pipeline processing, which is just too early for 
most use-cases ...

Any hints would  be greatly appreciated, 

This message and any attachment ("the Message") are confidential. If you have received the
Message in error, please notify the sender immediately and delete the Message from your system,
any use of the Message is forbidden.
Correspondence via e-mail is primarily for information purposes. RZB neither makes nor accepts
legally binding statements via e-mail unless otherwise agreed to the contrary.
Information pursuant to ? 14 Austrian Companies Code: Raiffeisen Zentralbank Oesterreich AG;
Registered Office: Am Stadtpark 9, A-1030 Vienna; Company Register Number: FN 58882t at the
Commercial Court of Vienna.

View raw message