6.6.2. Data Read Handler

This handler sequentially reads the input data using the data reader.

This handler uses the data reader on the execution context to read the input data corresponding to the business process one by one and then with the read data as an argument, delegates the process to the subsequent handler. When the end of the data reader is reached, NoMoreRecord is returned to indicate that end of data has been reached without executing the subsequent handler.

This handler performs the following process.

  • Reads the input data using data reader
  • Numbering of execution ID

The process flow is as follows.

../../../../_images/flow18.png

6.6.2.2. Module list

<dependency>
  <groupId>com.nablarch.framework</groupId>
  <artifactId>nablarch-fw-standalone</artifactId>
</dependency>

6.6.2.3. Constraints

DataReader in ExecutionContext must be configured in the handler before this handler. If DataReader is not configured by the time this handler is called, it terminates process as if there is no process target data (returns NoMoreRecord).

6.6.2.4. Configure the maximum number of processing

The maximum number of processing can be configured in this handler. When the maximum number of data items have been processed, this handler returns NoMoreRecord indicating that there is no more records to be processed.

This configuration value is specified when batch processing large amount of data that is processed for several days, etc. This configured value can be used to implement a batch that processes a maximum of 1 million records over a period of 10 days with a maximum of 100,000 items per day.

A configuration example is shown below.

<component class="nablarch.fw.handler.DataReadHandler">
  <!-- Up to 10,000 records can be processed -->
  <property name="maxCount" value="10000" />
</component>