private void execute(Record record) throws OnRecordErrorException {
    // This is a contrived example, normally you may be performing an operation that could throw
    // an exception or produce an error condition. In that case you can throw an OnRecordErrorException
    // to send this record to the error pipeline with some details.
    if (!record.has("/someField")) {
      throw new OnRecordErrorException(Errors.SAMPLE_01, record, "exception detail message.");
    }

    // TODO: execute action
  }
private void execute ( Record record ) throws OnRecordErrorException { if ( ! record . has ( "/someField" ) ) { throw new OnRecordErrorException ( Errors . SAMPLE_01 , record , "exception detail message." ) ; } }
Executes an action for given record.

@param record the record that will parametrize the action
@throws OnRecordErrorException when action can't be executed