Interface: ActivityProxyOptions<A>
workflow.ActivityProxyOptions
Options for proxyActivities, including optional metadata for each proxied Activity.
Type parameters
| Name | Type |
|---|---|
A | UntypedActivities |
Hierarchy
-
↳
ActivityProxyOptions
Properties
activityId
• Optional activityId: string
Identifier to use for tracking the activity in Workflow history.
The activityId can be accessed by the activity function.
Does not need to be unique.
Default
an incremental sequence number
Inherited from
activityTypeInfo
• Optional activityTypeInfo: Partial<Record<ActivityKeys<A>, PayloadTypeInfo>>
Type information keyed by the Activity names exposed by this proxy.
allowEagerDispatch
• Optional allowEagerDispatch: boolean
Eager dispatch is an optimization that improves the throughput and load on the server for scheduling Activities.
When used, the server will hand out Activity tasks back to the Worker when it completes a Workflow task.
It is available from server version 1.17 behind the system.enableActivityEagerExecution feature flag.
Eager dispatch will only be used if allowEagerDispatch is enabled (the default) and taskQueue is either
omitted or the same as the current Workflow.
Default
true
Inherited from
ActivityOptions.allowEagerDispatch
cancellationType
• Optional cancellationType: ActivityCancellationType
Determines:
- whether cancellation requests should be propagated from the current Workflow to the Activity; and
- when should the Activity cancellation be reported to Workflow (i.e. at which moment should the
Activity call's promise fail with an
ActivityFailure, withcauseset to aCancelledFailure).
Note that this setting only applies to cancellation originating from cancellation being
externally requested on the Workflow itself, or from internal cancellation of the
CancellationScope in which the Activity call was made. Termination of a Workflow Execution
always results in cancellation of its outstanding Activity executions, regardless of those
Activities' ActivityCancellationType settings.
Default
ActivityCancellationType.WAIT_CANCELLATION_COMPLETED
Inherited from
ActivityOptions.cancellationType
eventGroups
• Optional eventGroups: EventGroupMarker[]
Event group markers to attach to this activity. The markers will be reflected on the
corresponding workflow history events, and may be used by tooling (UI/CLI) to group
related events together. See EventGroupMarker and createEventGroup in the workflow
package.
Event Groups is an experimental API and may change without notice.
Inherited from
heartbeatTimeout
• Optional heartbeatTimeout: Duration
Heartbeat interval. Activity must heartbeat before this interval passes after a last heartbeat or activity start.
Format
number of milliseconds or ms-formatted string
Inherited from
ActivityOptions.heartbeatTimeout
priority
• Optional priority: Priority
Priority of this activity
Inherited from
retry
• Optional retry: RetryPolicy
RetryPolicy that define how activity is retried in case of failure. If this is not set, then the server-defined default activity retry policy will be used. To ensure zero retries, set maximum attempts to 1.
Inherited from
scheduleToCloseTimeout
• Optional scheduleToCloseTimeout: Duration
Total time that a workflow is willing to wait for the Activity to complete.
scheduleToCloseTimeout limits the total time of an Activity's execution including retries (use startToCloseTimeout to limit the time of a single attempt).
Either this option or startToCloseTimeout is required.
Default
unlimited
Format
number of milliseconds or ms-formatted string
Inherited from
ActivityOptions.scheduleToCloseTimeout
scheduleToStartTimeout
• Optional scheduleToStartTimeout: Duration
Time that the Activity Task can stay in the Task Queue before it is picked up by a Worker. Do not specify this timeout unless using host-specific Task Queues for Activity Tasks are being used for routing.
scheduleToStartTimeout is always non-retryable. Retrying after this timeout doesn't make sense as it would just put the Activity Task back into the same Task Queue.
Default
scheduleToCloseTimeout or unlimited
Format
number of milliseconds or ms-formatted string
Inherited from
ActivityOptions.scheduleToStartTimeout
startToCloseTimeout
• Optional startToCloseTimeout: Duration
Maximum time of a single Activity execution attempt. Note that the Temporal Server doesn't detect Worker process failures directly: instead, it relies on this timeout to detect that an Activity didn't complete on time. Therefore, this timeout should be as short as the longest possible execution of the Activity body. Potentially long-running Activities must specify heartbeatTimeout and call activity.Context.heartbeat periodically for timely failure detection.
Either this option or scheduleToCloseTimeout is required.
Default
scheduleToCloseTimeout or unlimited
Format
number of milliseconds or ms-formatted string
Inherited from
ActivityOptions.startToCloseTimeout
summary
• Optional summary: string
A fixed, single-line summary for this workflow execution that may appear in the UI/CLI. This can be in single-line Temporal markdown format.
Inherited from
taskQueue
• Optional taskQueue: string
Task queue name.
Default
current worker task queue
Inherited from
versioningIntent
• Optional versioningIntent: VersioningIntent
When using the Worker Versioning feature, specifies whether this Activity should run on a worker with a compatible Build Id or not. See VersioningIntent.
Default
'COMPATIBLE'
Deprecated
Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments