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