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
countActivityExecutions
▸ countActivityExecutions(request, callback): void
CountActivityExecutions is a visibility API to count activity executions in a specific namespace.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICountActivityExecutionsRequest | CountActivityExecutionsRequest message or plain object |
callback | CountActivityExecutionsCallback | Node-style callback called with the error, if any, and CountActivityExecutionsResponse |
Returns
void
▸ countActivityExecutions(request): Promise<CountActivityExecutionsResponse>
CountActivityExecutions is a visibility API to count activity executions in a specific namespace.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICountActivityExecutionsRequest | CountActivityExecutionsRequest message or plain object |
Returns
Promise<CountActivityExecutionsResponse>
Promise
countNexusOperationExecutions
▸ countNexusOperationExecutions(request, callback): void
CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICountNexusOperationExecutionsRequest | CountNexusOperationExecutionsRequest message or plain object |
callback | CountNexusOperationExecutionsCallback | Node-style callback called with the error, if any, and CountNexusOperationExecutionsResponse |
Returns
void
▸ countNexusOperationExecutions(request): Promise<CountNexusOperationExecutionsResponse>
CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICountNexusOperationExecutionsRequest | CountNexusOperationExecutionsRequest message or plain object |
Returns
Promise<CountNexusOperationExecutionsResponse>
Promise
countSchedules
▸ countSchedules(request, callback): void
CountSchedules is a visibility API to count schedules in a specific namespace.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICountSchedulesRequest | CountSchedulesRequest message or plain object |
callback | CountSchedulesCallback | Node-style callback called with the error, if any, and CountSchedulesResponse |
Returns
void
▸ countSchedules(request): Promise<CountSchedulesResponse>
CountSchedules is a visibility API to count schedules in a specific namespace.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICountSchedulesRequest | CountSchedulesRequest message or plain object |
Returns
Promise<CountSchedulesResponse>
Promise
countWorkers
▸ countWorkers(request, callback): void
CountWorkers counts the number of workers in a specific namespace.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICountWorkersRequest | CountWorkersRequest message or plain object |
callback | CountWorkersCallback | Node-style callback called with the error, if any, and CountWorkersResponse |
Returns
void
▸ countWorkers(request): Promise<CountWorkersResponse>
CountWorkers counts the number of workers in a specific namespace.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICountWorkersRequest | CountWorkersRequest message or plain object |
Returns
Promise<CountWorkersResponse>
Promise
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
createWorkerDeployment
▸ createWorkerDeployment(request, callback): void
Creates a new Worker Deployment.
Experimental. This API might significantly change or be removed in a future release.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICreateWorkerDeploymentRequest | CreateWorkerDeploymentRequest message or plain object |
callback | CreateWorkerDeploymentCallback | Node-style callback called with the error, if any, and CreateWorkerDeploymentResponse |
Returns
void
▸ createWorkerDeployment(request): Promise<CreateWorkerDeploymentResponse>
Creates a new Worker Deployment.
Experimental. This API might significantly change or be removed in a future release.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICreateWorkerDeploymentRequest | CreateWorkerDeploymentRequest message or plain object |
Returns
Promise<CreateWorkerDeploymentResponse>
Promise
createWorkerDeploymentVersion
▸ createWorkerDeploymentVersion(request, callback): void
Creates a new Worker Deployment Version.
Experimental. This API might significantly change or be removed in a future release.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICreateWorkerDeploymentVersionRequest | CreateWorkerDeploymentVersionRequest message or plain object |
callback | CreateWorkerDeploymentVersionCallback | Node-style callback called with the error, if any, and CreateWorkerDeploymentVersionResponse |
Returns
void
▸ createWorkerDeploymentVersion(request): Promise<CreateWorkerDeploymentVersionResponse>
Creates a new Worker Deployment Version.
Experimental. This API might significantly change or be removed in a future release.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICreateWorkerDeploymentVersionRequest | CreateWorkerDeploymentVersionRequest message or plain object |
Returns
Promise<CreateWorkerDeploymentVersionResponse>
Promise
createWorkflowRule
▸ createWorkflowRule(request, callback): void
Create a new workflow rule. The rules are used to control the workflow execution. The rule will be applied to all running and new workflows in the namespace. If the rule with such ID already exist this call will fail Note: the rules are part of namespace configuration and will be stored in the namespace config. Namespace config is eventually consistent.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICreateWorkflowRuleRequest | CreateWorkflowRuleRequest message or plain object |
callback | CreateWorkflowRuleCallback | Node-style callback called with the error, if any, and CreateWorkflowRuleResponse |
Returns
void
▸ createWorkflowRule(request): Promise<CreateWorkflowRuleResponse>
Create a new workflow rule. The rules are used to control the workflow execution. The rule will be applied to all running and new workflows in the namespace. If the rule with such ID already exist this call will fail Note: the rules are part of namespace configuration and will be stored in the namespace config. Namespace config is eventually consistent.
Parameters
| Name | Type | Description |
|---|---|---|
request | ICreateWorkflowRuleRequest | CreateWorkflowRuleRequest message or plain object |
Returns
Promise<CreateWorkflowRuleResponse>
Promise
deleteActivityExecution
▸ deleteActivityExecution(request, callback): void
DeleteActivityExecution asynchronously deletes a specific activity execution (when ActivityExecution.run_id is provided) or the latest activity execution (when ActivityExecution.run_id is not provided). If the activity Execution is running, it will be terminated before deletion.
(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --)
Parameters
| Name | Type | Description |
|---|---|---|
request | IDeleteActivityExecutionRequest | DeleteActivityExecutionRequest message or plain object |
callback | DeleteActivityExecutionCallback | Node-style callback called with the error, if any, and DeleteActivityExecutionResponse |
Returns
void
▸ deleteActivityExecution(request): Promise<DeleteActivityExecutionResponse>
DeleteActivityExecution asynchronously deletes a specific activity execution (when ActivityExecution.run_id is provided) or the latest activity execution (when ActivityExecution.run_id is not provided). If the activity Execution is running, it will be terminated before deletion.
(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --)
Parameters
| Name | Type | Description |
|---|---|---|
request | IDeleteActivityExecutionRequest | DeleteActivityExecutionRequest message or plain object |
Returns
Promise<DeleteActivityExecutionResponse>
Promise
deleteNexusOperationExecution
▸ deleteNexusOperationExecution(request, callback): void
DeleteNexusOperationExecution asynchronously deletes a specific Nexus operation run (when run_id is provided) or the latest run (when run_id is not provided). If the operation is running, it will be terminated before deletion.
(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Nexus operation deletion not exposed to HTTP, users should use cancel or terminate. --)
Parameters
| Name | Type | Description |
|---|---|---|
request | IDeleteNexusOperationExecutionRequest | DeleteNexusOperationExecutionRequest message or plain object |
callback | DeleteNexusOperationExecutionCallback | Node-style callback called with the error, if any, and DeleteNexusOperationExecutionResponse |
Returns
void
▸ deleteNexusOperationExecution(request): Promise<DeleteNexusOperationExecutionResponse>
DeleteNexusOperationExecution asynchronously deletes a specific Nexus operation run (when run_id is provided) or the latest run (when run_id is not provided). If the operation is running, it will be terminated before deletion.
(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Nexus operation deletion not exposed to HTTP, users should use cancel or terminate. --)
Parameters
| Name | Type | Description |
|---|---|---|
request | IDeleteNexusOperationExecutionRequest | DeleteNexusOperationExecutionRequest message or plain object |
Returns
Promise<DeleteNexusOperationExecutionResponse>
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
deleteWorkerDeployment
▸ deleteWorkerDeployment(request, callback): void
Deletes records of (an old) Deployment. A deployment can only be deleted if it has no Version in it. Experimental. This API might significantly change or be removed in a future release.
Parameters
| Name | Type | Description |
|---|---|---|
request | IDeleteWorkerDeploymentRequest | DeleteWorkerDeploymentRequest message or plain object |
callback | DeleteWorkerDeploymentCallback | Node-style callback called with the error, if any, and DeleteWorkerDeploymentResponse |
Returns
void
▸ deleteWorkerDeployment(request): Promise<DeleteWorkerDeploymentResponse>
Deletes records of (an old) Deployment. A deployment can only be deleted if it has no Version in it. Experimental. This API might significantly change or be removed in a future release.
Parameters
| Name | Type | Description |
|---|---|---|
request | IDeleteWorkerDeploymentRequest | DeleteWorkerDeploymentRequest message or plain object |
Returns
Promise<DeleteWorkerDeploymentResponse>
Promise
deleteWorkerDeploymentVersion
▸ deleteWorkerDeploymentVersion(request, callback): void
Used for manual deletion of Versions. User can delete a Version only when all the following conditions are met:
- It is not the Current or Ramping Version of its Deployment.
- It has no active pollers (none of the task queues in the Version have pollers)
- It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition
can be skipped by passing
skip-drainage=true. Experimental. This API might significantly change or be removed in a future release.
Parameters
| Name | Type | Description |
|---|---|---|
request | IDeleteWorkerDeploymentVersionRequest | DeleteWorkerDeploymentVersionRequest message or plain object |
callback | DeleteWorkerDeploymentVersionCallback | Node-style callback called with the error, if any, and DeleteWorkerDeploymentVersionResponse |
Returns
void
▸ deleteWorkerDeploymentVersion(request): Promise<DeleteWorkerDeploymentVersionResponse>
Used for manual deletion of Versions. User can delete a Version only when all the following conditions are met:
- It is not the Current or Ramping Version of its Deployment.
- It has no active pollers (none of the task queues in the Version have pollers)
- It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition
can be skipped by passing
skip-drainage=true. Experimental. This API might significantly change or be removed in a future release.
Parameters
| Name | Type | Description |
|---|---|---|
request | IDeleteWorkerDeploymentVersionRequest | DeleteWorkerDeploymentVersionRequest message or plain object |
Returns
Promise<DeleteWorkerDeploymentVersionResponse>
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