Batch Error Codes

Like most applications, the Batch Launcher returns an integer value to the operating system upon ending. Typically a return value of zero indicates success, and other value denotes an error condition. By default the return code from the Batch Launcher in the event of an error is 1, or the value specified by property curam.batchlauncher.default.error.code.

To give greater flexibility in error handling, it is also possible to map individual application error messages to different error codes. This would enable a script which runs the batch launcher to take different actions depending on the return value from the Batch Launcher.

For example to map a run time exception with message curam.util.message.infrastructure.ID_RECIP_EMAIL_ERROR to a return code 22 you simply need to add a record to table BatchErrorCodes, containing infrastructure.ID_RECIP_EMAIL_ERROR and 22 in fields ErrorCodeID and ErrorCode respectively.

This table can be administered using the Batch Administration interface.

If an error other than a subclass of AppException or AppRuntimeException occurs during a Batch Launcher run this will be wrapped in a curam.util.message.infrastructure.ID_UNHANDLED to allow for it to be customized on the BatchErrorCodes database table.