TicketCallback.dpHandleError()

The Deferred Processing Engine provides an error handling callback mechanism for when deferred processes fail (i.e. the deferred method you defined throws an exception). The DPCallback interface is provided with the infrastructure. It has a single method definition: dpHandleError.

dpHandleError() gives application developers control over error handling when the invocation of a deferred process fails. This callback is invoked once the deferred processing message has been moved to the DPError queue (usually after the failing process has been retried several times). An implementation example is provided in TicketCallback.dpHandleError() below.

There are two ways an error handler can be configured. Firstly, a single (global) error handler callback can be defined for deferred processing by setting the curam.custom.deferredprocessing.dpcallback property to the fully- qualified name of a class that implements the DPCallback interface. The dpHandleError() method on that class will then be invoked when any deferred method fails. Alternately, you can supply the fully-qualified name of any class that implements the DPCallback interface when enacting a deferred process. This allows you to specify a specific error handler for a single deferred process, or even a subset of the instances a deferred process.

Figure 1. TicketCallback dpHandleError()
void dpHandleError(String processName, long instDataID)
  throws AppException {
  // Method logic goes here
}

This callback operation could be used to: