Showing posts with label BatchRetryable. Show all posts
Showing posts with label BatchRetryable. Show all posts

D365FO Batch Job retries

 

Enable automatic retries on batch jobs


In the April/May released, Microsoft introduces the feature to retry the batch job, In the past, if the Finance and Operations apps experience any kind of loss of connection to Microsoft SQL Server, then all batch jobs that are running fail, and the reason is, on Azure if the connection is lost then the recovery is almost impossible.

So, Microsoft introduces an Interface class that will batch to reset itself in case of connection loss or failure.

How you can implement it in your code?

Here is an example if you are using the "RunBaseBatch" class in your batch Job.

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


Support Faryal's Cusine


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...