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
Name | Type | Description |
---|---|---|
rpcImpl | RPCImpl | RPC implementation |
requestDelimited? | boolean | Whether requests are length-delimited |
responseDelimited? | boolean | Whether responses are length-delimited |
Returns
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
Name | Type | Description |
---|---|---|
request | ICountWorkflowExecutionsRequest | CountWorkflowExecutionsRequest message or plain object |
callback | CountWorkflowExecutionsCallback | Node-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
Name | Type | Description |
---|---|---|
request | ICountWorkflowExecutionsRequest | CountWorkflowExecutionsRequest message or plain object |
Returns
Promise
<CountWorkflowExecutionsResponse
>
Promise
createSchedule
▸ createSchedule(request
, callback
): void
Creates a new schedule.
Parameters
Name | Type | Description |
---|---|---|
request | ICreateScheduleRequest | CreateScheduleRequest message or plain object |
callback | CreateScheduleCallback | Node-style callback called with the error, if any, and CreateScheduleResponse |
Returns
void
▸ createSchedule(request
): Promise
<CreateScheduleResponse
>
Creates a new schedule.
Parameters
Name | Type | Description |
---|---|---|
request | ICreateScheduleRequest | CreateScheduleRequest message or plain object |
Returns
Promise
<CreateScheduleResponse
>
Promise
deleteSchedule
▸ deleteSchedule(request
, callback
): void
Deletes a schedule, removing it from the system.
Parameters
Name | Type | Description |
---|---|---|
request | IDeleteScheduleRequest | DeleteScheduleRequest message or plain object |
callback | DeleteScheduleCallback | Node-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
Name | Type | Description |
---|---|---|
request | IDeleteScheduleRequest | DeleteScheduleRequest 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
Name | Type | Description |
---|---|---|
request | IDeleteWorkflowExecutionRequest | DeleteWorkflowExecutionRequest message or plain object |
callback | DeleteWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | IDeleteWorkflowExecutionRequest | DeleteWorkflowExecutionRequest 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
Name | Type | Description |
---|---|---|
request | IDeprecateNamespaceRequest | DeprecateNamespaceRequest message or plain object |
callback | DeprecateNamespaceCallback | Node-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
Name | Type | Description |
---|---|---|
request | IDeprecateNamespaceRequest | DeprecateNamespaceRequest message or plain object |
Returns
Promise
<DeprecateNamespaceResponse
>
Promise
describeBatchOperation
▸ describeBatchOperation(request
, callback
): void
DescribeBatchOperation returns the information about a batch operation
Parameters
Name | Type | Description |
---|---|---|
request | IDescribeBatchOperationRequest | DescribeBatchOperationRequest message or plain object |
callback | DescribeBatchOperationCallback | Node-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
Name | Type | Description |
---|---|---|
request | IDescribeBatchOperationRequest | DescribeBatchOperationRequest message or plain object |
Returns
Promise
<DescribeBatchOperationResponse
>
Promise
describeNamespace
▸ describeNamespace(request
, callback
): void
DescribeNamespace returns the information and configuration for a registered namespace.
Parameters
Name | Type | Description |
---|---|---|
request | IDescribeNamespaceRequest | DescribeNamespaceRequest message or plain object |
callback | DescribeNamespaceCallback | Node-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
Name | Type | Description |
---|---|---|
request | IDescribeNamespaceRequest | DescribeNamespaceRequest 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
Name | Type | Description |
---|---|---|
request | IDescribeScheduleRequest | DescribeScheduleRequest message or plain object |
callback | DescribeScheduleCallback | Node-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
Name | Type | Description |
---|---|---|
request | IDescribeScheduleRequest | DescribeScheduleRequest 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
Name | Type | Description |
---|---|---|
request | IDescribeTaskQueueRequest | DescribeTaskQueueRequest message or plain object |
callback | DescribeTaskQueueCallback | Node-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
Name | Type | Description |
---|---|---|
request | IDescribeTaskQueueRequest | DescribeTaskQueueRequest message or plain object |
Returns
Promise
<DescribeTaskQueueResponse
>
Promise
describeWorkflowExecution
▸ describeWorkflowExecution(request
, callback
): void
DescribeWorkflowExecution returns information about the specified workflow execution.
Parameters
Name | Type | Description |
---|---|---|
request | IDescribeWorkflowExecutionRequest | DescribeWorkflowExecutionRequest message or plain object |
callback | DescribeWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | IDescribeWorkflowExecutionRequest | DescribeWorkflowExecutionRequest 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
Name | Type | Description |
---|---|---|
evt | string | Event name |
...args | any [] | Arguments |
Returns
this
this
Inherited from
$protobuf.rpc.Service.emit
end
▸ end(endedByRPC?
): Service
Ends this service and emits the end
event.
Parameters
Name | Type | Description |
---|---|---|
endedByRPC? | boolean | Whether 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
Name | Type | Description |
---|---|---|
request | IExecuteMultiOperationRequest | ExecuteMultiOperationRequest message or plain object |
callback | ExecuteMultiOperationCallback | Node-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
Name | Type | Description |
---|---|---|
request | IExecuteMultiOperationRequest | ExecuteMultiOperationRequest message or plain object |
Returns
Promise
<ExecuteMultiOperationResponse
>
Promise
getClusterInfo
▸ getClusterInfo(request
, callback
): void
GetClusterInfo returns information about temporal cluster
Parameters
Name | Type | Description |
---|---|---|
request | IGetClusterInfoRequest | GetClusterInfoRequest message or plain object |
callback | GetClusterInfoCallback | Node-style callback called with the error, if any, and GetClusterInfoResponse |
Returns
void
▸ getClusterInfo(request
): Promise
<GetClusterInfoResponse
>
GetClusterInfo returns information about temporal cluster
Parameters
Name | Type | Description |
---|---|---|
request | IGetClusterInfoRequest | GetClusterInfoRequest 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
Name | Type | Description |
---|---|---|
request | IGetSearchAttributesRequest | GetSearchAttributesRequest message or plain object |
callback | GetSearchAttributesCallback | Node-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
Name | Type | Description |
---|---|---|
request | IGetSearchAttributesRequest | GetSearchAttributesRequest message or plain object |
Returns
Promise
<GetSearchAttributesResponse
>
Promise
getSystemInfo
▸ getSystemInfo(request
, callback
): void
GetSystemInfo returns information about the system.
Parameters
Name | Type | Description |
---|---|---|
request | IGetSystemInfoRequest | GetSystemInfoRequest message or plain object |
callback | GetSystemInfoCallback | Node-style callback called with the error, if any, and GetSystemInfoResponse |
Returns
void
▸ getSystemInfo(request
): Promise
<GetSystemInfoResponse
>
GetSystemInfo returns information about the system.
Parameters
Name | Type | Description |
---|---|---|
request | IGetSystemInfoRequest | GetSystemInfoRequest 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
Name | Type | Description |
---|---|---|
request | IGetWorkerBuildIdCompatibilityRequest | GetWorkerBuildIdCompatibilityRequest message or plain object |
callback | GetWorkerBuildIdCompatibilityCallback | Node-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
Name | Type | Description |
---|---|---|
request | IGetWorkerBuildIdCompatibilityRequest | GetWorkerBuildIdCompatibilityRequest 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
Name | Type | Description |
---|---|---|
request | IGetWorkerTaskReachabilityRequest | GetWorkerTaskReachabilityRequest message or plain object |
callback | GetWorkerTaskReachabilityCallback | Node-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
Name | Type | Description |
---|---|---|
request | IGetWorkerTaskReachabilityRequest | GetWorkerTaskReachabilityRequest 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
Name | Type | Description |
---|---|---|
request | IGetWorkerVersioningRulesRequest | GetWorkerVersioningRulesRequest message or plain object |
callback | GetWorkerVersioningRulesCallback | Node-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
Name | Type | Description |
---|---|---|
request | IGetWorkerVersioningRulesRequest | GetWorkerVersioningRulesRequest 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
Name | Type | Description |
---|---|---|
request | IGetWorkflowExecutionHistoryRequest | GetWorkflowExecutionHistoryRequest message or plain object |
callback | GetWorkflowExecutionHistoryCallback | Node-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
Name | Type | Description |
---|---|---|
request | IGetWorkflowExecutionHistoryRequest | GetWorkflowExecutionHistoryRequest 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
Name | Type | Description |
---|---|---|
request | IGetWorkflowExecutionHistoryReverseRequest | GetWorkflowExecutionHistoryReverseRequest message or plain object |
callback | GetWorkflowExecutionHistoryReverseCallback | Node-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
Name | Type | Description |
---|---|---|
request | IGetWorkflowExecutionHistoryReverseRequest | GetWorkflowExecutionHistoryReverseRequest 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
Name | Type | Description |
---|---|---|
request | IListArchivedWorkflowExecutionsRequest | ListArchivedWorkflowExecutionsRequest message or plain object |
callback | ListArchivedWorkflowExecutionsCallback | Node-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
Name | Type | Description |
---|---|---|
request | IListArchivedWorkflowExecutionsRequest | ListArchivedWorkflowExecutionsRequest message or plain object |
Returns
Promise
<ListArchivedWorkflowExecutionsResponse
>
Promise
listBatchOperations
▸ listBatchOperations(request
, callback
): void
ListBatchOperations returns a list of batch operations
Parameters
Name | Type | Description |
---|---|---|
request | IListBatchOperationsRequest | ListBatchOperationsRequest message or plain object |
callback | ListBatchOperationsCallback | Node-style callback called with the error, if any, and ListBatchOperationsResponse |
Returns
void
▸ listBatchOperations(request
): Promise
<ListBatchOperationsResponse
>
ListBatchOperations returns a list of batch operations
Parameters
Name | Type | Description |
---|---|---|
request | IListBatchOperationsRequest | ListBatchOperationsRequest 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
Name | Type | Description |
---|---|---|
request | IListClosedWorkflowExecutionsRequest | ListClosedWorkflowExecutionsRequest message or plain object |
callback | ListClosedWorkflowExecutionsCallback | Node-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
Name | Type | Description |
---|---|---|
request | IListClosedWorkflowExecutionsRequest | ListClosedWorkflowExecutionsRequest message or plain object |
Returns
Promise
<ListClosedWorkflowExecutionsResponse
>
Promise
listNamespaces
▸ listNamespaces(request
, callback
): void
ListNamespaces returns the information and configuration for all namespaces.
Parameters
Name | Type | Description |
---|---|---|
request | IListNamespacesRequest | ListNamespacesRequest message or plain object |
callback | ListNamespacesCallback | Node-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
Name | Type | Description |
---|---|---|
request | IListNamespacesRequest | ListNamespacesRequest 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
Name | Type | Description |
---|---|---|
request | IListOpenWorkflowExecutionsRequest | ListOpenWorkflowExecutionsRequest message or plain object |
callback | ListOpenWorkflowExecutionsCallback | Node-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
Name | Type | Description |
---|---|---|
request | IListOpenWorkflowExecutionsRequest | ListOpenWorkflowExecutionsRequest message or plain object |
Returns
Promise
<ListOpenWorkflowExecutionsResponse
>
Promise
listScheduleMatchingTimes
▸ listScheduleMatchingTimes(request
, callback
): void
Lists matching times within a range.
Parameters
Name | Type | Description |
---|---|---|
request | IListScheduleMatchingTimesRequest | ListScheduleMatchingTimesRequest message or plain object |
callback | ListScheduleMatchingTimesCallback | Node-style callback called with the error, if any, and ListScheduleMatchingTimesResponse |
Returns
void
▸ listScheduleMatchingTimes(request
): Promise
<ListScheduleMatchingTimesResponse
>
Lists matching times within a range.
Parameters
Name | Type | Description |
---|---|---|
request | IListScheduleMatchingTimesRequest | ListScheduleMatchingTimesRequest message or plain object |
Returns
Promise
<ListScheduleMatchingTimesResponse
>
Promise
listSchedules
▸ listSchedules(request
, callback
): void
List all schedules in a namespace.
Parameters
Name | Type | Description |
---|---|---|
request | IListSchedulesRequest | ListSchedulesRequest message or plain object |
callback | ListSchedulesCallback | Node-style callback called with the error, if any, and ListSchedulesResponse |
Returns
void
▸ listSchedules(request
): Promise
<ListSchedulesResponse
>
List all schedules in a namespace.
Parameters
Name | Type | Description |
---|---|---|
request | IListSchedulesRequest | ListSchedulesRequest 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
Name | Type | Description |
---|---|---|
request | IListTaskQueuePartitionsRequest | ListTaskQueuePartitionsRequest message or plain object |
callback | ListTaskQueuePartitionsCallback | Node-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
Name | Type | Description |
---|---|---|
request | IListTaskQueuePartitionsRequest | ListTaskQueuePartitionsRequest 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
Name | Type | Description |
---|---|---|
request | IListWorkflowExecutionsRequest | ListWorkflowExecutionsRequest message or plain object |
callback | ListWorkflowExecutionsCallback | Node-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
Name | Type | Description |
---|---|---|
request | IListWorkflowExecutionsRequest | ListWorkflowExecutionsRequest 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
Name | Type | Description |
---|---|---|
evt? | string | Event name. Removes all listeners if omitted. |
fn? | EventEmitterListener | Listener 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
Name | Type | Description |
---|---|---|
evt | string | Event name |
fn | EventEmitterListener | Listener |
ctx? | any | Listener 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
Name | Type | Description |
---|---|---|
request | IPatchScheduleRequest | PatchScheduleRequest message or plain object |
callback | PatchScheduleCallback | Node-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
Name | Type | Description |
---|---|---|
request | IPatchScheduleRequest | PatchScheduleRequest 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
Name | Type | Description |
---|---|---|
request | IPauseActivityByIdRequest | PauseActivityByIdRequest message or plain object |
callback | PauseActivityByIdCallback | Node-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
Name | Type | Description |
---|---|---|
request | IPauseActivityByIdRequest | PauseActivityByIdRequest 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
Name | Type | Description |
---|---|---|
request | IPollActivityTaskQueueRequest | PollActivityTaskQueueRequest message or plain object |
callback | PollActivityTaskQueueCallback | Node-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
Name | Type | Description |
---|---|---|
request | IPollActivityTaskQueueRequest | PollActivityTaskQueueRequest 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
Name | Type | Description |
---|---|---|
request | IPollNexusTaskQueueRequest | PollNexusTaskQueueRequest message or plain object |
callback | PollNexusTaskQueueCallback | Node-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
Name | Type | Description |
---|---|---|
request | IPollNexusTaskQueueRequest | PollNexusTaskQueueRequest 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
Name | Type | Description |
---|---|---|
request | IPollWorkflowExecutionUpdateRequest | PollWorkflowExecutionUpdateRequest message or plain object |
callback | PollWorkflowExecutionUpdateCallback | Node-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
Name | Type | Description |
---|---|---|
request | IPollWorkflowExecutionUpdateRequest | PollWorkflowExecutionUpdateRequest 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
Name | Type | Description |
---|---|---|
request | IPollWorkflowTaskQueueRequest | PollWorkflowTaskQueueRequest message or plain object |
callback | PollWorkflowTaskQueueCallback | Node-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
Name | Type | Description |
---|---|---|
request | IPollWorkflowTaskQueueRequest | PollWorkflowTaskQueueRequest 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
Name | Type | Description |
---|---|---|
request | IQueryWorkflowRequest | QueryWorkflowRequest message or plain object |
callback | QueryWorkflowCallback | Node-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
Name | Type | Description |
---|---|---|
request | IQueryWorkflowRequest | QueryWorkflowRequest 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
Name | Type | Description |
---|---|---|
request | IRecordActivityTaskHeartbeatRequest | RecordActivityTaskHeartbeatRequest message or plain object |
callback | RecordActivityTaskHeartbeatCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRecordActivityTaskHeartbeatRequest | RecordActivityTaskHeartbeatRequest 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
Name | Type | Description |
---|---|---|
request | IRecordActivityTaskHeartbeatByIdRequest | RecordActivityTaskHeartbeatByIdRequest message or plain object |
callback | RecordActivityTaskHeartbeatByIdCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRecordActivityTaskHeartbeatByIdRequest | RecordActivityTaskHeartbeatByIdRequest 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
Name | Type | Description |
---|---|---|
request | IRegisterNamespaceRequest | RegisterNamespaceRequest message or plain object |
callback | RegisterNamespaceCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRegisterNamespaceRequest | RegisterNamespaceRequest 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
Name | Type | Description |
---|---|---|
request | IRequestCancelWorkflowExecutionRequest | RequestCancelWorkflowExecutionRequest message or plain object |
callback | RequestCancelWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRequestCancelWorkflowExecutionRequest | RequestCancelWorkflowExecutionRequest 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
Name | Type | Description |
---|---|---|
request | IResetActivityByIdRequest | ResetActivityByIdRequest message or plain object |
callback | ResetActivityByIdCallback | Node-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
Name | Type | Description |
---|---|---|
request | IResetActivityByIdRequest | ResetActivityByIdRequest 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:
- StickyTaskQueue
- 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
Name | Type | Description |
---|---|---|
request | IResetStickyTaskQueueRequest | ResetStickyTaskQueueRequest message or plain object |
callback | ResetStickyTaskQueueCallback | Node-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:
- StickyTaskQueue
- 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
Name | Type | Description |
---|---|---|
request | IResetStickyTaskQueueRequest | ResetStickyTaskQueueRequest 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
Name | Type | Description |
---|---|---|
request | IResetWorkflowExecutionRequest | ResetWorkflowExecutionRequest message or plain object |
callback | ResetWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | IResetWorkflowExecutionRequest | ResetWorkflowExecutionRequest 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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskCanceledRequest | RespondActivityTaskCanceledRequest message or plain object |
callback | RespondActivityTaskCanceledCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskCanceledRequest | RespondActivityTaskCanceledRequest 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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskCanceledByIdRequest | RespondActivityTaskCanceledByIdRequest message or plain object |
callback | RespondActivityTaskCanceledByIdCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskCanceledByIdRequest | RespondActivityTaskCanceledByIdRequest 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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskCompletedRequest | RespondActivityTaskCompletedRequest message or plain object |
callback | RespondActivityTaskCompletedCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskCompletedRequest | RespondActivityTaskCompletedRequest 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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskCompletedByIdRequest | RespondActivityTaskCompletedByIdRequest message or plain object |
callback | RespondActivityTaskCompletedByIdCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskCompletedByIdRequest | RespondActivityTaskCompletedByIdRequest 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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskFailedRequest | RespondActivityTaskFailedRequest message or plain object |
callback | RespondActivityTaskFailedCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskFailedRequest | RespondActivityTaskFailedRequest 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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskFailedByIdRequest | RespondActivityTaskFailedByIdRequest message or plain object |
callback | RespondActivityTaskFailedByIdCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondActivityTaskFailedByIdRequest | RespondActivityTaskFailedByIdRequest 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
Name | Type | Description |
---|---|---|
request | IRespondNexusTaskCompletedRequest | RespondNexusTaskCompletedRequest message or plain object |
callback | RespondNexusTaskCompletedCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondNexusTaskCompletedRequest | RespondNexusTaskCompletedRequest 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
Name | Type | Description |
---|---|---|
request | IRespondNexusTaskFailedRequest | RespondNexusTaskFailedRequest message or plain object |
callback | RespondNexusTaskFailedCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondNexusTaskFailedRequest | RespondNexusTaskFailedRequest 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
Name | Type | Description |
---|---|---|
request | IRespondQueryTaskCompletedRequest | RespondQueryTaskCompletedRequest message or plain object |
callback | RespondQueryTaskCompletedCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondQueryTaskCompletedRequest | RespondQueryTaskCompletedRequest 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
Name | Type | Description |
---|---|---|
request | IRespondWorkflowTaskCompletedRequest | RespondWorkflowTaskCompletedRequest message or plain object |
callback | RespondWorkflowTaskCompletedCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondWorkflowTaskCompletedRequest | RespondWorkflowTaskCompletedRequest 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
Name | Type | Description |
---|---|---|
request | IRespondWorkflowTaskFailedRequest | RespondWorkflowTaskFailedRequest message or plain object |
callback | RespondWorkflowTaskFailedCallback | Node-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
Name | Type | Description |
---|---|---|
request | IRespondWorkflowTaskFailedRequest | RespondWorkflowTaskFailedRequest 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
Name | Type |
---|---|
TReq | extends Message <TReq > |
TRes | extends Message <TRes > |
Parameters
Name | Type | Description |
---|---|---|
method | Method | ServiceMethod <TReq , TRes > | Reflected or static method |
requestCtor | Constructor <TReq > | Request constructor |
responseCtor | Constructor <TRes > | Response constructor |
request | TReq | Properties <TReq > | Request message or plain object |
callback | ServiceMethodCallback <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
Name | Type | Description |
---|---|---|
request | IScanWorkflowExecutionsRequest | ScanWorkflowExecutionsRequest message or plain object |
callback | ScanWorkflowExecutionsCallback | Node-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
Name | Type | Description |
---|---|---|
request | IScanWorkflowExecutionsRequest | ScanWorkflowExecutionsRequest 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
Name | Type | Description |
---|---|---|
request | IShutdownWorkerRequest | ShutdownWorkerRequest message or plain object |
callback | ShutdownWorkerCallback | Node-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
Name | Type | Description |
---|---|---|
request | IShutdownWorkerRequest | ShutdownWorkerRequest 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
Name | Type | Description |
---|---|---|
request | ISignalWithStartWorkflowExecutionRequest | SignalWithStartWorkflowExecutionRequest message or plain object |
callback | SignalWithStartWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | ISignalWithStartWorkflowExecutionRequest | SignalWithStartWorkflowExecutionRequest 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
Name | Type | Description |
---|---|---|
request | ISignalWorkflowExecutionRequest | SignalWorkflowExecutionRequest message or plain object |
callback | SignalWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | ISignalWorkflowExecutionRequest | SignalWorkflowExecutionRequest message or plain object |
Returns
Promise
<SignalWorkflowExecutionResponse
>
Promise
startBatchOperation
▸ startBatchOperation(request
, callback
): void
StartBatchOperation starts a new batch operation
Parameters
Name | Type | Description |
---|---|---|
request | IStartBatchOperationRequest | StartBatchOperationRequest message or plain object |
callback | StartBatchOperationCallback | Node-style callback called with the error, if any, and StartBatchOperationResponse |
Returns
void
▸ startBatchOperation(request
): Promise
<StartBatchOperationResponse
>
StartBatchOperation starts a new batch operation
Parameters
Name | Type | Description |
---|---|---|
request | IStartBatchOperationRequest | StartBatchOperationRequest 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
Name | Type | Description |
---|---|---|
request | IStartWorkflowExecutionRequest | StartWorkflowExecutionRequest message or plain object |
callback | StartWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | IStartWorkflowExecutionRequest | StartWorkflowExecutionRequest message or plain object |
Returns
Promise
<StartWorkflowExecutionResponse
>
Promise
stopBatchOperation
▸ stopBatchOperation(request
, callback
): void
StopBatchOperation stops a batch operation
Parameters
Name | Type | Description |
---|---|---|
request | IStopBatchOperationRequest | StopBatchOperationRequest message or plain object |
callback | StopBatchOperationCallback | Node-style callback called with the error, if any, and StopBatchOperationResponse |
Returns
void
▸ stopBatchOperation(request
): Promise
<StopBatchOperationResponse
>
StopBatchOperation stops a batch operation
Parameters
Name | Type | Description |
---|---|---|
request | IStopBatchOperationRequest | StopBatchOperationRequest 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
Name | Type | Description |
---|---|---|
request | ITerminateWorkflowExecutionRequest | TerminateWorkflowExecutionRequest message or plain object |
callback | TerminateWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | ITerminateWorkflowExecutionRequest | TerminateWorkflowExecutionRequest 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
Name | Type | Description |
---|---|---|
request | IUnpauseActivityByIdRequest | UnpauseActivityByIdRequest message or plain object |
callback | UnpauseActivityByIdCallback | Node-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
Name | Type | Description |
---|---|---|
request | IUnpauseActivityByIdRequest | UnpauseActivityByIdRequest 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
Name | Type | Description |
---|---|---|
request | IUpdateActivityOptionsByIdRequest | UpdateActivityOptionsByIdRequest message or plain object |
callback | UpdateActivityOptionsByIdCallback | Node-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
Name | Type | Description |
---|---|---|
request | IUpdateActivityOptionsByIdRequest | UpdateActivityOptionsByIdRequest 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
Name | Type | Description |
---|---|---|
request | IUpdateNamespaceRequest | UpdateNamespaceRequest message or plain object |
callback | UpdateNamespaceCallback | Node-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
Name | Type | Description |
---|---|---|
request | IUpdateNamespaceRequest | UpdateNamespaceRequest message or plain object |
Returns
Promise
<UpdateNamespaceResponse
>
Promise
updateSchedule
▸ updateSchedule(request
, callback
): void
Changes the configuration or state of an existing schedule.
Parameters
Name | Type | Description |
---|---|---|
request | IUpdateScheduleRequest | UpdateScheduleRequest message or plain object |
callback | UpdateScheduleCallback | Node-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
Name | Type | Description |
---|---|---|
request | IUpdateScheduleRequest | UpdateScheduleRequest 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
Name | Type | Description |
---|---|---|
request | IUpdateWorkerBuildIdCompatibilityRequest | UpdateWorkerBuildIdCompatibilityRequest message or plain object |
callback | UpdateWorkerBuildIdCompatibilityCallback | Node-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
Name | Type | Description |
---|---|---|
request | IUpdateWorkerBuildIdCompatibilityRequest | UpdateWorkerBuildIdCompatibilityRequest 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
Name | Type | Description |
---|---|---|
request | IUpdateWorkerVersioningRulesRequest | UpdateWorkerVersioningRulesRequest message or plain object |
callback | UpdateWorkerVersioningRulesCallback | Node-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
Name | Type | Description |
---|---|---|
request | IUpdateWorkerVersioningRulesRequest | UpdateWorkerVersioningRulesRequest message or plain object |
Returns
Promise
<UpdateWorkerVersioningRulesResponse
>
Promise
updateWorkflowExecution
▸ updateWorkflowExecution(request
, callback
): void
Invokes the specified Update function on user Workflow code.
Parameters
Name | Type | Description |
---|---|---|
request | IUpdateWorkflowExecutionRequest | UpdateWorkflowExecutionRequest message or plain object |
callback | UpdateWorkflowExecutionCallback | Node-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
Name | Type | Description |
---|---|---|
request | IUpdateWorkflowExecutionRequest | UpdateWorkflowExecutionRequest message or plain object |
Returns
Promise
<UpdateWorkflowExecutionResponse
>
Promise
create
▸ create(rpcImpl
, requestDelimited?
, responseDelimited?
): WorkflowService
Creates new WorkflowService service using the specified rpc implementation.
Parameters
Name | Type | Description |
---|---|---|
rpcImpl | RPCImpl | RPC implementation |
requestDelimited? | boolean | Whether requests are length-delimited |
responseDelimited? | boolean | Whether responses are length-delimited |
Returns
RPC service. Useful where requests and/or responses are streamed.