Skip to main content

Interface: ChildWorkflowOptions

workflow.ChildWorkflowOptions

Hierarchy

Properties

cancellationType

Optional cancellationType: ChildWorkflowCancellationType

Specifies:

  • whether cancellation requests are sent to the Child
  • whether and when an error is thrown from executeChild or result

Default

WAIT_CANCELLATION_COMPLETED


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

CommonWorkflowOptions.cronSchedule


memo

Optional memo: Record<string, any>

Specifies additional non-indexed information to attach to the Workflow Execution. The values can be anything that is serializable by DataConverter.

Inherited from

CommonWorkflowOptions.memo


parentClosePolicy

Optional parentClosePolicy: ParentClosePolicy

Specifies how the Child reacts to the Parent Workflow reaching a Closed state.

Default

PARENT_CLOSE_POLICY_TERMINATE


retry

Optional retry: RetryPolicy

Controls how a Workflow Execution is retried.

By default, Workflow Executions are not retried. Do not override this behavior unless you know what you're doing. More information.

Inherited from

CommonWorkflowOptions.retry


searchAttributes

Optional searchAttributes: SearchAttributes

Specifies additional indexed information to attach to the Workflow Execution. More info: https://docs.temporal.io/docs/typescript/search-attributes

Values are always converted using JsonPayloadConverter, even when a custom data converter is provided.

Inherited from

CommonWorkflowOptions.searchAttributes


taskQueue

Optional 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.


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

CommonWorkflowOptions.workflowExecutionTimeout


workflowId

Optional 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.


workflowIdReusePolicy

Optional workflowIdReusePolicy: WorkflowIdReusePolicy

Whether a Workflow can be started with a Workflow Id of a Closed Workflow.

Note: A Workflow can never be started with a Workflow Id of a Running Workflow.

Default

WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY

Inherited from

CommonWorkflowOptions.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

CommonWorkflowOptions.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

CommonWorkflowOptions.workflowTaskTimeout