Enable automatic retries on batch jobs
class
TestBatchJob extends RunBaseBatch implements BatchRetryable
{
[Wrappable(true), Replaceable(true)] //
Change to meet your customizability requirements
public boolean isRetryable() // Use final
if you want to prevent overriding
{
return true;
}
}
Here is an example if you are using the "SysOperationServiceController" class in your batch Job.
class TestBatchJob extends SysOperationServiceController implements BatchRetryable
{
[Wrappable(true), Replaceable(true)] //
Change to meet your customizability requirements
public boolean isRetryable() // Use final
if you want to prevent overriding
{
return true;
}
}
Important
If you designing a multithreading job and adding the runtime task, then you should implement this interface on both the main controller and the task controller.
If you want to disable the retry of the batch job then add your class in the
Batch class configuration overrides
Overrides setup
This comment has been removed by the author.
ReplyDeleteFor some of the classes the system gives below error:
ReplyDeleteThe batch class DMFImportTaskScheduler has been configured in code to be non-retryable and cannot be overridden.