Skip to main content

Interface: WorkflowOptionsWithDefaults

client.WorkflowOptionsWithDefaults

Hierarchy#

Properties#

cronSchedule#

Optional cronSchedule: string

Optional cron schedule for Workflow. If a cron schedule is specified, the Workflow will run as a cron based on the schedule. The scheduling will be based on UTC time. The schedule for the next run only happens after the current run is completed/failed/timeout. If a RetryPolicy is also supplied, and the Workflow failed or timed out, the Workflow will be retried based on the retry policy. While the Workflow is retrying, it won't schedule its next run. If the next schedule is due while the Workflow is running (or retrying), then it will skip that schedule. Cron Workflow will not stop until it is terminated or cancelled (by returning temporal.CanceledError). https://crontab.guru/ is useful for testing your cron expressions.

Inherited from#

BaseWorkflowOptionsWithDefaults.cronSchedule


followRuns#

followRuns: boolean

If set to true, instructs the client to follow the chain of execution before returning a Workflow's result.

Workflow execution is chained if the Workflow has a cron schedule or continues-as-new or configured to retry after failure or timeout.

default true


memo#

Optional memo: Record<string, any>

Specifies additional non-indexed information in result of list workflow. The type of value can be any object that are serializable by DataConverter.

Inherited from#

BaseWorkflowOptionsWithDefaults.memo


retryPolicy#

Optional retryPolicy: IRetryPolicy

Inherited from#

BaseWorkflowOptionsWithDefaults.retryPolicy


searchAttributes#

Optional searchAttributes: Record<string, string | number | boolean>

Specifies additional indexed information in result of list workflow. The type of value should be a primitive (e.g. string, number, boolean), for dates use Date.toISOString();

Inherited from#

BaseWorkflowOptionsWithDefaults.searchAttributes


taskQueue#

taskQueue: string

Task queue to use for Workflow tasks. It should match a task queue specified when creating a Worker that hosts the Workflow code.

Inherited from#

BaseWorkflowOptionsWithDefaults.taskQueue


workflowExecutionTimeout#

Optional workflowExecutionTimeout: string | number

The time after which workflow execution (which includes run retries and continue as new) is automatically terminated by Temporal service. Do not rely on execution timeout for business level timeouts. It is preferred to use in workflow timers for this purpose.

format ms formatted string or number of milliseconds

Inherited from#

BaseWorkflowOptionsWithDefaults.workflowExecutionTimeout


workflowId#

workflowId: string

Workflow id to use when starting. If not specified a UUID is generated. Note that it is dangerous as in case of client side retries no deduplication will happen based on the generated id. So prefer assigning business meaningful ids if possible.

Inherited from#

BaseWorkflowOptionsWithDefaults.workflowId


workflowIdReusePolicy#

Optional workflowIdReusePolicy: WorkflowIdReusePolicy

Specifies server behavior if a completed workflow with the same id exists. Note that under no conditions Temporal allows two workflows with the same namespace and workflow id run simultaneously. ALLOW_DUPLICATE_FAILED_ONLY is a default value. It means that workflow can start if previous run failed or was canceled or terminated. ALLOW_DUPLICATE allows new run independently of the previous run closure status. REJECT_DUPLICATE doesn't allow new run independently of the previous run closure status.

Inherited from#

BaseWorkflowOptionsWithDefaults.workflowIdReusePolicy


workflowRunTimeout#

Optional workflowRunTimeout: string | number

The time after which workflow run is automatically terminated by Temporal service. Do not rely on run timeout for business level timeouts. It is preferred to use in workflow timers for this purpose.

format ms formatted string or number of milliseconds

Inherited from#

BaseWorkflowOptionsWithDefaults.workflowRunTimeout


workflowTaskTimeout#

Optional workflowTaskTimeout: string | number

Maximum execution time of a single workflow task. Default is 10 seconds.

format ms formatted string or number of milliseconds

Inherited from#

BaseWorkflowOptionsWithDefaults.workflowTaskTimeout