You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Torsten Zesch <ze...@tk.informatik.tu-darmstadt.de> on 2010/07/09 11:10:52 UTC

Process an aggregate with CAS multiplier and merger

Hi,

I have a situation in which I want to split a document into several CASes, do some processing, and then merge the results back into a single result CAS.

I implemented a CAS multiplier and a CAS merger that I put into an aggregate with a FixedFlow, setting ActionAfterCasMultiplier to "drop" and setting outputsNewCASes to "true" for the aggregate.
This should drop the source CAS and let the merged CAS be output by the aggregate.

Now, if I run that aggregate in an CPE and put the consumer behind the aggregate, 
=> Reader + Aggregate[Multiply-Process-Merge] + Consumer
the consumer only sees the source CAS.

However, if I put the consumer inside the Aggregate,
=> Reader + Aggregate[Multiply-Process-Merge-Consumer]
the output is correct.
This means the mergedCAS is correctly created, but it is not available after the aggregate.

Do I need to always put everything inside one big aggregate, or is there some way to also run pipelines like 
=> Reader + Process + Aggregate[Multiply-Process-Merge] + Process + Consumer

Thanks,
Torsten

Re: Process an aggregate with CAS multiplier and merger

Posted by Eddie Epstein <ea...@gmail.com>.
The CPE has no support for components returning new CASes. No need for
a CPE, just put the collection reader inside the aggregate too.

Eddie

On Fri, Jul 9, 2010 at 5:10 AM, Torsten Zesch
<ze...@tk.informatik.tu-darmstadt.de> wrote:
> Hi,
>
> I have a situation in which I want to split a document into several CASes, do some processing, and then merge the results back into a single result CAS.
>
> I implemented a CAS multiplier and a CAS merger that I put into an aggregate with a FixedFlow, setting ActionAfterCasMultiplier to "drop" and setting outputsNewCASes to "true" for the aggregate.
> This should drop the source CAS and let the merged CAS be output by the aggregate.
>
> Now, if I run that aggregate in an CPE and put the consumer behind the aggregate,
> => Reader + Aggregate[Multiply-Process-Merge] + Consumer
> the consumer only sees the source CAS.
>
> However, if I put the consumer inside the Aggregate,
> => Reader + Aggregate[Multiply-Process-Merge-Consumer]
> the output is correct.
> This means the mergedCAS is correctly created, but it is not available after the aggregate.
>
> Do I need to always put everything inside one big aggregate, or is there some way to also run pipelines like
> => Reader + Process + Aggregate[Multiply-Process-Merge] + Process + Consumer
>
> Thanks,
> Torsten
>