Skip to content

Retries and Polling

Andre edited this page Oct 25, 2022 · 7 revisions

Retries

Microflow retries is an extension of Durable Function retries. A workflow has a default retry object that can be set. A step can override the default with it`s own retry object that is settable per step. Any steps with no retry object set will use the workflow default retry.

Relevant Workflow Properties

  • RetryOptions RetryOptions : This is the default retry object of the workflow.

Relevant Step Properties

  • RetryOptions RetryOptions : This can be set per step to override the default retry options of the workflow.

Model Classes

public class RetryOptions
{
    public int DelaySeconds { get; set; } = 5;
    public int MaxDelaySeconds { get; set; } = 120;
    public int MaxRetries { get; set; } = 15;
    public double BackoffCoefficient { get; set; } = 5;
    public int TimeOutSeconds { get; set; } = 300;
}

Polling

Microflow will poll in these cases:

  1. When a workflow is paused during execution.
  2. When the maximum allowed concurrent count of a scale group is reached - polling to check if the next step can execute.
  3. When a workflow is started but is paused.
  4. A step call-out can be set to poll by setting AsynchronousPollingEnabled to true. This is the 202 ACCEPTED pattern.

Polling settings can be set in the local.settings.json file. This one set of polling settings is applicable to polling cases 1 to 3 but not to a step`s AsynchronousPollingEnabled property:

"PollingMaxHours": 240,
"PollingIntervalSeconds": 5,
"PollingIntervalMaxSeconds": 15

Relevant Step Properties

  • AsynchronousPollingEnabled bool : If this is set to true, then the step call-out will poll for a result if it receives a 202 accepted reply.