正解:A,D
[A] In Dynamics 365 Finance and Operations, the isRetryable method is part of the BatchRetryable interface, which allows a batch job to automatically retry upon experiencing a transient error, such as a temporary loss of SQL connection. By implementing this interface and returning true from the isRetryable method, a batch job's controller can signal to the batch framework that the operation is safe to retry, enabling the system to attempt it again after an error, thereby reducing the need for manual intervention.
How it Works
1. Interface Implementation: Developers implement the BatchRetryable interface on their custom batch controller class. [D]
2. The isRetryable() Method: This interface requires the implementation of the isRetryable() method, which returns a boolean value.
3. Determining Retry Behavior:
If isRetryable() returns true, the batch framework will automatically retry the job if a transient error occurs.
If it returns false, the batch job will not be retried automatically and will likely require manual intervention.
Note: Retry for SQL transient connection errors
Currently, if finance and operations apps experience a brief loss of connection to Microsoft SQL Server, all batch tasks that are running fail. This behavior disrupts business processes. Because connection loss is inevitable in a cloud service, Microsoft enables automated retries when failures of this type occur.
There are three ways to indicate that a batch class is retryable for SQL transient connection errors:
(1) Implement the BatchRetryable interface on the batch class. The BatchRetryable interface has a single method, isRetryable, that returns a Boolean value. If the value is True, the batch class is retryable. If the value is False, the batch class isn't retryable. The BatchRetryable interface is available as of version 10.0.18 (with Platform update 40). The following example shows how to set isRetryable for a batch class.
//RunBaseBatch
class SampleBatchClass 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; // You can also use false if you do not want to enforce retryable behavior using isRetryable
}
...
}
//SysOperationServiceController
class SampleBatchClass 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; // You can also use false if you do not want to enforce retryable behavior using isRetryable
}
}
Reference:
https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/sysadmin/retryable-batch