Back to Summer Batch home page

Empty file check support

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.

Only mandatory property is FileToCheck; it 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


[Note]Note

Recommendation: Usage should 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