public class DecisionTreeReader extends IntegrationProxyReader
Evaluates a DecisionTree for each record read from a nested reader and adds the outcome fields to the record.
  • Constructor Details

  • Method Details

    • getExpressionContext

      public RecordExpressionContext getExpressionContext()
    • getDecisionTree

      public DecisionTree getDecisionTree()
    • isOverwrite

      public boolean isOverwrite()
      Indicates if outcome fields replace existing non-null fields with the same name instead of being added under a numbered name (default false).
    • setOverwrite

      public DecisionTreeReader setOverwrite(boolean overwrite)
      Indicates if outcome fields replace existing non-null fields with the same name instead of being added under a numbered name (default false).
    • interceptRecord

      protected Record interceptRecord(Record record) throws Throwable
      Description copied from class: ProxyReader
      Overridden by subclasses to transform, drop, or observe a record on its way through this proxy.

      Contract for subclasses (see also docs/authoring/ProxyReader.md):

      • Return the record (possibly modified) to pass it downstream.
      • Return null to drop the record; the framework reads the next one.
      • Throw to fail the pipeline; the framework wraps the throwable in a DataException with .setRecord(record).
      • The nested DataReader is opened and closed for you; do not read from it here.
      • Do not call DataEndpoint.incrementRecordCount() here.
      Overrides:
      interceptRecord in class ProxyReader
      Throws:
      Throwable
    • addExceptionProperties

      public DataException addExceptionProperties(DataException exception)
      Description copied from class: Endpoint
      Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.
      Overrides:
      addExceptionProperties in class ProxyReader