Skip to main content

Step configuration

In this section, you will learn how configure steps.

Step style

Most steps have the option to configure the StepStyle.

StyleDefaultDescription
SuspendYesStep will suspend the execution of the command until the step receives updates or is completed in a final state, saving on resources.
WaitUntilNoThe step will wait until the step is completed in a final state, the step will not receive intermediate updates. Use this style if the command benefits from being kept in memory.

Each kind of step has a default StepStyle:

StepStyle
SleepSuspend
Call tasksSuspend
Create tasksWaitUntil
Run inlineWaitUntil
Wait for external eventsSuspend

Steps in the style of WaitUntil can be suspended when a retry in scheduled due to a case of failure or timeout.

In case of Run inline, the step will retry inline if the retry timeout is less then InlineStepRetryDelayThresholdSec.

Step tracking options

Configures whether intermediate progress and output results are tracked use StepTrackingOptions.

OptionsDefaultDescription
TrackProgresstrueTrack intermediate progress (eg. % of tasks done)
TrackIntermediateResultstrueTrack intermediate results (eg. finished tasks), can be turned of for efficiency.

Step runtime configuration

Steps have the option to pass in the maxDuration directly, without having to specify a StepExecutionOptions argument.

The Run inline step can specify StepExecutionOptions to have further control how the step is executed:

PropertyTypeRequiredDescription
DefaultRetryPolicyRetryPolicyNoDefault retry policy
TimeoutRetryPolicyRetryPolicyNoTimeout retry policy
IntermediateFailureRetryPolicyRetryPolicyNoIntermediate failure retry policy
FailureRetryPolicyRetryPolicyNoFailure retry policy
MaxDurationlongNoMaximum duration in seconds

Step Status

The following step status codes are possible:

StatusDescription
CreatingStep is creating
CreatedStep is created
CreationFailedStep creation has failed
RunningStep is running
SucceededStep is succeeded
TimeoutStep is timed out
FailedStep is failed
CanceledStep is canceled
IntermediateFailureStep has failed in an intermediate state
OutdatedStep is outdated

The status codes Succeeded, Timeout, Failed, Canceled and Outdated are considered final states.

Retry policy

The retry policy configures how steps are retried on completion:

PropertyTypeRequiredDefaultDescription
InitialDelaySecdoubleNo15The delay between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-based approach. If the command provides a retryAfter response, the next retry is delayed by the duration specified by the retryAfter value. (Default: 15 sec, max 7 days).
MaxRunsintNoMax task runs (-1: unlimited, 0: single execution attempt, no retry, >= 1: total number of attempts/retries).
MaximumDelaySecdoubleNo60The maximum delay between retry attempts when the command doesn't provide a retryAfter response. If the service provides a retryAfter response, the next retry is delayed by the duration specified by the header value. (default 60 sec, max 7 days).
RetryModeRetryModeNoExponentialMethod to calculate retry delays (default: Exponential).

Default retry policies

Sleep, Call Tasks, Create Tasks, Wait for External Events

PolicyInitialDelaySecMaxRunsMaximumDelaySecRetryMode
DefaultRetryPolicy2060Exponential
TimeoutRetryPolicy2060Exponential
IntermediateFailureRetryPolicy21060Exponential
FailureRetryPolicy2060Exponential

Inline run

PolicyInitialDelaySecMaxRunsMaximumDelaySecRetryMode
DefaultRetryPolicy1503600Exponential
TimeoutRetryPolicy1553600Exponential
IntermediateFailureRetryPolicy15103600Exponential
FailureRetryPolicy1553600Exponential