org.apache.uima.flow

## 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, the `Flow.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 the `FinalStep(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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FinalStep()` Creates a new FinalStep.
    `FinalStep(boolean aForceCasToBeDropped)` Creates a new FinalStep, and may indicate that a CAS should be dropped.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getForceCasToBeDropped()` Gets whether the CAS should be dropped.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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.

  - ### Method Detail

    - #### getForceCasToBeDropped

          public boolean getForceCasToBeDropped()

      Gets whether the CAS should be dropped.
      Returns:
        true forces this CSA to be dropped. false causes the default behavior, which is to output the CAS whenever appropriate.

Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.