Back to Summer Batch home page

Empty file check support

The Summer.Batch.Extra.EmptyCheckSupport.EmptyFileCheckTasklet is dedicated to check if a given file is empty or not. It returns an ExitStatus "EMPTY" if the file is empty or absent, "NOT_EMPTY" if it exists and is not empty.

A single property is mandatory : the FileToCheck, that points at the target file resource to be checked for existence/emptiness.

Configuring the EmptyFileCheckTasklet in the job xml file:

Example 7.14. Typical EmptyFileCheckTasklet usage in the job xml file


A typical usage would make use of the returned ExitStatus as a switch to organize the job execution flow, as demonstrated by the example above.

Example 7.15. Sample Unity configuration for a EmptyFileCheckTasklet

Back to Summer Batch home page