Post-Processing Logic

The product supports executing one or more algorithms after all the threads of a given batch job have completed. This allows for some special processing to occur at the end of a batch job. Algorithms for this plug-in spot receive the batch control, batch run number, batch processing business date, number of threads and the list of the ad hoc parameters of the batch job.

Note: This plug-in spot is available for all Java based batch programs. For programs of type Java (converted), the individual batch programs need to explicitly support this plug-in spot. Unless otherwise noted, assume that a Java (converted) program does not support it.

The following are some examples of functionality that may be executed at the end of a batch job:

  • Another dependent batch job can be kicked off. Note that this use case is only needed when the multiple dependent jobs are not part of a scheduler (which can also detect the successful end of one batch job so as to submit the next job).

  • Statistics for the batch run may be analyzed and based on results, a To Do Entry may be sent to an administrator.

  • If the current batch job is processing a large number of child records in multiple threads, a parent record could be updated to a different status or with some other audit information.

Note that the units of work for all threads are committed prior to executing the post-processing logic. The algorithm should perform standard error handling. If an error occurs in one of the post-processing algorithms, the overall batch job’s status is set to Error so that it can be re-submitted to retry the logic in the finalize step.