Documentation

ChildWorkflowOptions extends Options
in package

FinalYes
Tags
psalm-import-type

DateIntervalValue from DateInterval

Table of Contents

Properties

$cancellationType  : int
In case of a child workflow cancellation it fails with a FailedCancellationException. The type defines at which point the exception is thrown.
$cronSchedule  : string|null
Optional cron schedule for workflow.
$memo  : array<string|int, mixed>|null
Optional non-indexed info that will be shown in list workflow.
$namespace  : string
Namespace of the child workflow.
$parentClosePolicy  : int
Optional policy to decide what to do for the child.
$retryOptions  : RetryOptions|null
RetryPolicy specify how to retry child workflow if error happens.
$searchAttributes  : array<string|int, mixed>|null
Optional indexed info that can be used in query of List/Scan/Count workflow APIs (only supported when Temporal server is using ElasticSearch). The key and value type must be registered on Temporal server side.
$taskQueue  : string
TaskQueue that the child workflow needs to be scheduled on.
$workflowExecutionTimeout  : DateInterval
The end to end timeout for the child workflow execution including retries and continue as new.
$workflowId  : string|null
WorkflowID of the child workflow to be scheduled.
$workflowIdReusePolicy  : int
Whether server allow reuse of workflow ID, can be useful for deduplication logic if set to IdReusePolicy::POLICY_REJECT_DUPLICATE.
$workflowRunTimeout  : DateInterval
The timeout for a single run of the child workflow execution. Each retry or continue as new should obey this timeout.
$workflowTaskTimeout  : DateInterval
The workflow task timeout for the child workflow.

Methods

__construct()  : mixed
mergeWith()  : $this
withChildWorkflowCancellationType()  : $this
The type defines at which point the exception is thrown.
withCronSchedule()  : $this
Specifies optional cron schedule for workflow.
withMemo()  : $this
Specifies additional non-indexed information in result of list workflow.
withNamespace()  : $this
Specify namespace in which workflow should be started.
withParentClosePolicy()  : $this
Specifies how this workflow reacts to the death of the parent workflow.
withRetryOptions()  : $this
RetryOptions that define how child workflow is retried in case of failure. Default is null which is no reties.
withSearchAttributes()  : $this
Specifies additional indexed information in result of list workflow.
withTaskQueue()  : $this
Task queue to use for workflow tasks. It should match a task queue specified when creating a {@see Worker} that hosts the workflow code.
withWorkflowExecutionTimeout()  : $this
The maximum time that parent workflow is willing to wait for a child execution (which includes retries and continue as new calls). If exceeded the child is automatically terminated by the Temporal service.
withWorkflowId()  : $this
Workflow id to use when starting. If not specified a UUID is generated.
withWorkflowIdReusePolicy()  : $this
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.
withWorkflowRunTimeout()  : $this
The time after which workflow run is automatically terminated by the Temporal service. Do not rely on the run timeout for business level timeouts. It is preferred to use in workflow timers for this purpose.
withWorkflowTaskTimeout()  : $this
Maximum execution time of a single workflow task. Default is 10 seconds.

Properties

$memo

Optional non-indexed info that will be shown in list workflow.

public array<string|int, mixed>|null $memo = null
Tags
psalm-var

array<string, mixed>|null

$namespace

Namespace of the child workflow.

public string $namespace = \Temporal\Client\ClientOptions::DEFAULT_NAMESPACE

Optional: the current workflow (parent)'s namespace will be used if this is not provided.

$parentClosePolicy

Optional policy to decide what to do for the child.

public int $parentClosePolicy = \Temporal\Workflow\ParentClosePolicy::POLICY_TERMINATE

Default is Terminate (if onboarded to this feature).

Tags
psalm-var

ParentClosePolicy::POLICY_*

$retryOptions

RetryPolicy specify how to retry child workflow if error happens.

public RetryOptions|null $retryOptions = null

Optional: default is no retry.

$searchAttributes

Optional indexed info that can be used in query of List/Scan/Count workflow APIs (only supported when Temporal server is using ElasticSearch). The key and value type must be registered on Temporal server side.

public array<string|int, mixed>|null $searchAttributes = null
Tags
psalm-var

array<string, mixed>|null

$taskQueue

TaskQueue that the child workflow needs to be scheduled on.

public string $taskQueue = \Temporal\Worker\WorkerFactoryInterface::DEFAULT_TASK_QUEUE

Optional: the parent workflow task queue will be used if this is not provided.

$workflowExecutionTimeout

The end to end timeout for the child workflow execution including retries and continue as new.

public DateInterval $workflowExecutionTimeout

Optional: defaults is no limit

$workflowId

WorkflowID of the child workflow to be scheduled.

public string|null $workflowId = null

Optional: an auto generated workflowID will be used if this is not provided.

$workflowIdReusePolicy

Whether server allow reuse of workflow ID, can be useful for deduplication logic if set to IdReusePolicy::POLICY_REJECT_DUPLICATE.

public int $workflowIdReusePolicy = \Temporal\Common\IdReusePolicy::POLICY_ALLOW_DUPLICATE_FAILED_ONLY
Tags
see
IdReusePolicy::RejectDuplicate

$workflowRunTimeout

The timeout for a single run of the child workflow execution. Each retry or continue as new should obey this timeout.

public DateInterval $workflowRunTimeout

Use $workflowExecutionTimeout to specify how long the parent is willing to wait for the child completion.

Optional: defaults to $workflowExecutionTimeout

$workflowTaskTimeout

The workflow task timeout for the child workflow.

public DateInterval $workflowTaskTimeout

Optional: default is no limit

Methods

withCronSchedule()

Specifies optional cron schedule for workflow.

public withCronSchedule(string|null $expression) : $this
Parameters
$expression : string|null
Tags
see
CronSchedule::$interval

for more info about cron format.

Return values
$this

withMemo()

Specifies additional non-indexed information in result of list workflow.

public withMemo(array<string|int, mixed>|null $memo) : $this
Parameters
$memo : array<string|int, mixed>|null
Return values
$this

withNamespace()

Specify namespace in which workflow should be started.

public withNamespace(string $namespace) : $this
Parameters
$namespace : string
Return values
$this

withParentClosePolicy()

Specifies how this workflow reacts to the death of the parent workflow.

public withParentClosePolicy(ParentClosePolicy|int $policy) : $this
Parameters
$policy : ParentClosePolicy|int
Tags
psalm-suppress

ImpureMethodCall

Return values
$this

withRetryOptions()

RetryOptions that define how child workflow is retried in case of failure. Default is null which is no reties.

public withRetryOptions(RetryOptions|null $options) : $this
Parameters
$options : RetryOptions|null
Return values
$this

withSearchAttributes()

Specifies additional indexed information in result of list workflow.

public withSearchAttributes(array<string|int, mixed>|null $searchAttributes) : $this
Parameters
$searchAttributes : array<string|int, mixed>|null
Return values
$this

withTaskQueue()

Task queue to use for workflow tasks. It should match a task queue specified when creating a {@see Worker} that hosts the workflow code.

public withTaskQueue(string $taskQueue) : $this
Parameters
$taskQueue : string
Return values
$this

withWorkflowExecutionTimeout()

The maximum time that parent workflow is willing to wait for a child execution (which includes retries and continue as new calls). If exceeded the child is automatically terminated by the Temporal service.

public withWorkflowExecutionTimeout(DateIntervalValue $timeout) : $this
Parameters
$timeout : DateIntervalValue
Tags
psalm-suppress

ImpureMethodCall

Return values
$this

withWorkflowId()

Workflow id to use when starting. If not specified a UUID is generated.

public withWorkflowId(string $workflowId) : $this

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.

Parameters
$workflowId : string
Return values
$this

withWorkflowIdReusePolicy()

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.

public withWorkflowIdReusePolicy(IdReusePolicy|int $policy) : $this
Parameters
$policy : IdReusePolicy|int
Tags
psalm-suppress

ImpureMethodCall

Return values
$this

withWorkflowRunTimeout()

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

public withWorkflowRunTimeout(DateIntervalValue $timeout) : $this
Parameters
$timeout : DateIntervalValue
Tags
psalm-suppress

ImpureMethodCall

Return values
$this

withWorkflowTaskTimeout()

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

public withWorkflowTaskTimeout(DateIntervalValue $timeout) : $this

Maximum accepted value is 60 seconds.

Parameters
$timeout : DateIntervalValue
Tags
psalm-suppress

ImpureMethodCall

Return values
$this

        
On this page

Search results