Skip to main content

Function: continueAsNewRetryOf()

continueAsNewRetryOf(retry): RetryPolicy | RunRetryPolicy

The CONTINUE_AS_NEW options.retry of a ctx.continueAsNew retry option (C-SCHEMA canOptions).

  • An option with an activity-only key (retryDelay, maxRetries, retryOnErrorTypes) is the R1 shape. It is written exactly as R1 wrote it (activity form, defaults filled in), so an R1 workflow issues the same command and keeps its original behaviour: the service ignores that shape.
  • Anything else is a run-level retry policy (R2), checked for unknown keys. Keys both shapes share (maxDelay, backoffMultiplier, nonRetryableErrorTypes) alone mean the R2 shape.
  • Mixing an activity-only key with maxAttempts or initialDelay throws.

Parameters​

retry​

WorkflowRetryOptions | Partial<RetryPolicy>

Returns​

RetryPolicy | RunRetryPolicy