Class FinalStep
- java.lang.Object
-
- org.apache.uima.flow.Step
-
- org.apache.uima.flow.FinalStep
-
public class FinalStep extends Step
Indicates that a CAS has finished being processed by the aggregate. After returning a FinalStep, theFlow.next()
method will not be called again for this CAS.If the CAS was passed in as an input to the aggregate's process method, then the aggregate's processing is completed and ownership of this CAS is returned to the caller.
If the CAS was generated internally to this aggregate (by a CAS Multiplier that is part of this aggregate), then it will either be output from the aggregate or it will be dropped. A CAS can only be output if the aggregate's metadata includes declares the operational property outputsNewCASes == true. (see
OperationalProperties.getOutputsNewCASes()
).By default, if the aggregate's metadata declares outputsNewCASes == true, then all CASes generated internal to the aggregate are output. However, by passing
true
to theFinalStep(boolean)
constructor, the Flow Controller can force a particular CAS to be dropped. This allows the Flow Controller to output some CASes but not others.It is not permitted to drop a CAS that was passed as input to the AnalysisEngine, and using
FinalStep(true)
for such a CAS is an error.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getForceCasToBeDropped()
Gets whether the CAS should be dropped.
-
-
-
Constructor Detail
-
FinalStep
public FinalStep()
Creates a new FinalStep.
-
FinalStep
public FinalStep(boolean aForceCasToBeDropped)
Creates a new FinalStep, and may indicate that a CAS should be dropped. This can only be used for CASes that are produced internally to the aggregate. It is an error to attempt to drop a CAS that was passed as input to the aggregate.- Parameters:
aForceCasToBeDropped
- true forces this CAS to be dropped. false causes the default behavior, which is to output the CAS whenever appropriate.
-
-