You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Christoph Büscher <ch...@neofonie.de> on 2008/05/09 11:03:17 UTC

Drop CAS with Flow Controller question

Hi again,

I had a look at the Flow Controller section in the Docs but so far I can't see
how I can easily get rid of a CAS containing a "bad" document alltogether.

In the application we want to sort out and drop CASes at three different points
in a fixed flow (so far in a simple CPE) based on some previous AEs decision. 
E.g. one AE classifies a document and only a certain class of document should be 
allowed to continue processing. So I could add three new aggregate AEs at the 
three decision points and implement some logic there.
So far so good. I understand that I would have to wrap my surrent pipeline in an 
aggregate to add a Flow Controller. But here, the flow seems to be determined 
only once when the CAS enters this new aggregate. What I need to do is to decide 
at three point further down the line that the CAS doesn't need any more 
processing and can be dropped completely, but in the Flow.next() method I don't 
seem to have any reference to the CAS any more.

UIMA seems to be able to "drop" CASes when exeptions occur in a TAE alltogether. 
Is there a way of triggering this behaviour without actually having to throw an 
exception (because this is another - rather nasty - workaround I've been 
thinking about)

Thanks for any advice,

-- 
--------------------------------
Christoph Büscher



Re: Drop CAS with Flow Controller question

Posted by Eddie Epstein <ea...@gmail.com>.
Hi Christoph,

A flow object is created for each CAS; the next() method gets access to it's
CAS using getCas(), and then can use all the standard APIs to read from or
write into the CAS. Any data in the CAS can therefor be used by the flow
controller to decide to stop further processing of the CAS, in which case
next() would return FinalStep.

Eddie

On Fri, May 9, 2008 at 5:03 AM, Christoph Büscher <
christoph.buescher@neofonie.de> wrote:

> Hi again,
>
> I had a look at the Flow Controller section in the Docs but so far I can't
> see
> how I can easily get rid of a CAS containing a "bad" document alltogether.
>
> In the application we want to sort out and drop CASes at three different
> points
> in a fixed flow (so far in a simple CPE) based on some previous AEs
> decision. E.g. one AE classifies a document and only a certain class of
> document should be allowed to continue processing. So I could add three new
> aggregate AEs at the three decision points and implement some logic there.
> So far so good. I understand that I would have to wrap my surrent pipeline
> in an aggregate to add a Flow Controller. But here, the flow seems to be
> determined only once when the CAS enters this new aggregate. What I need to
> do is to decide at three point further down the line that the CAS doesn't
> need any more processing and can be dropped completely, but in the
> Flow.next() method I don't seem to have any reference to the CAS any more.
>
> UIMA seems to be able to "drop" CASes when exeptions occur in a TAE
> alltogether. Is there a way of triggering this behaviour without actually
> having to throw an exception (because this is another - rather nasty -
> workaround I've been thinking about)
>
> Thanks for any advice,
>
> --
> --------------------------------
> Christoph Büscher
>
>
>