Offline Unit-Testing of Deferred Processes

If the application is deployed in an Application Server, the deferred methods will be invoked asynchronously. However, if the Application is not executing in an Application Server container (for example, for off-line unit-testing), you may wish to invoke the deferred method synchronously (i.e. not deferred). This can be done by setting the property curam.test.stubdeferredprocessing to true.

Note: The invocation of the deferred method is dependent on a successful commit of the the caller's transaction context. If the calling method's transaction rolls back, the deferred process will not be invoked.

Setting curam.test.stubdeferredprocessinsametransaction property to true ensures that the deferred processes gets invoked in the same transaction. If this property is not set, the deferred processes will still be invoked, but in a different transaction.