Documentation

ServiceClient extends BaseClient
in package

Table of Contents

Constants

RETRYABLE_ERRORS  = [\Temporal\Client\GRPC\StatusCode::RESOURCE_EXHAUSTED, \Temporal\Client\GRPC\StatusCode::UNAVAILABLE, \Temporal\Client\GRPC\StatusCode::UNKNOWN]

Properties

$apiKey  : Stringable|string
$connection  : Connection
$context  : ContextInterface
$invokePipeline  : null|callable(string $method, object $arg, ContextInterface $ctx): object

Methods

__construct()  : mixed
close()  : void
Close the communication channel associated with this stub.
CountWorkflowExecutions()  : CountWorkflowExecutionsResponse
CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.
create()  : static
CreateSchedule()  : CreateScheduleResponse
Creates a new schedule.
createSSL()  : static
DeleteSchedule()  : DeleteScheduleResponse
Deletes a schedule, removing it from the system.
DeleteWorkflowExecution()  : 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.
DeprecateNamespace()  : DeprecateNamespaceResponse
DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED.
DescribeBatchOperation()  : DescribeBatchOperationResponse
DescribeBatchOperation returns the information about a batch operation
DescribeNamespace()  : DescribeNamespaceResponse
DescribeNamespace returns the information and configuration for a registered namespace.
DescribeSchedule()  : DescribeScheduleResponse
Returns the schedule description and current state of an existing schedule.
DescribeTaskQueue()  : 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
DescribeWorkflowExecution()  : DescribeWorkflowExecutionResponse
DescribeWorkflowExecution returns information about the specified workflow execution.
GetClusterInfo()  : GetClusterInfoResponse
GetClusterInfo returns information about temporal cluster
getConnection()  : ConnectionInterface
Note: Experimental
getContext()  : ContextInterface
GetSearchAttributes()  : GetSearchAttributesResponse
GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs
getServerCapabilities()  : ServerCapabilities|null
GetSystemInfo()  : GetSystemInfoResponse
GetSystemInfo returns information about the system.
GetWorkerBuildIdCompatibility()  : GetWorkerBuildIdCompatibilityResponse
Deprecated. Use `GetWorkerVersioningRules`.
GetWorkerTaskReachability()  : GetWorkerTaskReachabilityResponse
Deprecated. Use `DescribeTaskQueue`.
GetWorkerVersioningRules()  : GetWorkerVersioningRulesResponse
Fetches the Build ID assignment and redirect rules for a Task Queue.
GetWorkflowExecutionHistory()  : GetWorkflowExecutionHistoryResponse
GetWorkflowExecutionHistory returns the history of specified workflow execution.
GetWorkflowExecutionHistoryReverse()  : GetWorkflowExecutionHistoryReverseResponse
GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse order (starting from last event). Fails with`NotFound` if the specified workflow execution is unknown to the service.
ListArchivedWorkflowExecutions()  : ListArchivedWorkflowExecutionsResponse
ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.
ListBatchOperations()  : ListBatchOperationsResponse
ListBatchOperations returns a list of batch operations
ListClosedWorkflowExecutions()  : ListClosedWorkflowExecutionsResponse
ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace.
ListNamespaces()  : ListNamespacesResponse
ListNamespaces returns the information and configuration for all namespaces.
ListOpenWorkflowExecutions()  : ListOpenWorkflowExecutionsResponse
ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace.
ListScheduleMatchingTimes()  : ListScheduleMatchingTimesResponse
Lists matching times within a range.
ListSchedules()  : ListSchedulesResponse
List all schedules in a namespace.
ListTaskQueuePartitions()  : ListTaskQueuePartitionsResponse
(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this low-level API to HTTP. --)
ListWorkflowExecutions()  : ListWorkflowExecutionsResponse
ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.
PatchSchedule()  : PatchScheduleResponse
Makes a specific change to a schedule or triggers an immediate action.
PollActivityTaskQueue()  : PollActivityTaskQueueResponse
PollActivityTaskQueue is called by workers to process activity tasks from a specific task queue.
PollNexusTaskQueue()  : PollNexusTaskQueueResponse
PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks.
PollWorkflowExecutionUpdate()  : PollWorkflowExecutionUpdateResponse
Polls a workflow execution for the outcome of a workflow execution 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.
PollWorkflowTaskQueue()  : PollWorkflowTaskQueueResponse
PollWorkflowTaskQueue is called by workers to make progress on workflows.
QueryWorkflow()  : QueryWorkflowResponse
QueryWorkflow requests a query be executed for a specified workflow execution.
RecordActivityTaskHeartbeat()  : RecordActivityTaskHeartbeatResponse
RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.
RecordActivityTaskHeartbeatById()  : RecordActivityTaskHeartbeatByIdResponse
See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by namespace/workflow id/activity id instead of task token.
RegisterNamespace()  : RegisterNamespaceResponse
RegisterNamespace creates a new namespace which can be used as a container for all resources.
RequestCancelWorkflowExecution()  : RequestCancelWorkflowExecutionResponse
RequestCancelWorkflowExecution is called by workers when they want to request cancellation of a workflow execution.
ResetStickyTaskQueue()  : 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.
ResetWorkflowExecution()  : ResetWorkflowExecutionResponse
ResetWorkflowExecution will reset an existing workflow execution to a specified `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current execution instance.
RespondActivityTaskCanceled()  : RespondActivityTaskCanceledResponse
RespondActivityTaskFailed is called by workers when processing an activity task fails.
RespondActivityTaskCanceledById()  : RespondActivityTaskCanceledByIdResponse
See `RecordActivityTaskCanceled`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token.
RespondActivityTaskCompleted()  : RespondActivityTaskCompletedResponse
RespondActivityTaskCompleted is called by workers when they successfully complete an activity task.
RespondActivityTaskCompletedById()  : RespondActivityTaskCompletedByIdResponse
See `RecordActivityTaskCompleted`. This version allows clients to record completions by namespace/workflow id/activity id instead of task token.
RespondActivityTaskFailed()  : RespondActivityTaskFailedResponse
RespondActivityTaskFailed is called by workers when processing an activity task fails.
RespondActivityTaskFailedById()  : RespondActivityTaskFailedByIdResponse
See `RecordActivityTaskFailed`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token.
RespondNexusTaskCompleted()  : RespondNexusTaskCompletedResponse
RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue.
RespondNexusTaskFailed()  : RespondNexusTaskFailedResponse
RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue.
RespondQueryTaskCompleted()  : RespondQueryTaskCompletedResponse
RespondQueryTaskCompleted is called by workers to complete queries which were delivered on the `query` (not `queries`) field of a `PollWorkflowTaskQueueResponse`.
RespondWorkflowTaskCompleted()  : RespondWorkflowTaskCompletedResponse
RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks they received from `PollWorkflowTaskQueue`.
RespondWorkflowTaskFailed()  : RespondWorkflowTaskFailedResponse
RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task failed.
ScanWorkflowExecutions()  : ScanWorkflowExecutionsResponse
ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific namespace without order.
setServerCapabilities()  : void
SignalWithStartWorkflowExecution()  : SignalWithStartWorkflowExecutionResponse
SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if it isn't yet started.
SignalWorkflowExecution()  : SignalWorkflowExecutionResponse
SignalWorkflowExecution is used to send a signal to a running workflow execution.
StartBatchOperation()  : StartBatchOperationResponse
StartBatchOperation starts a new batch operation
StartWorkflowExecution()  : StartWorkflowExecutionResponse
StartWorkflowExecution starts a new workflow execution.
StopBatchOperation()  : StopBatchOperationResponse
StopBatchOperation stops a batch operation
TerminateWorkflowExecution()  : TerminateWorkflowExecutionResponse
TerminateWorkflowExecution terminates an existing workflow execution by recording a `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the execution instance.
UpdateNamespace()  : UpdateNamespaceResponse
UpdateNamespace is used to update the information and configuration of a registered namespace.
UpdateSchedule()  : UpdateScheduleResponse
Changes the configuration or state of an existing schedule.
UpdateWorkerBuildIdCompatibility()  : UpdateWorkerBuildIdCompatibilityResponse
Deprecated. Use `UpdateWorkerVersioningRules`.
UpdateWorkerVersioningRules()  : UpdateWorkerVersioningRulesResponse
Allows updating the Build ID assignment and redirect rules for a given Task Queue.
UpdateWorkflowExecution()  : UpdateWorkflowExecutionResponse
Invokes the specified update function on user workflow code.
withAuthKey()  : static
Set the authentication token for the service client.
withContext()  : static
withInterceptorPipeline()  : static
invoke()  : mixed
call()  : object
Call a gRPC method.
usleep()  : void

Constants

RETRYABLE_ERRORS

public mixed RETRYABLE_ERRORS = [\Temporal\Client\GRPC\StatusCode::RESOURCE_EXHAUSTED, \Temporal\Client\GRPC\StatusCode::UNAVAILABLE, \Temporal\Client\GRPC\StatusCode::UNKNOWN]

Properties

Methods

__construct()

public final __construct(WorkflowServiceClient|callable(): WorkflowServiceClient $workflowService) : mixed
Parameters
$workflowService : WorkflowServiceClient|callable(): WorkflowServiceClient

Service Client or its factory

Tags
private

Use static factory methods instead

see
self::create()
see
self::createSSL()

close()

Close the communication channel associated with this stub.

public close() : void

CountWorkflowExecutions()

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

public CountWorkflowExecutions(CountWorkflowExecutionsRequest $arg[, ContextInterface|null $ctx = null ]) : CountWorkflowExecutionsResponse
Parameters
$arg : CountWorkflowExecutionsRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
CountWorkflowExecutionsResponse

create()

public static create(non-empty-string $address) : static
Parameters
$address : non-empty-string

Temporal service address in format host:port

Tags
psalm-suppress

UndefinedClass

Return values
static

createSSL()

public static createSSL(non-empty-string $address[, non-empty-string|null $crt = null ][, non-empty-string|null $clientKey = null ][, non-empty-string|null $clientPem = null ][, non-empty-string|null $overrideServerName = null ]) : static
Parameters
$address : non-empty-string

Temporal service address in format host:port

$crt : non-empty-string|null = null

Root certificates string or file in PEM format. If null provided, default gRPC root certificates are used.

$clientKey : non-empty-string|null = null

Client private key string or file in PEM format.

$clientPem : non-empty-string|null = null

Client certificate chain string or file in PEM format.

$overrideServerName : non-empty-string|null = null
Tags
psalm-suppress

UndefinedClass

psalm-suppress

UnusedVariable

Return values
static

DeleteWorkflowExecution()

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.

public DeleteWorkflowExecution(DeleteWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : DeleteWorkflowExecutionResponse

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

Parameters
$arg : DeleteWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
DeleteWorkflowExecutionResponse

DeprecateNamespace()

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

public DeprecateNamespace(DeprecateNamespaceRequest $arg[, ContextInterface|null $ctx = null ]) : DeprecateNamespaceResponse

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
$arg : DeprecateNamespaceRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
DeprecateNamespaceResponse

DescribeBatchOperation()

DescribeBatchOperation returns the information about a batch operation

public DescribeBatchOperation(DescribeBatchOperationRequest $arg[, ContextInterface|null $ctx = null ]) : DescribeBatchOperationResponse
Parameters
$arg : DescribeBatchOperationRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
DescribeBatchOperationResponse

DescribeNamespace()

DescribeNamespace returns the information and configuration for a registered namespace.

public DescribeNamespace(DescribeNamespaceRequest $arg[, ContextInterface|null $ctx = null ]) : DescribeNamespaceResponse
Parameters
$arg : DescribeNamespaceRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
DescribeNamespaceResponse

DescribeSchedule()

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

public DescribeSchedule(DescribeScheduleRequest $arg[, ContextInterface|null $ctx = null ]) : DescribeScheduleResponse
Parameters
$arg : DescribeScheduleRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
DescribeScheduleResponse

DescribeTaskQueue()

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

public DescribeTaskQueue(DescribeTaskQueueRequest $arg[, ContextInterface|null $ctx = null ]) : DescribeTaskQueueResponse
Parameters
$arg : DescribeTaskQueueRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
DescribeTaskQueueResponse

DescribeWorkflowExecution()

DescribeWorkflowExecution returns information about the specified workflow execution.

public DescribeWorkflowExecution(DescribeWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : DescribeWorkflowExecutionResponse
Parameters
$arg : DescribeWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
DescribeWorkflowExecutionResponse

GetClusterInfo()

GetClusterInfo returns information about temporal cluster

public GetClusterInfo(GetClusterInfoRequest $arg[, ContextInterface|null $ctx = null ]) : GetClusterInfoResponse
Parameters
$arg : GetClusterInfoRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
GetClusterInfoResponse

GetSearchAttributes()

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

public GetSearchAttributes(GetSearchAttributesRequest $arg[, ContextInterface|null $ctx = null ]) : GetSearchAttributesResponse

(-- 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
$arg : GetSearchAttributesRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
GetSearchAttributesResponse

GetWorkerBuildIdCompatibility()

Deprecated. Use `GetWorkerVersioningRules`.

public GetWorkerBuildIdCompatibility(GetWorkerBuildIdCompatibilityRequest $arg[, ContextInterface|null $ctx = null ]) : GetWorkerBuildIdCompatibilityResponse

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

Parameters
$arg : GetWorkerBuildIdCompatibilityRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
GetWorkerBuildIdCompatibilityResponse

GetWorkerTaskReachability()

Deprecated. Use `DescribeTaskQueue`.

public GetWorkerTaskReachability(GetWorkerTaskReachabilityRequest $arg[, ContextInterface|null $ctx = null ]) : GetWorkerTaskReachabilityResponse

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
$arg : GetWorkerTaskReachabilityRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
GetWorkerTaskReachabilityResponse

GetWorkerVersioningRules()

Fetches the Build ID assignment and redirect rules for a Task Queue.

public GetWorkerVersioningRules(GetWorkerVersioningRulesRequest $arg[, ContextInterface|null $ctx = null ]) : GetWorkerVersioningRulesResponse

WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly.

Parameters
$arg : GetWorkerVersioningRulesRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
GetWorkerVersioningRulesResponse

GetWorkflowExecutionHistory()

GetWorkflowExecutionHistory returns the history of specified workflow execution.

public GetWorkflowExecutionHistory(GetWorkflowExecutionHistoryRequest $arg[, ContextInterface|null $ctx = null ]) : GetWorkflowExecutionHistoryResponse

Fails with NotFound if the specified workflow execution is unknown to the service.

Parameters
$arg : GetWorkflowExecutionHistoryRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
GetWorkflowExecutionHistoryResponse

GetWorkflowExecutionHistoryReverse()

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

public GetWorkflowExecutionHistoryReverse(GetWorkflowExecutionHistoryReverseRequest $arg[, ContextInterface|null $ctx = null ]) : GetWorkflowExecutionHistoryReverseResponse
Parameters
$arg : GetWorkflowExecutionHistoryReverseRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
GetWorkflowExecutionHistoryReverseResponse

ListArchivedWorkflowExecutions()

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

public ListArchivedWorkflowExecutions(ListArchivedWorkflowExecutionsRequest $arg[, ContextInterface|null $ctx = null ]) : ListArchivedWorkflowExecutionsResponse
Parameters
$arg : ListArchivedWorkflowExecutionsRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ListArchivedWorkflowExecutionsResponse

ListBatchOperations()

ListBatchOperations returns a list of batch operations

public ListBatchOperations(ListBatchOperationsRequest $arg[, ContextInterface|null $ctx = null ]) : ListBatchOperationsResponse
Parameters
$arg : ListBatchOperationsRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ListBatchOperationsResponse

ListClosedWorkflowExecutions()

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

public ListClosedWorkflowExecutions(ListClosedWorkflowExecutionsRequest $arg[, ContextInterface|null $ctx = null ]) : ListClosedWorkflowExecutionsResponse

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

Parameters
$arg : ListClosedWorkflowExecutionsRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ListClosedWorkflowExecutionsResponse

ListNamespaces()

ListNamespaces returns the information and configuration for all namespaces.

public ListNamespaces(ListNamespacesRequest $arg[, ContextInterface|null $ctx = null ]) : ListNamespacesResponse
Parameters
$arg : ListNamespacesRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ListNamespacesResponse

ListOpenWorkflowExecutions()

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

public ListOpenWorkflowExecutions(ListOpenWorkflowExecutionsRequest $arg[, ContextInterface|null $ctx = null ]) : ListOpenWorkflowExecutionsResponse

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

Parameters
$arg : ListOpenWorkflowExecutionsRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ListOpenWorkflowExecutionsResponse

ListScheduleMatchingTimes()

Lists matching times within a range.

public ListScheduleMatchingTimes(ListScheduleMatchingTimesRequest $arg[, ContextInterface|null $ctx = null ]) : ListScheduleMatchingTimesResponse
Parameters
$arg : ListScheduleMatchingTimesRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ListScheduleMatchingTimesResponse

ListTaskQueuePartitions()

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

public ListTaskQueuePartitions(ListTaskQueuePartitionsRequest $arg[, ContextInterface|null $ctx = null ]) : ListTaskQueuePartitionsResponse
Parameters
$arg : ListTaskQueuePartitionsRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ListTaskQueuePartitionsResponse

ListWorkflowExecutions()

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

public ListWorkflowExecutions(ListWorkflowExecutionsRequest $arg[, ContextInterface|null $ctx = null ]) : ListWorkflowExecutionsResponse
Parameters
$arg : ListWorkflowExecutionsRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ListWorkflowExecutionsResponse

PatchSchedule()

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

public PatchSchedule(PatchScheduleRequest $arg[, ContextInterface|null $ctx = null ]) : PatchScheduleResponse
Parameters
$arg : PatchScheduleRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
PatchScheduleResponse

PollActivityTaskQueue()

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

public PollActivityTaskQueue(PollActivityTaskQueueRequest $arg[, ContextInterface|null $ctx = null ]) : PollActivityTaskQueueResponse

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
$arg : PollActivityTaskQueueRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
PollActivityTaskQueueResponse

PollNexusTaskQueue()

PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks.

public PollNexusTaskQueue(PollNexusTaskQueueRequest $arg[, ContextInterface|null $ctx = null ]) : PollNexusTaskQueueResponse

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

Parameters
$arg : PollNexusTaskQueueRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
PollNexusTaskQueueResponse

PollWorkflowExecutionUpdate()

Polls a workflow execution for the outcome of a workflow execution 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.

public PollWorkflowExecutionUpdate(PollWorkflowExecutionUpdateRequest $arg[, ContextInterface|null $ctx = null ]) : PollWorkflowExecutionUpdateResponse

(-- 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
$arg : PollWorkflowExecutionUpdateRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
PollWorkflowExecutionUpdateResponse

PollWorkflowTaskQueue()

PollWorkflowTaskQueue is called by workers to make progress on workflows.

public PollWorkflowTaskQueue(PollWorkflowTaskQueueRequest $arg[, ContextInterface|null $ctx = null ]) : PollWorkflowTaskQueueResponse

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
$arg : PollWorkflowTaskQueueRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
PollWorkflowTaskQueueResponse

QueryWorkflow()

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

public QueryWorkflow(QueryWorkflowRequest $arg[, ContextInterface|null $ctx = null ]) : QueryWorkflowResponse
Parameters
$arg : QueryWorkflowRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
QueryWorkflowResponse

RecordActivityTaskHeartbeat()

RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.

public RecordActivityTaskHeartbeat(RecordActivityTaskHeartbeatRequest $arg[, ContextInterface|null $ctx = null ]) : RecordActivityTaskHeartbeatResponse

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
$arg : RecordActivityTaskHeartbeatRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RecordActivityTaskHeartbeatResponse

RecordActivityTaskHeartbeatById()

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

public RecordActivityTaskHeartbeatById(RecordActivityTaskHeartbeatByIdRequest $arg[, ContextInterface|null $ctx = null ]) : RecordActivityTaskHeartbeatByIdResponse

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

Parameters
$arg : RecordActivityTaskHeartbeatByIdRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RecordActivityTaskHeartbeatByIdResponse

RegisterNamespace()

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

public RegisterNamespace(RegisterNamespaceRequest $arg[, ContextInterface|null $ctx = null ]) : RegisterNamespaceResponse

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
$arg : RegisterNamespaceRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RegisterNamespaceResponse

RequestCancelWorkflowExecution()

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

public RequestCancelWorkflowExecution(RequestCancelWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : RequestCancelWorkflowExecutionResponse

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
$arg : RequestCancelWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RequestCancelWorkflowExecutionResponse

ResetStickyTaskQueue()

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.

public ResetStickyTaskQueue(ResetStickyTaskQueueRequest $arg[, ContextInterface|null $ctx = null ]) : ResetStickyTaskQueueResponse

Things cleared are:

  1. StickyTaskQueue
  2. StickyScheduleToStartTimeout

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

Parameters
$arg : ResetStickyTaskQueueRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ResetStickyTaskQueueResponse

ResetWorkflowExecution()

ResetWorkflowExecution will reset an existing workflow execution to a specified `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current execution instance.

public ResetWorkflowExecution(ResetWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : ResetWorkflowExecutionResponse

TODO: Does exclusive here mean just the completed event, or also WFT started? Otherwise the task is doomed to time out?

Parameters
$arg : ResetWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ResetWorkflowExecutionResponse

RespondActivityTaskCanceled()

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

public RespondActivityTaskCanceled(RespondActivityTaskCanceledRequest $arg[, ContextInterface|null $ctx = null ]) : RespondActivityTaskCanceledResponse

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
$arg : RespondActivityTaskCanceledRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondActivityTaskCanceledResponse

RespondActivityTaskCanceledById()

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

public RespondActivityTaskCanceledById(RespondActivityTaskCanceledByIdRequest $arg[, ContextInterface|null $ctx = null ]) : RespondActivityTaskCanceledByIdResponse

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

Parameters
$arg : RespondActivityTaskCanceledByIdRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondActivityTaskCanceledByIdResponse

RespondActivityTaskCompleted()

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

public RespondActivityTaskCompleted(RespondActivityTaskCompletedRequest $arg[, ContextInterface|null $ctx = null ]) : RespondActivityTaskCompletedResponse

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
$arg : RespondActivityTaskCompletedRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondActivityTaskCompletedResponse

RespondActivityTaskCompletedById()

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

public RespondActivityTaskCompletedById(RespondActivityTaskCompletedByIdRequest $arg[, ContextInterface|null $ctx = null ]) : RespondActivityTaskCompletedByIdResponse

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

Parameters
$arg : RespondActivityTaskCompletedByIdRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondActivityTaskCompletedByIdResponse

RespondActivityTaskFailed()

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

public RespondActivityTaskFailed(RespondActivityTaskFailedRequest $arg[, ContextInterface|null $ctx = null ]) : RespondActivityTaskFailedResponse

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
$arg : RespondActivityTaskFailedRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondActivityTaskFailedResponse

RespondActivityTaskFailedById()

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

public RespondActivityTaskFailedById(RespondActivityTaskFailedByIdRequest $arg[, ContextInterface|null $ctx = null ]) : RespondActivityTaskFailedByIdResponse

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

Parameters
$arg : RespondActivityTaskFailedByIdRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondActivityTaskFailedByIdResponse

RespondNexusTaskCompleted()

RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue.

public RespondNexusTaskCompleted(RespondNexusTaskCompletedRequest $arg[, ContextInterface|null $ctx = null ]) : RespondNexusTaskCompletedResponse

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

Parameters
$arg : RespondNexusTaskCompletedRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondNexusTaskCompletedResponse

RespondNexusTaskFailed()

RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue.

public RespondNexusTaskFailed(RespondNexusTaskFailedRequest $arg[, ContextInterface|null $ctx = null ]) : RespondNexusTaskFailedResponse

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

Parameters
$arg : RespondNexusTaskFailedRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondNexusTaskFailedResponse

RespondQueryTaskCompleted()

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

public RespondQueryTaskCompleted(RespondQueryTaskCompletedRequest $arg[, ContextInterface|null $ctx = null ]) : RespondQueryTaskCompletedResponse

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
$arg : RespondQueryTaskCompletedRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondQueryTaskCompletedResponse

RespondWorkflowTaskCompleted()

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

public RespondWorkflowTaskCompleted(RespondWorkflowTaskCompletedRequest $arg[, ContextInterface|null $ctx = null ]) : RespondWorkflowTaskCompletedResponse

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
$arg : RespondWorkflowTaskCompletedRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondWorkflowTaskCompletedResponse

RespondWorkflowTaskFailed()

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

public RespondWorkflowTaskFailed(RespondWorkflowTaskFailedRequest $arg[, ContextInterface|null $ctx = null ]) : RespondWorkflowTaskFailedResponse

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
$arg : RespondWorkflowTaskFailedRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
RespondWorkflowTaskFailedResponse

ScanWorkflowExecutions()

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

public ScanWorkflowExecutions(ScanWorkflowExecutionsRequest $arg[, ContextInterface|null $ctx = null ]) : ScanWorkflowExecutionsResponse

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

Parameters
$arg : ScanWorkflowExecutionsRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
ScanWorkflowExecutionsResponse

SignalWithStartWorkflowExecution()

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

public SignalWithStartWorkflowExecution(SignalWithStartWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : SignalWithStartWorkflowExecutionResponse

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
$arg : SignalWithStartWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
SignalWithStartWorkflowExecutionResponse

SignalWorkflowExecution()

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

public SignalWorkflowExecution(SignalWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : SignalWorkflowExecutionResponse

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

Parameters
$arg : SignalWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
SignalWorkflowExecutionResponse

StartBatchOperation()

StartBatchOperation starts a new batch operation

public StartBatchOperation(StartBatchOperationRequest $arg[, ContextInterface|null $ctx = null ]) : StartBatchOperationResponse
Parameters
$arg : StartBatchOperationRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
StartBatchOperationResponse

StartWorkflowExecution()

StartWorkflowExecution starts a new workflow execution.

public StartWorkflowExecution(StartWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : StartWorkflowExecutionResponse

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
$arg : StartWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
StartWorkflowExecutionResponse

StopBatchOperation()

StopBatchOperation stops a batch operation

public StopBatchOperation(StopBatchOperationRequest $arg[, ContextInterface|null $ctx = null ]) : StopBatchOperationResponse
Parameters
$arg : StopBatchOperationRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
StopBatchOperationResponse

TerminateWorkflowExecution()

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

public TerminateWorkflowExecution(TerminateWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : TerminateWorkflowExecutionResponse
Parameters
$arg : TerminateWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
TerminateWorkflowExecutionResponse

UpdateNamespace()

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

public UpdateNamespace(UpdateNamespaceRequest $arg[, ContextInterface|null $ctx = null ]) : UpdateNamespaceResponse
Parameters
$arg : UpdateNamespaceRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
UpdateNamespaceResponse

UpdateSchedule()

Changes the configuration or state of an existing schedule.

public UpdateSchedule(UpdateScheduleRequest $arg[, ContextInterface|null $ctx = null ]) : UpdateScheduleResponse
Parameters
$arg : UpdateScheduleRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
UpdateScheduleResponse

UpdateWorkerBuildIdCompatibility()

Deprecated. Use `UpdateWorkerVersioningRules`.

public UpdateWorkerBuildIdCompatibility(UpdateWorkerBuildIdCompatibilityRequest $arg[, ContextInterface|null $ctx = null ]) : UpdateWorkerBuildIdCompatibilityResponse

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
$arg : UpdateWorkerBuildIdCompatibilityRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
UpdateWorkerBuildIdCompatibilityResponse

UpdateWorkerVersioningRules()

Allows updating the Build ID assignment and redirect rules for a given Task Queue.

public UpdateWorkerVersioningRules(UpdateWorkerVersioningRulesRequest $arg[, ContextInterface|null $ctx = null ]) : UpdateWorkerVersioningRulesResponse

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
$arg : UpdateWorkerVersioningRulesRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
UpdateWorkerVersioningRulesResponse

UpdateWorkflowExecution()

Invokes the specified update function on user workflow code.

public UpdateWorkflowExecution(UpdateWorkflowExecutionRequest $arg[, ContextInterface|null $ctx = null ]) : UpdateWorkflowExecutionResponse
Parameters
$arg : UpdateWorkflowExecutionRequest
$ctx : ContextInterface|null = null
Tags
throws
ServiceClientException
Return values
UpdateWorkflowExecutionResponse

withAuthKey()

Set the authentication token for the service client.

public withAuthKey(Stringable|string $key) : static

This is the equivalent of providing an "Authorization" header with "Bearer " + the given key. This will overwrite any "Authorization" header that may be on the context before each request to the Temporal service. You may pass your own Stringable implementation to be able to change the key dynamically.

Parameters
$key : Stringable|string
Return values
static

invoke()

protected invoke(non-empty-string $method, object $arg[, ContextInterface|null $ctx = null ]) : mixed
Parameters
$method : non-empty-string

RPC method name

$arg : object
$ctx : ContextInterface|null = null
Tags
throws
ClientException

call()

Call a gRPC method.

private call(non-empty-string $method, object $arg, ContextInterface $ctx) : object

Used in withInterceptorPipeline()

Parameters
$method : non-empty-string
$arg : object
$ctx : ContextInterface
Tags
throws
Exception
Return values
object

usleep()

private usleep(int<0, max> $param) : void
Parameters
$param : int<0, max>

Delay in microseconds


        
On this page

Search results