Skip to main content

Class: WorkflowService

workflowservice.v1.WorkflowService

WorkflowService API defines how Temporal SDKs and other clients interact with the Temporal server to create and interact with workflows and activities.

Users are expected to call StartWorkflowExecution to create a new workflow execution.

To drive workflows, a worker using a Temporal SDK must exist which regularly polls for workflow and activity tasks from the service. For each workflow task, the sdk must process the (incremental or complete) event history and respond back with any newly generated commands.

For each activity task, the worker is expected to execute the user's code which implements that activity, responding with completion or failure.

Hierarchy

  • Service

    WorkflowService

Constructors

constructor

new WorkflowService(rpcImpl, requestDelimited?, responseDelimited?): WorkflowService

Constructs a new WorkflowService service.

Parameters

NameTypeDescription
rpcImplRPCImplRPC implementation
requestDelimited?booleanWhether requests are length-delimited
responseDelimited?booleanWhether responses are length-delimited

Returns

WorkflowService

Overrides

$protobuf.rpc.Service.constructor

Properties

requestDelimited

requestDelimited: boolean

Whether requests are length-delimited.

Inherited from

$protobuf.rpc.Service.requestDelimited


responseDelimited

responseDelimited: boolean

Whether responses are length-delimited.

Inherited from

$protobuf.rpc.Service.responseDelimited


rpcImpl

rpcImpl: null | RPCImpl

RPC implementation. Becomes null once the service is ended.

Inherited from

$protobuf.rpc.Service.rpcImpl

Methods

countWorkflowExecutions

countWorkflowExecutions(request, callback): void

CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.

Parameters

NameTypeDescription
requestICountWorkflowExecutionsRequestCountWorkflowExecutionsRequest message or plain object
callbackCountWorkflowExecutionsCallbackNode-style callback called with the error, if any, and CountWorkflowExecutionsResponse

Returns

void

countWorkflowExecutions(request): Promise<CountWorkflowExecutionsResponse>

CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.

Parameters

NameTypeDescription
requestICountWorkflowExecutionsRequestCountWorkflowExecutionsRequest message or plain object

Returns

Promise<CountWorkflowExecutionsResponse>

Promise


createSchedule

createSchedule(request, callback): void

Creates a new schedule.

Parameters

NameTypeDescription
requestICreateScheduleRequestCreateScheduleRequest message or plain object
callbackCreateScheduleCallbackNode-style callback called with the error, if any, and CreateScheduleResponse

Returns

void

createSchedule(request): Promise<CreateScheduleResponse>

Creates a new schedule.

Parameters

NameTypeDescription
requestICreateScheduleRequestCreateScheduleRequest message or plain object

Returns

Promise<CreateScheduleResponse>

Promise


deleteSchedule

deleteSchedule(request, callback): void

Deletes a schedule, removing it from the system.

Parameters

NameTypeDescription
requestIDeleteScheduleRequestDeleteScheduleRequest message or plain object
callbackDeleteScheduleCallbackNode-style callback called with the error, if any, and DeleteScheduleResponse

Returns

void

deleteSchedule(request): Promise<DeleteScheduleResponse>

Deletes a schedule, removing it from the system.

Parameters

NameTypeDescription
requestIDeleteScheduleRequestDeleteScheduleRequest message or plain object

Returns

Promise<DeleteScheduleResponse>

Promise


deleteWorkflowExecution

deleteWorkflowExecution(request, callback): void

DeleteWorkflowExecution asynchronously deletes a specific Workflow Execution (when WorkflowExecution.run_id is provided) or the latest Workflow Execution (when WorkflowExecution.run_id is not provided). If the Workflow Execution is Running, it will be terminated before deletion.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --)

Parameters

NameTypeDescription
requestIDeleteWorkflowExecutionRequestDeleteWorkflowExecutionRequest message or plain object
callbackDeleteWorkflowExecutionCallbackNode-style callback called with the error, if any, and DeleteWorkflowExecutionResponse

Returns

void

deleteWorkflowExecution(request): Promise<DeleteWorkflowExecutionResponse>

DeleteWorkflowExecution asynchronously deletes a specific Workflow Execution (when WorkflowExecution.run_id is provided) or the latest Workflow Execution (when WorkflowExecution.run_id is not provided). If the Workflow Execution is Running, it will be terminated before deletion.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --)

Parameters

NameTypeDescription
requestIDeleteWorkflowExecutionRequestDeleteWorkflowExecutionRequest message or plain object

Returns

Promise<DeleteWorkflowExecutionResponse>

Promise


deprecateNamespace

deprecateNamespace(request, callback): void

DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED.

Once the namespace is deprecated it cannot be used to start new workflow executions. Existing workflow executions will continue to run on deprecated namespaces. Deprecated.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Deprecated --)

Parameters

NameTypeDescription
requestIDeprecateNamespaceRequestDeprecateNamespaceRequest message or plain object
callbackDeprecateNamespaceCallbackNode-style callback called with the error, if any, and DeprecateNamespaceResponse

Returns

void

deprecateNamespace(request): Promise<DeprecateNamespaceResponse>

DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED.

Once the namespace is deprecated it cannot be used to start new workflow executions. Existing workflow executions will continue to run on deprecated namespaces. Deprecated.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Deprecated --)

Parameters

NameTypeDescription
requestIDeprecateNamespaceRequestDeprecateNamespaceRequest message or plain object

Returns

Promise<DeprecateNamespaceResponse>

Promise


describeBatchOperation

describeBatchOperation(request, callback): void

DescribeBatchOperation returns the information about a batch operation

Parameters

NameTypeDescription
requestIDescribeBatchOperationRequestDescribeBatchOperationRequest message or plain object
callbackDescribeBatchOperationCallbackNode-style callback called with the error, if any, and DescribeBatchOperationResponse

Returns

void

describeBatchOperation(request): Promise<DescribeBatchOperationResponse>

DescribeBatchOperation returns the information about a batch operation

Parameters

NameTypeDescription
requestIDescribeBatchOperationRequestDescribeBatchOperationRequest message or plain object

Returns

Promise<DescribeBatchOperationResponse>

Promise


describeNamespace

describeNamespace(request, callback): void

DescribeNamespace returns the information and configuration for a registered namespace.

Parameters

NameTypeDescription
requestIDescribeNamespaceRequestDescribeNamespaceRequest message or plain object
callbackDescribeNamespaceCallbackNode-style callback called with the error, if any, and DescribeNamespaceResponse

Returns

void

describeNamespace(request): Promise<DescribeNamespaceResponse>

DescribeNamespace returns the information and configuration for a registered namespace.

Parameters

NameTypeDescription
requestIDescribeNamespaceRequestDescribeNamespaceRequest message or plain object

Returns

Promise<DescribeNamespaceResponse>

Promise


describeSchedule

describeSchedule(request, callback): void

Returns the schedule description and current state of an existing schedule.

Parameters

NameTypeDescription
requestIDescribeScheduleRequestDescribeScheduleRequest message or plain object
callbackDescribeScheduleCallbackNode-style callback called with the error, if any, and DescribeScheduleResponse

Returns

void

describeSchedule(request): Promise<DescribeScheduleResponse>

Returns the schedule description and current state of an existing schedule.

Parameters

NameTypeDescription
requestIDescribeScheduleRequestDescribeScheduleRequest message or plain object

Returns

Promise<DescribeScheduleResponse>

Promise


describeTaskQueue

describeTaskQueue(request, callback): void

DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID:

  • List of pollers
  • Workflow Reachability status
  • Backlog info for Workflow and/or Activity tasks

Parameters

NameTypeDescription
requestIDescribeTaskQueueRequestDescribeTaskQueueRequest message or plain object
callbackDescribeTaskQueueCallbackNode-style callback called with the error, if any, and DescribeTaskQueueResponse

Returns

void

describeTaskQueue(request): Promise<DescribeTaskQueueResponse>

DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID:

  • List of pollers
  • Workflow Reachability status
  • Backlog info for Workflow and/or Activity tasks

Parameters

NameTypeDescription
requestIDescribeTaskQueueRequestDescribeTaskQueueRequest message or plain object

Returns

Promise<DescribeTaskQueueResponse>

Promise


describeWorkflowExecution

describeWorkflowExecution(request, callback): void

DescribeWorkflowExecution returns information about the specified workflow execution.

Parameters

NameTypeDescription
requestIDescribeWorkflowExecutionRequestDescribeWorkflowExecutionRequest message or plain object
callbackDescribeWorkflowExecutionCallbackNode-style callback called with the error, if any, and DescribeWorkflowExecutionResponse

Returns

void

describeWorkflowExecution(request): Promise<DescribeWorkflowExecutionResponse>

DescribeWorkflowExecution returns information about the specified workflow execution.

Parameters

NameTypeDescription
requestIDescribeWorkflowExecutionRequestDescribeWorkflowExecutionRequest message or plain object

Returns

Promise<DescribeWorkflowExecutionResponse>

Promise


emit

emit(evt, ...args): this

Emits an event by calling its listeners with the specified arguments.

Parameters

NameTypeDescription
evtstringEvent name
...argsany[]Arguments

Returns

this

this

Inherited from

$protobuf.rpc.Service.emit


end

end(endedByRPC?): Service

Ends this service and emits the end event.

Parameters

NameTypeDescription
endedByRPC?booleanWhether the service has been ended by the RPC implementation.

Returns

Service

this

Inherited from

$protobuf.rpc.Service.end


executeMultiOperation

executeMultiOperation(request, callback): void

ExecuteMultiOperation executes multiple operations within a single workflow.

Operations are started atomically, meaning if any operation fails to be started, none are, and the request fails. Upon start, the API returns only when all operations have a response.

Upon failure, it returns MultiOperationExecutionFailure where the status code equals the status code of the first operation that failed to be started.

NOTE: Experimental API.

Parameters

NameTypeDescription
requestIExecuteMultiOperationRequestExecuteMultiOperationRequest message or plain object
callbackExecuteMultiOperationCallbackNode-style callback called with the error, if any, and ExecuteMultiOperationResponse

Returns

void

executeMultiOperation(request): Promise<ExecuteMultiOperationResponse>

ExecuteMultiOperation executes multiple operations within a single workflow.

Operations are started atomically, meaning if any operation fails to be started, none are, and the request fails. Upon start, the API returns only when all operations have a response.

Upon failure, it returns MultiOperationExecutionFailure where the status code equals the status code of the first operation that failed to be started.

NOTE: Experimental API.

Parameters

NameTypeDescription
requestIExecuteMultiOperationRequestExecuteMultiOperationRequest message or plain object

Returns

Promise<ExecuteMultiOperationResponse>

Promise


getClusterInfo

getClusterInfo(request, callback): void

GetClusterInfo returns information about temporal cluster

Parameters

NameTypeDescription
requestIGetClusterInfoRequestGetClusterInfoRequest message or plain object
callbackGetClusterInfoCallbackNode-style callback called with the error, if any, and GetClusterInfoResponse

Returns

void

getClusterInfo(request): Promise<GetClusterInfoResponse>

GetClusterInfo returns information about temporal cluster

Parameters

NameTypeDescription
requestIGetClusterInfoRequestGetClusterInfoRequest message or plain object

Returns

Promise<GetClusterInfoResponse>

Promise


getSearchAttributes

getSearchAttributes(request, callback): void

GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this search attribute API to HTTP (but may expose on OperatorService). --)

Parameters

NameTypeDescription
requestIGetSearchAttributesRequestGetSearchAttributesRequest message or plain object
callbackGetSearchAttributesCallbackNode-style callback called with the error, if any, and GetSearchAttributesResponse

Returns

void

getSearchAttributes(request): Promise<GetSearchAttributesResponse>

GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this search attribute API to HTTP (but may expose on OperatorService). --)

Parameters

NameTypeDescription
requestIGetSearchAttributesRequestGetSearchAttributesRequest message or plain object

Returns

Promise<GetSearchAttributesResponse>

Promise


getSystemInfo

getSystemInfo(request, callback): void

GetSystemInfo returns information about the system.

Parameters

NameTypeDescription
requestIGetSystemInfoRequestGetSystemInfoRequest message or plain object
callbackGetSystemInfoCallbackNode-style callback called with the error, if any, and GetSystemInfoResponse

Returns

void

getSystemInfo(request): Promise<GetSystemInfoResponse>

GetSystemInfo returns information about the system.

Parameters

NameTypeDescription
requestIGetSystemInfoRequestGetSystemInfoRequest message or plain object

Returns

Promise<GetSystemInfoResponse>

Promise


getWorkerBuildIdCompatibility

getWorkerBuildIdCompatibility(request, callback): void

Deprecated. Use GetWorkerVersioningRules. Fetches the worker build id versioning sets for a task queue.

Parameters

NameTypeDescription
requestIGetWorkerBuildIdCompatibilityRequestGetWorkerBuildIdCompatibilityRequest message or plain object
callbackGetWorkerBuildIdCompatibilityCallbackNode-style callback called with the error, if any, and GetWorkerBuildIdCompatibilityResponse

Returns

void

getWorkerBuildIdCompatibility(request): Promise<GetWorkerBuildIdCompatibilityResponse>

Deprecated. Use GetWorkerVersioningRules. Fetches the worker build id versioning sets for a task queue.

Parameters

NameTypeDescription
requestIGetWorkerBuildIdCompatibilityRequestGetWorkerBuildIdCompatibilityRequest message or plain object

Returns

Promise<GetWorkerBuildIdCompatibilityResponse>

Promise


getWorkerTaskReachability

getWorkerTaskReachability(request, callback): void

Deprecated. Use DescribeTaskQueue.

Fetches task reachability to determine whether a worker may be retired. The request may specify task queues to query for or let the server fetch all task queues mapped to the given build IDs.

When requesting a large number of task queues or all task queues associated with the given build ids in a namespace, all task queues will be listed in the response but some of them may not contain reachability information due to a server enforced limit. When reaching the limit, task queues that reachability information could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue another call to get the reachability for those task queues.

Open source users can adjust this limit by setting the server's dynamic config value for limit.reachabilityTaskQueueScan with the caveat that this call can strain the visibility store.

Parameters

NameTypeDescription
requestIGetWorkerTaskReachabilityRequestGetWorkerTaskReachabilityRequest message or plain object
callbackGetWorkerTaskReachabilityCallbackNode-style callback called with the error, if any, and GetWorkerTaskReachabilityResponse

Returns

void

getWorkerTaskReachability(request): Promise<GetWorkerTaskReachabilityResponse>

Deprecated. Use DescribeTaskQueue.

Fetches task reachability to determine whether a worker may be retired. The request may specify task queues to query for or let the server fetch all task queues mapped to the given build IDs.

When requesting a large number of task queues or all task queues associated with the given build ids in a namespace, all task queues will be listed in the response but some of them may not contain reachability information due to a server enforced limit. When reaching the limit, task queues that reachability information could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue another call to get the reachability for those task queues.

Open source users can adjust this limit by setting the server's dynamic config value for limit.reachabilityTaskQueueScan with the caveat that this call can strain the visibility store.

Parameters

NameTypeDescription
requestIGetWorkerTaskReachabilityRequestGetWorkerTaskReachabilityRequest message or plain object

Returns

Promise<GetWorkerTaskReachabilityResponse>

Promise


getWorkerVersioningRules

getWorkerVersioningRules(request, callback): void

Fetches the Build ID assignment and redirect rules for a Task Queue. WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly.

Parameters

NameTypeDescription
requestIGetWorkerVersioningRulesRequestGetWorkerVersioningRulesRequest message or plain object
callbackGetWorkerVersioningRulesCallbackNode-style callback called with the error, if any, and GetWorkerVersioningRulesResponse

Returns

void

getWorkerVersioningRules(request): Promise<GetWorkerVersioningRulesResponse>

Fetches the Build ID assignment and redirect rules for a Task Queue. WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly.

Parameters

NameTypeDescription
requestIGetWorkerVersioningRulesRequestGetWorkerVersioningRulesRequest message or plain object

Returns

Promise<GetWorkerVersioningRulesResponse>

Promise


getWorkflowExecutionHistory

getWorkflowExecutionHistory(request, callback): void

GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with NotFound if the specified workflow execution is unknown to the service.

Parameters

NameTypeDescription
requestIGetWorkflowExecutionHistoryRequestGetWorkflowExecutionHistoryRequest message or plain object
callbackGetWorkflowExecutionHistoryCallbackNode-style callback called with the error, if any, and GetWorkflowExecutionHistoryResponse

Returns

void

getWorkflowExecutionHistory(request): Promise<GetWorkflowExecutionHistoryResponse>

GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with NotFound if the specified workflow execution is unknown to the service.

Parameters

NameTypeDescription
requestIGetWorkflowExecutionHistoryRequestGetWorkflowExecutionHistoryRequest message or plain object

Returns

Promise<GetWorkflowExecutionHistoryResponse>

Promise


getWorkflowExecutionHistoryReverse

getWorkflowExecutionHistoryReverse(request, callback): void

GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse order (starting from last event). Fails withNotFound if the specified workflow execution is unknown to the service.

Parameters

NameTypeDescription
requestIGetWorkflowExecutionHistoryReverseRequestGetWorkflowExecutionHistoryReverseRequest message or plain object
callbackGetWorkflowExecutionHistoryReverseCallbackNode-style callback called with the error, if any, and GetWorkflowExecutionHistoryReverseResponse

Returns

void

getWorkflowExecutionHistoryReverse(request): Promise<GetWorkflowExecutionHistoryReverseResponse>

GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse order (starting from last event). Fails withNotFound if the specified workflow execution is unknown to the service.

Parameters

NameTypeDescription
requestIGetWorkflowExecutionHistoryReverseRequestGetWorkflowExecutionHistoryReverseRequest message or plain object

Returns

Promise<GetWorkflowExecutionHistoryReverseResponse>

Promise


listArchivedWorkflowExecutions

listArchivedWorkflowExecutions(request, callback): void

ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.

Parameters

NameTypeDescription
requestIListArchivedWorkflowExecutionsRequestListArchivedWorkflowExecutionsRequest message or plain object
callbackListArchivedWorkflowExecutionsCallbackNode-style callback called with the error, if any, and ListArchivedWorkflowExecutionsResponse

Returns

void

listArchivedWorkflowExecutions(request): Promise<ListArchivedWorkflowExecutionsResponse>

ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.

Parameters

NameTypeDescription
requestIListArchivedWorkflowExecutionsRequestListArchivedWorkflowExecutionsRequest message or plain object

Returns

Promise<ListArchivedWorkflowExecutionsResponse>

Promise


listBatchOperations

listBatchOperations(request, callback): void

ListBatchOperations returns a list of batch operations

Parameters

NameTypeDescription
requestIListBatchOperationsRequestListBatchOperationsRequest message or plain object
callbackListBatchOperationsCallbackNode-style callback called with the error, if any, and ListBatchOperationsResponse

Returns

void

listBatchOperations(request): Promise<ListBatchOperationsResponse>

ListBatchOperations returns a list of batch operations

Parameters

NameTypeDescription
requestIListBatchOperationsRequestListBatchOperationsRequest message or plain object

Returns

Promise<ListBatchOperationsResponse>

Promise


listClosedWorkflowExecutions

listClosedWorkflowExecutions(request, callback): void

ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --)

Parameters

NameTypeDescription
requestIListClosedWorkflowExecutionsRequestListClosedWorkflowExecutionsRequest message or plain object
callbackListClosedWorkflowExecutionsCallbackNode-style callback called with the error, if any, and ListClosedWorkflowExecutionsResponse

Returns

void

listClosedWorkflowExecutions(request): Promise<ListClosedWorkflowExecutionsResponse>

ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --)

Parameters

NameTypeDescription
requestIListClosedWorkflowExecutionsRequestListClosedWorkflowExecutionsRequest message or plain object

Returns

Promise<ListClosedWorkflowExecutionsResponse>

Promise


listNamespaces

listNamespaces(request, callback): void

ListNamespaces returns the information and configuration for all namespaces.

Parameters

NameTypeDescription
requestIListNamespacesRequestListNamespacesRequest message or plain object
callbackListNamespacesCallbackNode-style callback called with the error, if any, and ListNamespacesResponse

Returns

void

listNamespaces(request): Promise<ListNamespacesResponse>

ListNamespaces returns the information and configuration for all namespaces.

Parameters

NameTypeDescription
requestIListNamespacesRequestListNamespacesRequest message or plain object

Returns

Promise<ListNamespacesResponse>

Promise


listOpenWorkflowExecutions

listOpenWorkflowExecutions(request, callback): void

ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --)

Parameters

NameTypeDescription
requestIListOpenWorkflowExecutionsRequestListOpenWorkflowExecutionsRequest message or plain object
callbackListOpenWorkflowExecutionsCallbackNode-style callback called with the error, if any, and ListOpenWorkflowExecutionsResponse

Returns

void

listOpenWorkflowExecutions(request): Promise<ListOpenWorkflowExecutionsResponse>

ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --)

Parameters

NameTypeDescription
requestIListOpenWorkflowExecutionsRequestListOpenWorkflowExecutionsRequest message or plain object

Returns

Promise<ListOpenWorkflowExecutionsResponse>

Promise


listScheduleMatchingTimes

listScheduleMatchingTimes(request, callback): void

Lists matching times within a range.

Parameters

NameTypeDescription
requestIListScheduleMatchingTimesRequestListScheduleMatchingTimesRequest message or plain object
callbackListScheduleMatchingTimesCallbackNode-style callback called with the error, if any, and ListScheduleMatchingTimesResponse

Returns

void

listScheduleMatchingTimes(request): Promise<ListScheduleMatchingTimesResponse>

Lists matching times within a range.

Parameters

NameTypeDescription
requestIListScheduleMatchingTimesRequestListScheduleMatchingTimesRequest message or plain object

Returns

Promise<ListScheduleMatchingTimesResponse>

Promise


listSchedules

listSchedules(request, callback): void

List all schedules in a namespace.

Parameters

NameTypeDescription
requestIListSchedulesRequestListSchedulesRequest message or plain object
callbackListSchedulesCallbackNode-style callback called with the error, if any, and ListSchedulesResponse

Returns

void

listSchedules(request): Promise<ListSchedulesResponse>

List all schedules in a namespace.

Parameters

NameTypeDescription
requestIListSchedulesRequestListSchedulesRequest message or plain object

Returns

Promise<ListSchedulesResponse>

Promise


listTaskQueuePartitions

listTaskQueuePartitions(request, callback): void

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this low-level API to HTTP. --)

Parameters

NameTypeDescription
requestIListTaskQueuePartitionsRequestListTaskQueuePartitionsRequest message or plain object
callbackListTaskQueuePartitionsCallbackNode-style callback called with the error, if any, and ListTaskQueuePartitionsResponse

Returns

void

listTaskQueuePartitions(request): Promise<ListTaskQueuePartitionsResponse>

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this low-level API to HTTP. --)

Parameters

NameTypeDescription
requestIListTaskQueuePartitionsRequestListTaskQueuePartitionsRequest message or plain object

Returns

Promise<ListTaskQueuePartitionsResponse>

Promise


listWorkflowExecutions

listWorkflowExecutions(request, callback): void

ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.

Parameters

NameTypeDescription
requestIListWorkflowExecutionsRequestListWorkflowExecutionsRequest message or plain object
callbackListWorkflowExecutionsCallbackNode-style callback called with the error, if any, and ListWorkflowExecutionsResponse

Returns

void

listWorkflowExecutions(request): Promise<ListWorkflowExecutionsResponse>

ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.

Parameters

NameTypeDescription
requestIListWorkflowExecutionsRequestListWorkflowExecutionsRequest message or plain object

Returns

Promise<ListWorkflowExecutionsResponse>

Promise


off

off(evt?, fn?): this

Removes an event listener or any matching listeners if arguments are omitted.

Parameters

NameTypeDescription
evt?stringEvent name. Removes all listeners if omitted.
fn?EventEmitterListenerListener to remove. Removes all listeners of evt if omitted.

Returns

this

this

Inherited from

$protobuf.rpc.Service.off


on

on(evt, fn, ctx?): this

Registers an event listener.

Parameters

NameTypeDescription
evtstringEvent name
fnEventEmitterListenerListener
ctx?anyListener context

Returns

this

this

Inherited from

$protobuf.rpc.Service.on


patchSchedule

patchSchedule(request, callback): void

Makes a specific change to a schedule or triggers an immediate action.

Parameters

NameTypeDescription
requestIPatchScheduleRequestPatchScheduleRequest message or plain object
callbackPatchScheduleCallbackNode-style callback called with the error, if any, and PatchScheduleResponse

Returns

void

patchSchedule(request): Promise<PatchScheduleResponse>

Makes a specific change to a schedule or triggers an immediate action.

Parameters

NameTypeDescription
requestIPatchScheduleRequestPatchScheduleRequest message or plain object

Returns

Promise<PatchScheduleResponse>

Promise


pauseActivityById

pauseActivityById(request, callback): void

PauseActivityById pauses the execution of an activity specified by its ID. Returns a NotFound error if there is no pending activity with the provided ID.

Pausing an activity means:

  • If the activity is currently waiting for a retry or is running and subsequently fails, it will not be rescheduled until it is unpaused.
  • If the activity is already paused, calling this method will have no effect.
  • If the activity is running and finishes successfully, the activity will be completed.
  • If the activity is running and finishes with failure:
  • if there is no retry left - the activity will be completed.
  • if there are more retries left - the activity will be paused. For long-running activities:
  • activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'.
  • The activity should respond to the cancellation accordingly. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIPauseActivityByIdRequestPauseActivityByIdRequest message or plain object
callbackPauseActivityByIdCallbackNode-style callback called with the error, if any, and PauseActivityByIdResponse

Returns

void

pauseActivityById(request): Promise<PauseActivityByIdResponse>

PauseActivityById pauses the execution of an activity specified by its ID. Returns a NotFound error if there is no pending activity with the provided ID.

Pausing an activity means:

  • If the activity is currently waiting for a retry or is running and subsequently fails, it will not be rescheduled until it is unpaused.
  • If the activity is already paused, calling this method will have no effect.
  • If the activity is running and finishes successfully, the activity will be completed.
  • If the activity is running and finishes with failure:
  • if there is no retry left - the activity will be completed.
  • if there are more retries left - the activity will be paused. For long-running activities:
  • activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'.
  • The activity should respond to the cancellation accordingly. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIPauseActivityByIdRequestPauseActivityByIdRequest message or plain object

Returns

Promise<PauseActivityByIdResponse>

Promise


pollActivityTaskQueue

pollActivityTaskQueue(request, callback): void

PollActivityTaskQueue is called by workers to process activity tasks from a specific task queue.

The worker is expected to call one of the RespondActivityTaskXXX methods when it is done processing the task.

An activity task is dispatched whenever a SCHEDULE_ACTIVITY_TASK command is produced during workflow execution. An in memory ACTIVITY_TASK_STARTED event is written to mutable state before the task is dispatched to the worker. The started event, and the final event (ACTIVITY_TASK_COMPLETED / ACTIVITY_TASK_FAILED / ACTIVITY_TASK_TIMED_OUT) will both be written permanently to Workflow execution history when Activity is finished. This is done to avoid writing many events in the case of a failure/retry loop.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIPollActivityTaskQueueRequestPollActivityTaskQueueRequest message or plain object
callbackPollActivityTaskQueueCallbackNode-style callback called with the error, if any, and PollActivityTaskQueueResponse

Returns

void

pollActivityTaskQueue(request): Promise<PollActivityTaskQueueResponse>

PollActivityTaskQueue is called by workers to process activity tasks from a specific task queue.

The worker is expected to call one of the RespondActivityTaskXXX methods when it is done processing the task.

An activity task is dispatched whenever a SCHEDULE_ACTIVITY_TASK command is produced during workflow execution. An in memory ACTIVITY_TASK_STARTED event is written to mutable state before the task is dispatched to the worker. The started event, and the final event (ACTIVITY_TASK_COMPLETED / ACTIVITY_TASK_FAILED / ACTIVITY_TASK_TIMED_OUT) will both be written permanently to Workflow execution history when Activity is finished. This is done to avoid writing many events in the case of a failure/retry loop.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIPollActivityTaskQueueRequestPollActivityTaskQueueRequest message or plain object

Returns

Promise<PollActivityTaskQueueResponse>

Promise


pollNexusTaskQueue

pollNexusTaskQueue(request, callback): void

PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIPollNexusTaskQueueRequestPollNexusTaskQueueRequest message or plain object
callbackPollNexusTaskQueueCallbackNode-style callback called with the error, if any, and PollNexusTaskQueueResponse

Returns

void

pollNexusTaskQueue(request): Promise<PollNexusTaskQueueResponse>

PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIPollNexusTaskQueueRequestPollNexusTaskQueueRequest message or plain object

Returns

Promise<PollNexusTaskQueueResponse>

Promise


pollWorkflowExecutionUpdate

pollWorkflowExecutionUpdate(request, callback): void

Polls a Workflow Execution for the outcome of a Workflow Update previously issued through the UpdateWorkflowExecution RPC. The effective timeout on this call will be shorter of the the caller-supplied gRPC timeout and the server's configured long-poll timeout.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --)

Parameters

NameTypeDescription
requestIPollWorkflowExecutionUpdateRequestPollWorkflowExecutionUpdateRequest message or plain object
callbackPollWorkflowExecutionUpdateCallbackNode-style callback called with the error, if any, and PollWorkflowExecutionUpdateResponse

Returns

void

pollWorkflowExecutionUpdate(request): Promise<PollWorkflowExecutionUpdateResponse>

Polls a Workflow Execution for the outcome of a Workflow Update previously issued through the UpdateWorkflowExecution RPC. The effective timeout on this call will be shorter of the the caller-supplied gRPC timeout and the server's configured long-poll timeout.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --)

Parameters

NameTypeDescription
requestIPollWorkflowExecutionUpdateRequestPollWorkflowExecutionUpdateRequest message or plain object

Returns

Promise<PollWorkflowExecutionUpdateResponse>

Promise


pollWorkflowTaskQueue

pollWorkflowTaskQueue(request, callback): void

PollWorkflowTaskQueue is called by workers to make progress on workflows.

A WorkflowTask is dispatched to callers for active workflow executions with pending workflow tasks. The worker is expected to call RespondWorkflowTaskCompleted when it is done processing the task. The service will create a WorkflowTaskStarted event in the history for this task before handing it to the worker.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIPollWorkflowTaskQueueRequestPollWorkflowTaskQueueRequest message or plain object
callbackPollWorkflowTaskQueueCallbackNode-style callback called with the error, if any, and PollWorkflowTaskQueueResponse

Returns

void

pollWorkflowTaskQueue(request): Promise<PollWorkflowTaskQueueResponse>

PollWorkflowTaskQueue is called by workers to make progress on workflows.

A WorkflowTask is dispatched to callers for active workflow executions with pending workflow tasks. The worker is expected to call RespondWorkflowTaskCompleted when it is done processing the task. The service will create a WorkflowTaskStarted event in the history for this task before handing it to the worker.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIPollWorkflowTaskQueueRequestPollWorkflowTaskQueueRequest message or plain object

Returns

Promise<PollWorkflowTaskQueueResponse>

Promise


queryWorkflow

queryWorkflow(request, callback): void

QueryWorkflow requests a query be executed for a specified workflow execution.

Parameters

NameTypeDescription
requestIQueryWorkflowRequestQueryWorkflowRequest message or plain object
callbackQueryWorkflowCallbackNode-style callback called with the error, if any, and QueryWorkflowResponse

Returns

void

queryWorkflow(request): Promise<QueryWorkflowResponse>

QueryWorkflow requests a query be executed for a specified workflow execution.

Parameters

NameTypeDescription
requestIQueryWorkflowRequestQueryWorkflowRequest message or plain object

Returns

Promise<QueryWorkflowResponse>

Promise


recordActivityTaskHeartbeat

recordActivityTaskHeartbeat(request, callback): void

RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.

If worker fails to heartbeat within the heartbeat_timeout interval for the activity task, then it will be marked as timed out and an ACTIVITY_TASK_TIMED_OUT event will be written to the workflow history. Calling RecordActivityTaskHeartbeat will fail with NotFound in such situations, in that event, the SDK should request cancellation of the activity.

Parameters

NameTypeDescription
requestIRecordActivityTaskHeartbeatRequestRecordActivityTaskHeartbeatRequest message or plain object
callbackRecordActivityTaskHeartbeatCallbackNode-style callback called with the error, if any, and RecordActivityTaskHeartbeatResponse

Returns

void

recordActivityTaskHeartbeat(request): Promise<RecordActivityTaskHeartbeatResponse>

RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.

If worker fails to heartbeat within the heartbeat_timeout interval for the activity task, then it will be marked as timed out and an ACTIVITY_TASK_TIMED_OUT event will be written to the workflow history. Calling RecordActivityTaskHeartbeat will fail with NotFound in such situations, in that event, the SDK should request cancellation of the activity.

Parameters

NameTypeDescription
requestIRecordActivityTaskHeartbeatRequestRecordActivityTaskHeartbeatRequest message or plain object

Returns

Promise<RecordActivityTaskHeartbeatResponse>

Promise


recordActivityTaskHeartbeatById

recordActivityTaskHeartbeatById(request, callback): void

See RecordActivityTaskHeartbeat. This version allows clients to record heartbeats by namespace/workflow id/activity id instead of task token.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIRecordActivityTaskHeartbeatByIdRequestRecordActivityTaskHeartbeatByIdRequest message or plain object
callbackRecordActivityTaskHeartbeatByIdCallbackNode-style callback called with the error, if any, and RecordActivityTaskHeartbeatByIdResponse

Returns

void

recordActivityTaskHeartbeatById(request): Promise<RecordActivityTaskHeartbeatByIdResponse>

See RecordActivityTaskHeartbeat. This version allows clients to record heartbeats by namespace/workflow id/activity id instead of task token.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIRecordActivityTaskHeartbeatByIdRequestRecordActivityTaskHeartbeatByIdRequest message or plain object

Returns

Promise<RecordActivityTaskHeartbeatByIdResponse>

Promise


registerNamespace

registerNamespace(request, callback): void

RegisterNamespace creates a new namespace which can be used as a container for all resources.

A Namespace is a top level entity within Temporal, and is used as a container for resources like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides isolation for all resources within the namespace. All resources belongs to exactly one namespace.

Parameters

NameTypeDescription
requestIRegisterNamespaceRequestRegisterNamespaceRequest message or plain object
callbackRegisterNamespaceCallbackNode-style callback called with the error, if any, and RegisterNamespaceResponse

Returns

void

registerNamespace(request): Promise<RegisterNamespaceResponse>

RegisterNamespace creates a new namespace which can be used as a container for all resources.

A Namespace is a top level entity within Temporal, and is used as a container for resources like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides isolation for all resources within the namespace. All resources belongs to exactly one namespace.

Parameters

NameTypeDescription
requestIRegisterNamespaceRequestRegisterNamespaceRequest message or plain object

Returns

Promise<RegisterNamespaceResponse>

Promise


requestCancelWorkflowExecution

requestCancelWorkflowExecution(request, callback): void

RequestCancelWorkflowExecution is called by workers when they want to request cancellation of a workflow execution.

This results in a new WORKFLOW_EXECUTION_CANCEL_REQUESTED event being written to the workflow history and a new workflow task created for the workflow. It returns success if the requested workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist.

Parameters

NameTypeDescription
requestIRequestCancelWorkflowExecutionRequestRequestCancelWorkflowExecutionRequest message or plain object
callbackRequestCancelWorkflowExecutionCallbackNode-style callback called with the error, if any, and RequestCancelWorkflowExecutionResponse

Returns

void

requestCancelWorkflowExecution(request): Promise<RequestCancelWorkflowExecutionResponse>

RequestCancelWorkflowExecution is called by workers when they want to request cancellation of a workflow execution.

This results in a new WORKFLOW_EXECUTION_CANCEL_REQUESTED event being written to the workflow history and a new workflow task created for the workflow. It returns success if the requested workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist.

Parameters

NameTypeDescription
requestIRequestCancelWorkflowExecutionRequestRequestCancelWorkflowExecutionRequest message or plain object

Returns

Promise<RequestCancelWorkflowExecutionResponse>

Promise


resetActivityById

resetActivityById(request, callback): void

ResetActivityById unpauses the execution of an activity specified by its ID. Returns a NotFound error if there is no pending activity with the provided ID. Resetting an activity means:

  • number of attempts will be reset to 0.
  • activity timeouts will be resetted. If the activity currently running:
  • if 'no_wait' flag is provided, a new instance of the activity will be scheduled immediately.
  • if 'no_wait' flag is not provided, a new instance of the activity will be scheduled after current instance completes if needed. If 'reset_heartbeats' flag is set, the activity heartbeat timer and heartbeats will be reset. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIResetActivityByIdRequestResetActivityByIdRequest message or plain object
callbackResetActivityByIdCallbackNode-style callback called with the error, if any, and ResetActivityByIdResponse

Returns

void

resetActivityById(request): Promise<ResetActivityByIdResponse>

ResetActivityById unpauses the execution of an activity specified by its ID. Returns a NotFound error if there is no pending activity with the provided ID. Resetting an activity means:

  • number of attempts will be reset to 0.
  • activity timeouts will be resetted. If the activity currently running:
  • if 'no_wait' flag is provided, a new instance of the activity will be scheduled immediately.
  • if 'no_wait' flag is not provided, a new instance of the activity will be scheduled after current instance completes if needed. If 'reset_heartbeats' flag is set, the activity heartbeat timer and heartbeats will be reset. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIResetActivityByIdRequestResetActivityByIdRequest message or plain object

Returns

Promise<ResetActivityByIdResponse>

Promise


resetStickyTaskQueue

resetStickyTaskQueue(request, callback): void

ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of a given workflow. This is prudent for workers to perform if a workflow has been paged out of their cache.

Things cleared are:

  1. StickyTaskQueue
  2. StickyScheduleToStartTimeout

When possible, ShutdownWorker should be preferred over ResetStickyTaskQueue (particularly when a worker is shutting down or cycling).

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIResetStickyTaskQueueRequestResetStickyTaskQueueRequest message or plain object
callbackResetStickyTaskQueueCallbackNode-style callback called with the error, if any, and ResetStickyTaskQueueResponse

Returns

void

resetStickyTaskQueue(request): Promise<ResetStickyTaskQueueResponse>

ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of a given workflow. This is prudent for workers to perform if a workflow has been paged out of their cache.

Things cleared are:

  1. StickyTaskQueue
  2. StickyScheduleToStartTimeout

When possible, ShutdownWorker should be preferred over ResetStickyTaskQueue (particularly when a worker is shutting down or cycling).

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIResetStickyTaskQueueRequestResetStickyTaskQueueRequest message or plain object

Returns

Promise<ResetStickyTaskQueueResponse>

Promise


resetWorkflowExecution

resetWorkflowExecution(request, callback): void

ResetWorkflowExecution will reset an existing workflow execution to a specified WORKFLOW_TASK_COMPLETED event (exclusive). It will immediately terminate the current execution instance. TODO: Does exclusive here mean just the completed event, or also WFT started? Otherwise the task is doomed to time out?

Parameters

NameTypeDescription
requestIResetWorkflowExecutionRequestResetWorkflowExecutionRequest message or plain object
callbackResetWorkflowExecutionCallbackNode-style callback called with the error, if any, and ResetWorkflowExecutionResponse

Returns

void

resetWorkflowExecution(request): Promise<ResetWorkflowExecutionResponse>

ResetWorkflowExecution will reset an existing workflow execution to a specified WORKFLOW_TASK_COMPLETED event (exclusive). It will immediately terminate the current execution instance. TODO: Does exclusive here mean just the completed event, or also WFT started? Otherwise the task is doomed to time out?

Parameters

NameTypeDescription
requestIResetWorkflowExecutionRequestResetWorkflowExecutionRequest message or plain object

Returns

Promise<ResetWorkflowExecutionResponse>

Promise


respondActivityTaskCanceled

respondActivityTaskCanceled(request, callback): void

RespondActivityTaskFailed is called by workers when processing an activity task fails.

This results in a new ACTIVITY_TASK_CANCELED event being written to the workflow history and a new workflow task created for the workflow. Fails with NotFound if the task token is no longer valid due to activity timeout, already being completed, or never having existed.

Parameters

NameTypeDescription
requestIRespondActivityTaskCanceledRequestRespondActivityTaskCanceledRequest message or plain object
callbackRespondActivityTaskCanceledCallbackNode-style callback called with the error, if any, and RespondActivityTaskCanceledResponse

Returns

void

respondActivityTaskCanceled(request): Promise<RespondActivityTaskCanceledResponse>

RespondActivityTaskFailed is called by workers when processing an activity task fails.

This results in a new ACTIVITY_TASK_CANCELED event being written to the workflow history and a new workflow task created for the workflow. Fails with NotFound if the task token is no longer valid due to activity timeout, already being completed, or never having existed.

Parameters

NameTypeDescription
requestIRespondActivityTaskCanceledRequestRespondActivityTaskCanceledRequest message or plain object

Returns

Promise<RespondActivityTaskCanceledResponse>

Promise


respondActivityTaskCanceledById

respondActivityTaskCanceledById(request, callback): void

See RecordActivityTaskCanceled. This version allows clients to record failures by namespace/workflow id/activity id instead of task token.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIRespondActivityTaskCanceledByIdRequestRespondActivityTaskCanceledByIdRequest message or plain object
callbackRespondActivityTaskCanceledByIdCallbackNode-style callback called with the error, if any, and RespondActivityTaskCanceledByIdResponse

Returns

void

respondActivityTaskCanceledById(request): Promise<RespondActivityTaskCanceledByIdResponse>

See RecordActivityTaskCanceled. This version allows clients to record failures by namespace/workflow id/activity id instead of task token.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIRespondActivityTaskCanceledByIdRequestRespondActivityTaskCanceledByIdRequest message or plain object

Returns

Promise<RespondActivityTaskCanceledByIdResponse>

Promise


respondActivityTaskCompleted

respondActivityTaskCompleted(request, callback): void

RespondActivityTaskCompleted is called by workers when they successfully complete an activity task.

This results in a new ACTIVITY_TASK_COMPLETED event being written to the workflow history and a new workflow task created for the workflow. Fails with NotFound if the task token is no longer valid due to activity timeout, already being completed, or never having existed.

Parameters

NameTypeDescription
requestIRespondActivityTaskCompletedRequestRespondActivityTaskCompletedRequest message or plain object
callbackRespondActivityTaskCompletedCallbackNode-style callback called with the error, if any, and RespondActivityTaskCompletedResponse

Returns

void

respondActivityTaskCompleted(request): Promise<RespondActivityTaskCompletedResponse>

RespondActivityTaskCompleted is called by workers when they successfully complete an activity task.

This results in a new ACTIVITY_TASK_COMPLETED event being written to the workflow history and a new workflow task created for the workflow. Fails with NotFound if the task token is no longer valid due to activity timeout, already being completed, or never having existed.

Parameters

NameTypeDescription
requestIRespondActivityTaskCompletedRequestRespondActivityTaskCompletedRequest message or plain object

Returns

Promise<RespondActivityTaskCompletedResponse>

Promise


respondActivityTaskCompletedById

respondActivityTaskCompletedById(request, callback): void

See RecordActivityTaskCompleted. This version allows clients to record completions by namespace/workflow id/activity id instead of task token.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIRespondActivityTaskCompletedByIdRequestRespondActivityTaskCompletedByIdRequest message or plain object
callbackRespondActivityTaskCompletedByIdCallbackNode-style callback called with the error, if any, and RespondActivityTaskCompletedByIdResponse

Returns

void

respondActivityTaskCompletedById(request): Promise<RespondActivityTaskCompletedByIdResponse>

See RecordActivityTaskCompleted. This version allows clients to record completions by namespace/workflow id/activity id instead of task token.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIRespondActivityTaskCompletedByIdRequestRespondActivityTaskCompletedByIdRequest message or plain object

Returns

Promise<RespondActivityTaskCompletedByIdResponse>

Promise


respondActivityTaskFailed

respondActivityTaskFailed(request, callback): void

RespondActivityTaskFailed is called by workers when processing an activity task fails.

This results in a new ACTIVITY_TASK_FAILED event being written to the workflow history and a new workflow task created for the workflow. Fails with NotFound if the task token is no longer valid due to activity timeout, already being completed, or never having existed.

Parameters

NameTypeDescription
requestIRespondActivityTaskFailedRequestRespondActivityTaskFailedRequest message or plain object
callbackRespondActivityTaskFailedCallbackNode-style callback called with the error, if any, and RespondActivityTaskFailedResponse

Returns

void

respondActivityTaskFailed(request): Promise<RespondActivityTaskFailedResponse>

RespondActivityTaskFailed is called by workers when processing an activity task fails.

This results in a new ACTIVITY_TASK_FAILED event being written to the workflow history and a new workflow task created for the workflow. Fails with NotFound if the task token is no longer valid due to activity timeout, already being completed, or never having existed.

Parameters

NameTypeDescription
requestIRespondActivityTaskFailedRequestRespondActivityTaskFailedRequest message or plain object

Returns

Promise<RespondActivityTaskFailedResponse>

Promise


respondActivityTaskFailedById

respondActivityTaskFailedById(request, callback): void

See RecordActivityTaskFailed. This version allows clients to record failures by namespace/workflow id/activity id instead of task token.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIRespondActivityTaskFailedByIdRequestRespondActivityTaskFailedByIdRequest message or plain object
callbackRespondActivityTaskFailedByIdCallbackNode-style callback called with the error, if any, and RespondActivityTaskFailedByIdResponse

Returns

void

respondActivityTaskFailedById(request): Promise<RespondActivityTaskFailedByIdResponse>

See RecordActivityTaskFailed. This version allows clients to record failures by namespace/workflow id/activity id instead of task token.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIRespondActivityTaskFailedByIdRequestRespondActivityTaskFailedByIdRequest message or plain object

Returns

Promise<RespondActivityTaskFailedByIdResponse>

Promise


respondNexusTaskCompleted

respondNexusTaskCompleted(request, callback): void

RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondNexusTaskCompletedRequestRespondNexusTaskCompletedRequest message or plain object
callbackRespondNexusTaskCompletedCallbackNode-style callback called with the error, if any, and RespondNexusTaskCompletedResponse

Returns

void

respondNexusTaskCompleted(request): Promise<RespondNexusTaskCompletedResponse>

RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondNexusTaskCompletedRequestRespondNexusTaskCompletedRequest message or plain object

Returns

Promise<RespondNexusTaskCompletedResponse>

Promise


respondNexusTaskFailed

respondNexusTaskFailed(request, callback): void

RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondNexusTaskFailedRequestRespondNexusTaskFailedRequest message or plain object
callbackRespondNexusTaskFailedCallbackNode-style callback called with the error, if any, and RespondNexusTaskFailedResponse

Returns

void

respondNexusTaskFailed(request): Promise<RespondNexusTaskFailedResponse>

RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondNexusTaskFailedRequestRespondNexusTaskFailedRequest message or plain object

Returns

Promise<RespondNexusTaskFailedResponse>

Promise


respondQueryTaskCompleted

respondQueryTaskCompleted(request, callback): void

RespondQueryTaskCompleted is called by workers to complete queries which were delivered on the query (not queries) field of a PollWorkflowTaskQueueResponse.

Completing the query will unblock the corresponding client call to QueryWorkflow and return the query result a response.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondQueryTaskCompletedRequestRespondQueryTaskCompletedRequest message or plain object
callbackRespondQueryTaskCompletedCallbackNode-style callback called with the error, if any, and RespondQueryTaskCompletedResponse

Returns

void

respondQueryTaskCompleted(request): Promise<RespondQueryTaskCompletedResponse>

RespondQueryTaskCompleted is called by workers to complete queries which were delivered on the query (not queries) field of a PollWorkflowTaskQueueResponse.

Completing the query will unblock the corresponding client call to QueryWorkflow and return the query result a response.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondQueryTaskCompletedRequestRespondQueryTaskCompletedRequest message or plain object

Returns

Promise<RespondQueryTaskCompletedResponse>

Promise


respondWorkflowTaskCompleted

respondWorkflowTaskCompleted(request, callback): void

RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks they received from PollWorkflowTaskQueue.

Completing a WorkflowTask will write a WORKFLOW_TASK_COMPLETED event to the workflow's history, along with events corresponding to whatever commands the SDK generated while executing the task (ex timer started, activity task scheduled, etc).

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondWorkflowTaskCompletedRequestRespondWorkflowTaskCompletedRequest message or plain object
callbackRespondWorkflowTaskCompletedCallbackNode-style callback called with the error, if any, and RespondWorkflowTaskCompletedResponse

Returns

void

respondWorkflowTaskCompleted(request): Promise<RespondWorkflowTaskCompletedResponse>

RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks they received from PollWorkflowTaskQueue.

Completing a WorkflowTask will write a WORKFLOW_TASK_COMPLETED event to the workflow's history, along with events corresponding to whatever commands the SDK generated while executing the task (ex timer started, activity task scheduled, etc).

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondWorkflowTaskCompletedRequestRespondWorkflowTaskCompletedRequest message or plain object

Returns

Promise<RespondWorkflowTaskCompletedResponse>

Promise


respondWorkflowTaskFailed

respondWorkflowTaskFailed(request, callback): void

RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task failed.

This results in a WORKFLOW_TASK_FAILED event written to the history, and a new workflow task will be scheduled. This API can be used to report unhandled failures resulting from applying the workflow task.

Temporal will only append first WorkflowTaskFailed event to the history of workflow execution for consecutive failures.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondWorkflowTaskFailedRequestRespondWorkflowTaskFailedRequest message or plain object
callbackRespondWorkflowTaskFailedCallbackNode-style callback called with the error, if any, and RespondWorkflowTaskFailedResponse

Returns

void

respondWorkflowTaskFailed(request): Promise<RespondWorkflowTaskFailedResponse>

RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task failed.

This results in a WORKFLOW_TASK_FAILED event written to the history, and a new workflow task will be scheduled. This API can be used to report unhandled failures resulting from applying the workflow task.

Temporal will only append first WorkflowTaskFailed event to the history of workflow execution for consecutive failures.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIRespondWorkflowTaskFailedRequestRespondWorkflowTaskFailedRequest message or plain object

Returns

Promise<RespondWorkflowTaskFailedResponse>

Promise


rpcCall

rpcCall<TReq, TRes>(method, requestCtor, responseCtor, request, callback): void

Calls a service method through rpcImpl.

Type parameters

NameType
TReqextends Message<TReq>
TResextends Message<TRes>

Parameters

NameTypeDescription
methodMethod | ServiceMethod<TReq, TRes>Reflected or static method
requestCtorConstructor<TReq>Request constructor
responseCtorConstructor<TRes>Response constructor
requestTReq | Properties<TReq>Request message or plain object
callbackServiceMethodCallback<TRes>Service callback

Returns

void

Inherited from

$protobuf.rpc.Service.rpcCall


scanWorkflowExecutions

scanWorkflowExecutions(request, callback): void

ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific namespace without order.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --)

Parameters

NameTypeDescription
requestIScanWorkflowExecutionsRequestScanWorkflowExecutionsRequest message or plain object
callbackScanWorkflowExecutionsCallbackNode-style callback called with the error, if any, and ScanWorkflowExecutionsResponse

Returns

void

scanWorkflowExecutions(request): Promise<ScanWorkflowExecutionsResponse>

ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific namespace without order.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --)

Parameters

NameTypeDescription
requestIScanWorkflowExecutionsRequestScanWorkflowExecutionsRequest message or plain object

Returns

Promise<ScanWorkflowExecutionsResponse>

Promise


shutdownWorker

shutdownWorker(request, callback): void

ShutdownWorker is used to indicate that the given sticky task queue is no longer being polled by its worker. Following the completion of ShutdownWorker, newly-added workflow tasks will instead be placed in the normal task queue, eligible for any worker to pick up.

ShutdownWorker should be called by workers while shutting down, after they've shut down their pollers. If another sticky poll request is issued, the sticky task queue will be revived.

As of Temporal Server v1.25.0, ShutdownWorker hasn't yet been implemented.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIShutdownWorkerRequestShutdownWorkerRequest message or plain object
callbackShutdownWorkerCallbackNode-style callback called with the error, if any, and ShutdownWorkerResponse

Returns

void

shutdownWorker(request): Promise<ShutdownWorkerResponse>

ShutdownWorker is used to indicate that the given sticky task queue is no longer being polled by its worker. Following the completion of ShutdownWorker, newly-added workflow tasks will instead be placed in the normal task queue, eligible for any worker to pick up.

ShutdownWorker should be called by workers while shutting down, after they've shut down their pollers. If another sticky poll request is issued, the sticky task queue will be revived.

As of Temporal Server v1.25.0, ShutdownWorker hasn't yet been implemented.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --)

Parameters

NameTypeDescription
requestIShutdownWorkerRequestShutdownWorkerRequest message or plain object

Returns

Promise<ShutdownWorkerResponse>

Promise


signalWithStartWorkflowExecution

signalWithStartWorkflowExecution(request, callback): void

SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if it isn't yet started.

If the workflow is running, a WORKFLOW_EXECUTION_SIGNALED event is recorded in the history and a workflow task is generated.

If the workflow is not running or not found, then the workflow is created with WORKFLOW_EXECUTION_STARTED and WORKFLOW_EXECUTION_SIGNALED events in its history, and a workflow task is generated.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "With" is used to indicate combined operation. --)

Parameters

NameTypeDescription
requestISignalWithStartWorkflowExecutionRequestSignalWithStartWorkflowExecutionRequest message or plain object
callbackSignalWithStartWorkflowExecutionCallbackNode-style callback called with the error, if any, and SignalWithStartWorkflowExecutionResponse

Returns

void

signalWithStartWorkflowExecution(request): Promise<SignalWithStartWorkflowExecutionResponse>

SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if it isn't yet started.

If the workflow is running, a WORKFLOW_EXECUTION_SIGNALED event is recorded in the history and a workflow task is generated.

If the workflow is not running or not found, then the workflow is created with WORKFLOW_EXECUTION_STARTED and WORKFLOW_EXECUTION_SIGNALED events in its history, and a workflow task is generated.

(-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "With" is used to indicate combined operation. --)

Parameters

NameTypeDescription
requestISignalWithStartWorkflowExecutionRequestSignalWithStartWorkflowExecutionRequest message or plain object

Returns

Promise<SignalWithStartWorkflowExecutionResponse>

Promise


signalWorkflowExecution

signalWorkflowExecution(request, callback): void

SignalWorkflowExecution is used to send a signal to a running workflow execution.

This results in a WORKFLOW_EXECUTION_SIGNALED event recorded in the history and a workflow task being created for the execution.

Parameters

NameTypeDescription
requestISignalWorkflowExecutionRequestSignalWorkflowExecutionRequest message or plain object
callbackSignalWorkflowExecutionCallbackNode-style callback called with the error, if any, and SignalWorkflowExecutionResponse

Returns

void

signalWorkflowExecution(request): Promise<SignalWorkflowExecutionResponse>

SignalWorkflowExecution is used to send a signal to a running workflow execution.

This results in a WORKFLOW_EXECUTION_SIGNALED event recorded in the history and a workflow task being created for the execution.

Parameters

NameTypeDescription
requestISignalWorkflowExecutionRequestSignalWorkflowExecutionRequest message or plain object

Returns

Promise<SignalWorkflowExecutionResponse>

Promise


startBatchOperation

startBatchOperation(request, callback): void

StartBatchOperation starts a new batch operation

Parameters

NameTypeDescription
requestIStartBatchOperationRequestStartBatchOperationRequest message or plain object
callbackStartBatchOperationCallbackNode-style callback called with the error, if any, and StartBatchOperationResponse

Returns

void

startBatchOperation(request): Promise<StartBatchOperationResponse>

StartBatchOperation starts a new batch operation

Parameters

NameTypeDescription
requestIStartBatchOperationRequestStartBatchOperationRequest message or plain object

Returns

Promise<StartBatchOperationResponse>

Promise


startWorkflowExecution

startWorkflowExecution(request, callback): void

StartWorkflowExecution starts a new workflow execution.

It will create the execution with a WORKFLOW_EXECUTION_STARTED event in its history and also schedule the first workflow task. Returns WorkflowExecutionAlreadyStarted, if an instance already exists with same workflow id.

Parameters

NameTypeDescription
requestIStartWorkflowExecutionRequestStartWorkflowExecutionRequest message or plain object
callbackStartWorkflowExecutionCallbackNode-style callback called with the error, if any, and StartWorkflowExecutionResponse

Returns

void

startWorkflowExecution(request): Promise<StartWorkflowExecutionResponse>

StartWorkflowExecution starts a new workflow execution.

It will create the execution with a WORKFLOW_EXECUTION_STARTED event in its history and also schedule the first workflow task. Returns WorkflowExecutionAlreadyStarted, if an instance already exists with same workflow id.

Parameters

NameTypeDescription
requestIStartWorkflowExecutionRequestStartWorkflowExecutionRequest message or plain object

Returns

Promise<StartWorkflowExecutionResponse>

Promise


stopBatchOperation

stopBatchOperation(request, callback): void

StopBatchOperation stops a batch operation

Parameters

NameTypeDescription
requestIStopBatchOperationRequestStopBatchOperationRequest message or plain object
callbackStopBatchOperationCallbackNode-style callback called with the error, if any, and StopBatchOperationResponse

Returns

void

stopBatchOperation(request): Promise<StopBatchOperationResponse>

StopBatchOperation stops a batch operation

Parameters

NameTypeDescription
requestIStopBatchOperationRequestStopBatchOperationRequest message or plain object

Returns

Promise<StopBatchOperationResponse>

Promise


terminateWorkflowExecution

terminateWorkflowExecution(request, callback): void

TerminateWorkflowExecution terminates an existing workflow execution by recording a WORKFLOW_EXECUTION_TERMINATED event in the history and immediately terminating the execution instance.

Parameters

NameTypeDescription
requestITerminateWorkflowExecutionRequestTerminateWorkflowExecutionRequest message or plain object
callbackTerminateWorkflowExecutionCallbackNode-style callback called with the error, if any, and TerminateWorkflowExecutionResponse

Returns

void

terminateWorkflowExecution(request): Promise<TerminateWorkflowExecutionResponse>

TerminateWorkflowExecution terminates an existing workflow execution by recording a WORKFLOW_EXECUTION_TERMINATED event in the history and immediately terminating the execution instance.

Parameters

NameTypeDescription
requestITerminateWorkflowExecutionRequestTerminateWorkflowExecutionRequest message or plain object

Returns

Promise<TerminateWorkflowExecutionResponse>

Promise


unpauseActivityById

unpauseActivityById(request, callback): void

UnpauseActivityById unpauses the execution of an activity specified by its ID. Returns a NotFound error if there is no pending activity with the provided ID. There are two 'modes' of unpausing an activity: 'resume' - If the activity is paused, it will be resumed and scheduled for execution.

  • If the activity is currently running Unpause with 'resume' has no effect.
  • if 'no_wait' flag is set and the activity is waiting, the activity will be scheduled immediately. 'reset' - If the activity is paused, it will be reset to its initial state and (depending on parameters) scheduled for execution.
  • If the activity is currently running, Unpause with 'reset' will reset the number of attempts.
  • if 'no_wait' flag is set, the activity will be scheduled immediately.
  • if 'reset_heartbeats' flag is set, the activity heartbeat timer and heartbeats will be reset. If the activity is in waiting for retry and past it retry timeout, it will be scheduled immediately. Once the activity is unpaused, all timeout timers will be regenerated. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIUnpauseActivityByIdRequestUnpauseActivityByIdRequest message or plain object
callbackUnpauseActivityByIdCallbackNode-style callback called with the error, if any, and UnpauseActivityByIdResponse

Returns

void

unpauseActivityById(request): Promise<UnpauseActivityByIdResponse>

UnpauseActivityById unpauses the execution of an activity specified by its ID. Returns a NotFound error if there is no pending activity with the provided ID. There are two 'modes' of unpausing an activity: 'resume' - If the activity is paused, it will be resumed and scheduled for execution.

  • If the activity is currently running Unpause with 'resume' has no effect.
  • if 'no_wait' flag is set and the activity is waiting, the activity will be scheduled immediately. 'reset' - If the activity is paused, it will be reset to its initial state and (depending on parameters) scheduled for execution.
  • If the activity is currently running, Unpause with 'reset' will reset the number of attempts.
  • if 'no_wait' flag is set, the activity will be scheduled immediately.
  • if 'reset_heartbeats' flag is set, the activity heartbeat timer and heartbeats will be reset. If the activity is in waiting for retry and past it retry timeout, it will be scheduled immediately. Once the activity is unpaused, all timeout timers will be regenerated. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIUnpauseActivityByIdRequestUnpauseActivityByIdRequest message or plain object

Returns

Promise<UnpauseActivityByIdResponse>

Promise


updateActivityOptionsById

updateActivityOptionsById(request, callback): void

UpdateActivityOptionsById is called by the client to update the options of an activity (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIUpdateActivityOptionsByIdRequestUpdateActivityOptionsByIdRequest message or plain object
callbackUpdateActivityOptionsByIdCallbackNode-style callback called with the error, if any, and UpdateActivityOptionsByIdResponse

Returns

void

updateActivityOptionsById(request): Promise<UpdateActivityOptionsByIdResponse>

UpdateActivityOptionsById is called by the client to update the options of an activity (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --)

Parameters

NameTypeDescription
requestIUpdateActivityOptionsByIdRequestUpdateActivityOptionsByIdRequest message or plain object

Returns

Promise<UpdateActivityOptionsByIdResponse>

Promise


updateNamespace

updateNamespace(request, callback): void

UpdateNamespace is used to update the information and configuration of a registered namespace.

Parameters

NameTypeDescription
requestIUpdateNamespaceRequestUpdateNamespaceRequest message or plain object
callbackUpdateNamespaceCallbackNode-style callback called with the error, if any, and UpdateNamespaceResponse

Returns

void

updateNamespace(request): Promise<UpdateNamespaceResponse>

UpdateNamespace is used to update the information and configuration of a registered namespace.

Parameters

NameTypeDescription
requestIUpdateNamespaceRequestUpdateNamespaceRequest message or plain object

Returns

Promise<UpdateNamespaceResponse>

Promise


updateSchedule

updateSchedule(request, callback): void

Changes the configuration or state of an existing schedule.

Parameters

NameTypeDescription
requestIUpdateScheduleRequestUpdateScheduleRequest message or plain object
callbackUpdateScheduleCallbackNode-style callback called with the error, if any, and UpdateScheduleResponse

Returns

void

updateSchedule(request): Promise<UpdateScheduleResponse>

Changes the configuration or state of an existing schedule.

Parameters

NameTypeDescription
requestIUpdateScheduleRequestUpdateScheduleRequest message or plain object

Returns

Promise<UpdateScheduleResponse>

Promise


updateWorkerBuildIdCompatibility

updateWorkerBuildIdCompatibility(request, callback): void

Deprecated. Use UpdateWorkerVersioningRules.

Allows users to specify sets of worker build id versions on a per task queue basis. Versions are ordered, and may be either compatible with some extant version, or a new incompatible version, forming sets of ids which are incompatible with each other, but whose contained members are compatible with one another.

A single build id may be mapped to multiple task queues using this API for cases where a single process hosts multiple workers.

To query which workers can be retired, use the GetWorkerTaskReachability API.

NOTE: The number of task queues mapped to a single build id is limited by the limit.taskQueuesPerBuildId (default is 20), if this limit is exceeded this API will error with a FailedPrecondition.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --)

Parameters

NameTypeDescription
requestIUpdateWorkerBuildIdCompatibilityRequestUpdateWorkerBuildIdCompatibilityRequest message or plain object
callbackUpdateWorkerBuildIdCompatibilityCallbackNode-style callback called with the error, if any, and UpdateWorkerBuildIdCompatibilityResponse

Returns

void

updateWorkerBuildIdCompatibility(request): Promise<UpdateWorkerBuildIdCompatibilityResponse>

Deprecated. Use UpdateWorkerVersioningRules.

Allows users to specify sets of worker build id versions on a per task queue basis. Versions are ordered, and may be either compatible with some extant version, or a new incompatible version, forming sets of ids which are incompatible with each other, but whose contained members are compatible with one another.

A single build id may be mapped to multiple task queues using this API for cases where a single process hosts multiple workers.

To query which workers can be retired, use the GetWorkerTaskReachability API.

NOTE: The number of task queues mapped to a single build id is limited by the limit.taskQueuesPerBuildId (default is 20), if this limit is exceeded this API will error with a FailedPrecondition.

(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --)

Parameters

NameTypeDescription
requestIUpdateWorkerBuildIdCompatibilityRequestUpdateWorkerBuildIdCompatibilityRequest message or plain object

Returns

Promise<UpdateWorkerBuildIdCompatibilityResponse>

Promise


updateWorkerVersioningRules

updateWorkerVersioningRules(request, callback): void

Use this API to manage Worker Versioning Rules for a given Task Queue. There are two types of rules: Build ID Assignment rules and Compatible Build ID Redirect rules.

Assignment rules determine how to assign new executions to a Build IDs. Their primary use case is to specify the latest Build ID but they have powerful features for gradual rollout of a new Build ID.

Once a workflow execution is assigned to a Build ID and it completes its first Workflow Task, the workflow stays on the assigned Build ID regardless of changes in assignment rules. This eliminates the need for compatibility between versions when you only care about using the new version for new workflows and let existing workflows finish in their own version.

Activities, Child Workflows and Continue-as-New executions have the option to inherit the Build ID of their parent/previous workflow or use the latest assignment rules to independently select a Build ID.

Redirect rules should only be used when you want to move workflows and activities assigned to one Build ID (source) to another compatible Build ID (target). You are responsible to make sure the target Build ID of a redirect rule is able to process event histories made by the source Build ID by using Patching or other means.

WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --)

Parameters

NameTypeDescription
requestIUpdateWorkerVersioningRulesRequestUpdateWorkerVersioningRulesRequest message or plain object
callbackUpdateWorkerVersioningRulesCallbackNode-style callback called with the error, if any, and UpdateWorkerVersioningRulesResponse

Returns

void

updateWorkerVersioningRules(request): Promise<UpdateWorkerVersioningRulesResponse>

Use this API to manage Worker Versioning Rules for a given Task Queue. There are two types of rules: Build ID Assignment rules and Compatible Build ID Redirect rules.

Assignment rules determine how to assign new executions to a Build IDs. Their primary use case is to specify the latest Build ID but they have powerful features for gradual rollout of a new Build ID.

Once a workflow execution is assigned to a Build ID and it completes its first Workflow Task, the workflow stays on the assigned Build ID regardless of changes in assignment rules. This eliminates the need for compatibility between versions when you only care about using the new version for new workflows and let existing workflows finish in their own version.

Activities, Child Workflows and Continue-as-New executions have the option to inherit the Build ID of their parent/previous workflow or use the latest assignment rules to independently select a Build ID.

Redirect rules should only be used when you want to move workflows and activities assigned to one Build ID (source) to another compatible Build ID (target). You are responsible to make sure the target Build ID of a redirect rule is able to process event histories made by the source Build ID by using Patching or other means.

WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --)

Parameters

NameTypeDescription
requestIUpdateWorkerVersioningRulesRequestUpdateWorkerVersioningRulesRequest message or plain object

Returns

Promise<UpdateWorkerVersioningRulesResponse>

Promise


updateWorkflowExecution

updateWorkflowExecution(request, callback): void

Invokes the specified Update function on user Workflow code.

Parameters

NameTypeDescription
requestIUpdateWorkflowExecutionRequestUpdateWorkflowExecutionRequest message or plain object
callbackUpdateWorkflowExecutionCallbackNode-style callback called with the error, if any, and UpdateWorkflowExecutionResponse

Returns

void

updateWorkflowExecution(request): Promise<UpdateWorkflowExecutionResponse>

Invokes the specified Update function on user Workflow code.

Parameters

NameTypeDescription
requestIUpdateWorkflowExecutionRequestUpdateWorkflowExecutionRequest message or plain object

Returns

Promise<UpdateWorkflowExecutionResponse>

Promise


create

create(rpcImpl, requestDelimited?, responseDelimited?): WorkflowService

Creates new WorkflowService service using the specified rpc implementation.

Parameters

NameTypeDescription
rpcImplRPCImplRPC implementation
requestDelimited?booleanWhether requests are length-delimited
responseDelimited?booleanWhether responses are length-delimited

Returns

WorkflowService

RPC service. Useful where requests and/or responses are streamed.