Oct 2nd, 2009, 05:29 AM
I have been taking a look at spring batch's restartibility but not sure if it supports the following use cases:
a. I upload a file and one line item in the file fails business validation and processing stops. Then user is notified of error and error is corrected and uploaded again. With restartability in spring batch, would start processing the file all over again or would it start from where it stopped?
b. I upload a file and there are several business logic validation errors or format problems for several lines but are skipped and process completes. User is notified and corrects the few errors and submits file again for processing. Would spring batch automitcally process just the items that failed previously or would it start all over again?
Your assistance on this would be highly appreciated. Thanks.
Oct 3rd, 2009, 12:47 AM
a. When a file fails, by default it restarts on the chunk where it left off.
b. There isn't a way to for the system to automatically process just the records that skipped. If you want this functionality, you may want to have some alternative processing for bad records such as writing them out to a separate file or putting them in the database. Then you can clean up just those records later.