Login  Register

Re: Re: can't get 2 processor in 1 pipeline to work

Posted by James Liang on May 12, 2011; 5:41am
URL: https://discuss.orbeon.com/can-t-get-2-processor-in-1-pipeline-to-work-tp3514050p3516556.html

Hi,

Thank you for your help.

Unfortunately, connecting the 2 processors did not work.

To make it easy to reproduce the problem, I simplify it by making 2
pipelines that use the directory-scanner processor.

dir.xpl - list *.bat files
dir2.xpl - list *.sh files

Each of these pipeline worked independently.  Also notice that I
specified debug="" in the <p:output> tag.  As such I was able to
verified these working in the log files and from the browser.

I also created dir_all.xpl as follow:

<p:config
                xmlns:p="http://www.orbeon.com/oxf/pipeline"
                xmlns:sql="http://orbeon.org/oxf/xml/sql"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:oxf="http://www.orbeon.com/oxf/processors"
                xmlns:xi="http://www.w3.org/2001/XInclude">
  <p:param type="input" name="instance" />
  <p:param type="output" name="data" />

        <p:processor name="oxf:pipeline">
                <p:input name="config" href="dir.xpl"/>
                <p:output name="data" id="result" />
        </p:processor>

        <p:processor name="oxf:pipeline">
                <p:input name="dir_result" href="#result"/>
                <p:input name="config" href="dir2.xpl"/>
                <p:input name="instance" href="#instance"/>
                <p:output name="data" ref="data" />
        </p:processor>
       
</p:config>


I've connected output of dir.xpl with input of dir2.xpl (with result).
 When I use the browser to load dir_all.xpl, I see it in the log that
only dir2.xpl was ever called.

This is exactly the same behavior as before when I used two sql
processors.  In that case, I was able to verify from both the log and
from mysql that one of the sql pipeline was never executed.

I've attached dir.xpl, dir2.xpl and dir_all.xpl.

Again, thank you for your help.


Thanks,
James







On Wed, May 11, 2011 at 1:27 AM, Florian Schmitt
<[hidden email]> wrote:

> James,
>
>> Isn't each processor inside p:config called sequentially?
>
> AFAIK no, because of the lazy evaluation model. In your save_all.xpl, it
> seems producing the output is simply done by the save.xpl, so it seems
> that there's no need to call delete_all.xpl. If the save.xpl depends on
> a succesfull execution of delete_all.xpl, you will have to express that
> dependency explicitly.
>
> To do so, you could connect both pipeline processors:
>
> - add a p:output to the first processor (calling delete_all.xpl) to
> expose the result of delete_all.xpl;
> - add a p:input the the second processor (calling save.xpl) that
> references the output of the first processor.
>
> This way, save.xpl will be called only if delete_all.xpl has finished;
> you may even handle different results of the delete_all "action", for
> example if the delete wasn't succesful for any reason.
>
> HTH
> florian
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

dir.xpl (1K) Download Attachment
dir_all.xpl (1K) Download Attachment
dir2.xpl (1K) Download Attachment