Показать сообщение отдельно
Старый 29.08.2021, 05:36   #1  
Blog bot is offline
Blog bot
Участник
 
25,646 / 848 (80) +++++++
Регистрация: 28.10.2006
d365technext: D365FO Batch Job retries
Источник: http://d365technext.blogspot.com/202...b-retries.html
==============



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









Источник: http://d365technext.blogspot.com/202...b-retries.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.