Safe Haskell | None |
---|---|
Language | Haskell2010 |
Temporal.Core.Client.WorkflowService
Synopsis
- countWorkflowExecutions :: Client -> CountWorkflowExecutionsRequest -> IO (Either RpcError CountWorkflowExecutionsResponse)
- createSchedule :: Client -> CreateScheduleRequest -> IO (Either RpcError CreateScheduleResponse)
- deleteSchedule :: Client -> DeleteScheduleRequest -> IO (Either RpcError DeleteScheduleResponse)
- deprecateNamespace :: Client -> DeprecateNamespaceRequest -> IO (Either RpcError DeprecateNamespaceResponse)
- describeNamespace :: Client -> DescribeNamespaceRequest -> IO (Either RpcError DescribeNamespaceResponse)
- describeSchedule :: Client -> DescribeScheduleRequest -> IO (Either RpcError DescribeScheduleResponse)
- describeTaskQueue :: Client -> DescribeTaskQueueRequest -> IO (Either RpcError DescribeTaskQueueResponse)
- describeWorkflowExecution :: Client -> DescribeWorkflowExecutionRequest -> IO (Either RpcError DescribeWorkflowExecutionResponse)
- getClusterInfo :: Client -> GetClusterInfoRequest -> IO (Either RpcError GetClusterInfoResponse)
- getSearchAttributes :: Client -> GetSearchAttributesRequest -> IO (Either RpcError GetSearchAttributesResponse)
- getSystemInfo :: Client -> GetSystemInfoRequest -> IO (Either RpcError GetSystemInfoResponse)
- getWorkerBuildIdCompatibility :: Client -> GetWorkerBuildIdCompatibilityRequest -> IO (Either RpcError GetWorkerBuildIdCompatibilityResponse)
- getWorkflowExecutionHistory :: Client -> GetWorkflowExecutionHistoryRequest -> IO (Either RpcError GetWorkflowExecutionHistoryResponse)
- getWorkflowExecutionHistoryReverse :: Client -> GetWorkflowExecutionHistoryReverseRequest -> IO (Either RpcError GetWorkflowExecutionHistoryReverseResponse)
- listArchivedWorkflowExecutions :: Client -> ListArchivedWorkflowExecutionsRequest -> IO (Either RpcError ListArchivedWorkflowExecutionsResponse)
- listClosedWorkflowExecutions :: Client -> ListClosedWorkflowExecutionsRequest -> IO (Either RpcError ListClosedWorkflowExecutionsResponse)
- listNamespaces :: Client -> ListNamespacesRequest -> IO (Either RpcError ListNamespacesResponse)
- listOpenWorkflowExecutions :: Client -> ListOpenWorkflowExecutionsRequest -> IO (Either RpcError ListOpenWorkflowExecutionsResponse)
- listScheduleMatchingTimes :: Client -> ListScheduleMatchingTimesRequest -> IO (Either RpcError ListScheduleMatchingTimesResponse)
- listSchedules :: Client -> ListSchedulesRequest -> IO (Either RpcError ListSchedulesResponse)
- listTaskQueuePartitions :: Client -> ListTaskQueuePartitionsRequest -> IO (Either RpcError ListTaskQueuePartitionsResponse)
- listWorkflowExecutions :: Client -> ListWorkflowExecutionsRequest -> IO (Either RpcError ListWorkflowExecutionsResponse)
- patchSchedule :: Client -> PatchScheduleRequest -> IO (Either RpcError PatchScheduleResponse)
- pollActivityTaskQueue :: Client -> PollActivityTaskQueueRequest -> IO (Either RpcError PollActivityTaskQueueResponse)
- pollWorkflowExecutionUpdate :: Client -> PollWorkflowExecutionUpdateRequest -> IO (Either RpcError PollWorkflowExecutionUpdateResponse)
- pollWorkflowTaskQueue :: Client -> PollWorkflowTaskQueueRequest -> IO (Either RpcError PollWorkflowTaskQueueResponse)
- queryWorkflow :: Client -> QueryWorkflowRequest -> IO (Either RpcError QueryWorkflowResponse)
- recordActivityTaskHeartbeat :: Client -> RecordActivityTaskHeartbeatRequest -> IO (Either RpcError RecordActivityTaskHeartbeatResponse)
- recordActivityTaskHeartbeatById :: Client -> RecordActivityTaskHeartbeatByIdRequest -> IO (Either RpcError RecordActivityTaskHeartbeatByIdResponse)
- registerNamespace :: Client -> RegisterNamespaceRequest -> IO (Either RpcError RegisterNamespaceResponse)
- requestCancelWorkflowExecution :: Client -> RequestCancelWorkflowExecutionRequest -> IO (Either RpcError RequestCancelWorkflowExecutionResponse)
- resetStickyTaskQueue :: Client -> ResetStickyTaskQueueRequest -> IO (Either RpcError ResetStickyTaskQueueResponse)
- resetWorkflowExecution :: Client -> ResetWorkflowExecutionRequest -> IO (Either RpcError ResetWorkflowExecutionResponse)
- respondActivityTaskCanceled :: Client -> RespondActivityTaskCanceledRequest -> IO (Either RpcError RespondActivityTaskCanceledResponse)
- respondActivityTaskCanceledById :: Client -> RespondActivityTaskCanceledByIdRequest -> IO (Either RpcError RespondActivityTaskCanceledByIdResponse)
- respondActivityTaskCompleted :: Client -> RespondActivityTaskCompletedRequest -> IO (Either RpcError RespondActivityTaskCompletedResponse)
- respondActivityTaskCompletedById :: Client -> RespondActivityTaskCompletedByIdRequest -> IO (Either RpcError RespondActivityTaskCompletedByIdResponse)
- respondActivityTaskFailed :: Client -> RespondActivityTaskFailedRequest -> IO (Either RpcError RespondActivityTaskFailedResponse)
- respondActivityTaskFailedById :: Client -> RespondActivityTaskFailedByIdRequest -> IO (Either RpcError RespondActivityTaskFailedByIdResponse)
- respondQueryTaskCompleted :: Client -> RespondQueryTaskCompletedRequest -> IO (Either RpcError RespondQueryTaskCompletedResponse)
- respondWorkflowTaskCompleted :: Client -> RespondWorkflowTaskCompletedRequest -> IO (Either RpcError RespondWorkflowTaskCompletedResponse)
- respondWorkflowTaskFailed :: Client -> RespondWorkflowTaskFailedRequest -> IO (Either RpcError RespondWorkflowTaskFailedResponse)
- scanWorkflowExecutions :: Client -> ScanWorkflowExecutionsRequest -> IO (Either RpcError ScanWorkflowExecutionsResponse)
- signalWithStartWorkflowExecution :: Client -> SignalWithStartWorkflowExecutionRequest -> IO (Either RpcError SignalWithStartWorkflowExecutionResponse)
- signalWorkflowExecution :: Client -> SignalWorkflowExecutionRequest -> IO (Either RpcError SignalWorkflowExecutionResponse)
- startWorkflowExecution :: Client -> StartWorkflowExecutionRequest -> IO (Either RpcError StartWorkflowExecutionResponse)
- terminateWorkflowExecution :: Client -> TerminateWorkflowExecutionRequest -> IO (Either RpcError TerminateWorkflowExecutionResponse)
- updateNamespace :: Client -> UpdateNamespaceRequest -> IO (Either RpcError UpdateNamespaceResponse)
- updateSchedule :: Client -> UpdateScheduleRequest -> IO (Either RpcError UpdateScheduleResponse)
- updateWorkflowExecution :: Client -> UpdateWorkflowExecutionRequest -> IO (Either RpcError UpdateWorkflowExecutionResponse)
- updateWorkerBuildIdCompatibility :: Client -> UpdateWorkerBuildIdCompatibilityRequest -> IO (Either RpcError UpdateWorkerBuildIdCompatibilityResponse)
Documentation
countWorkflowExecutions :: Client -> CountWorkflowExecutionsRequest -> IO (Either RpcError CountWorkflowExecutionsResponse) Source #
CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.
createSchedule :: Client -> CreateScheduleRequest -> IO (Either RpcError CreateScheduleResponse) Source #
Creates a new schedule.
deleteSchedule :: Client -> DeleteScheduleRequest -> IO (Either RpcError DeleteScheduleResponse) Source #
Deletes a schedule, removing it from the system.
deprecateNamespace :: Client -> DeprecateNamespaceRequest -> IO (Either RpcError DeprecateNamespaceResponse) Source #
Returns the schedule description and current state of an existing schedule.
describeNamespace :: Client -> DescribeNamespaceRequest -> IO (Either RpcError DescribeNamespaceResponse) Source #
DescribeNamespace returns the information and configuration for a registered namespace.
describeSchedule :: Client -> DescribeScheduleRequest -> IO (Either RpcError DescribeScheduleResponse) Source #
describeTaskQueue :: Client -> DescribeTaskQueueRequest -> IO (Either RpcError DescribeTaskQueueResponse) Source #
DescribeTaskQueue returns information about the target task queue.
describeWorkflowExecution :: Client -> DescribeWorkflowExecutionRequest -> IO (Either RpcError DescribeWorkflowExecutionResponse) Source #
DescribeWorkflowExecution returns information about the specified workflow execution.
getClusterInfo :: Client -> GetClusterInfoRequest -> IO (Either RpcError GetClusterInfoResponse) Source #
GetClusterInfo returns information about temporal cluster
getSearchAttributes :: Client -> GetSearchAttributesRequest -> IO (Either RpcError GetSearchAttributesResponse) Source #
GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs
getSystemInfo :: Client -> GetSystemInfoRequest -> IO (Either RpcError GetSystemInfoResponse) Source #
GetSystemInfo returns information about the system.
getWorkerBuildIdCompatibility :: Client -> GetWorkerBuildIdCompatibilityRequest -> IO (Either RpcError GetWorkerBuildIdCompatibilityResponse) Source #
Fetches the worker build id versioning sets for some task queue and related metadata.
getWorkflowExecutionHistory :: Client -> GetWorkflowExecutionHistoryRequest -> IO (Either RpcError GetWorkflowExecutionHistoryResponse) Source #
GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with
NotFound
if the specified workflow execution is unknown to the service.
getWorkflowExecutionHistoryReverse :: Client -> GetWorkflowExecutionHistoryReverseRequest -> IO (Either RpcError GetWorkflowExecutionHistoryReverseResponse) Source #
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.
listArchivedWorkflowExecutions :: Client -> ListArchivedWorkflowExecutionsRequest -> IO (Either RpcError ListArchivedWorkflowExecutionsResponse) Source #
ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.
listClosedWorkflowExecutions :: Client -> ListClosedWorkflowExecutionsRequest -> IO (Either RpcError ListClosedWorkflowExecutionsResponse) Source #
ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace.
listNamespaces :: Client -> ListNamespacesRequest -> IO (Either RpcError ListNamespacesResponse) Source #
ListNamespaces returns the information and configuration for all namespaces.
listOpenWorkflowExecutions :: Client -> ListOpenWorkflowExecutionsRequest -> IO (Either RpcError ListOpenWorkflowExecutionsResponse) Source #
ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace.
listScheduleMatchingTimes :: Client -> ListScheduleMatchingTimesRequest -> IO (Either RpcError ListScheduleMatchingTimesResponse) Source #
ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.
listSchedules :: Client -> ListSchedulesRequest -> IO (Either RpcError ListSchedulesResponse) Source #
Lists matching times within a range.
listTaskQueuePartitions :: Client -> ListTaskQueuePartitionsRequest -> IO (Either RpcError ListTaskQueuePartitionsResponse) Source #
listWorkflowExecutions :: Client -> ListWorkflowExecutionsRequest -> IO (Either RpcError ListWorkflowExecutionsResponse) Source #
ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.
patchSchedule :: Client -> PatchScheduleRequest -> IO (Either RpcError PatchScheduleResponse) Source #
Makes a specific change to a schedule or triggers an immediate action.
pollActivityTaskQueue :: Client -> PollActivityTaskQueueRequest -> IO (Either RpcError PollActivityTaskQueueResponse) Source #
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.
pollWorkflowExecutionUpdate :: Client -> PollWorkflowExecutionUpdateRequest -> IO (Either RpcError PollWorkflowExecutionUpdateResponse) Source #
pollWorkflowTaskQueue :: Client -> PollWorkflowTaskQueueRequest -> IO (Either RpcError PollWorkflowTaskQueueResponse) Source #
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.
queryWorkflow :: Client -> QueryWorkflowRequest -> IO (Either RpcError QueryWorkflowResponse) Source #
QueryWorkflow requests a query be executed for a specified workflow execution.
recordActivityTaskHeartbeat :: Client -> RecordActivityTaskHeartbeatRequest -> IO (Either RpcError RecordActivityTaskHeartbeatResponse) Source #
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.
recordActivityTaskHeartbeatById :: Client -> RecordActivityTaskHeartbeatByIdRequest -> IO (Either RpcError RecordActivityTaskHeartbeatByIdResponse) Source #
See RecordActivityTaskHeartbeat
. This version allows clients to record heartbeats by
namespaceworkflow idactivity id instead of task token.
registerNamespace :: Client -> RegisterNamespaceRequest -> IO (Either RpcError RegisterNamespaceResponse) Source #
requestCancelWorkflowExecution :: Client -> RequestCancelWorkflowExecutionRequest -> IO (Either RpcError RequestCancelWorkflowExecutionResponse) Source #
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.
resetStickyTaskQueue :: Client -> ResetStickyTaskQueueRequest -> IO (Either RpcError ResetStickyTaskQueueResponse) Source #
ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of a given workflow. This is prudent for workers to perform if a workflow has been paged out of their cache.
Things cleared are: 1. StickyTaskQueue 2. StickyScheduleToStartTimeout
resetWorkflowExecution :: Client -> ResetWorkflowExecutionRequest -> IO (Either RpcError ResetWorkflowExecutionResponse) Source #
ResetWorkflowExecution will reset an existing workflow execution to a specified
WORKFLOW_TASK_COMPLETED
event (exclusive). It will immediately terminate the current
execution instance.
respondActivityTaskCanceled :: Client -> RespondActivityTaskCanceledRequest -> IO (Either RpcError RespondActivityTaskCanceledResponse) Source #
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.
respondActivityTaskCanceledById :: Client -> RespondActivityTaskCanceledByIdRequest -> IO (Either RpcError RespondActivityTaskCanceledByIdResponse) Source #
See RecordActivityTaskCanceled
. This version allows clients to record failures by
namespaceworkflow idactivity id instead of task token.
respondActivityTaskCompleted :: Client -> RespondActivityTaskCompletedRequest -> IO (Either RpcError RespondActivityTaskCompletedResponse) Source #
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.
respondActivityTaskCompletedById :: Client -> RespondActivityTaskCompletedByIdRequest -> IO (Either RpcError RespondActivityTaskCompletedByIdResponse) Source #
See RecordActivityTaskCompleted
. This version allows clients to record completions by
namespaceworkflow idactivity id instead of task token.
respondActivityTaskFailed :: Client -> RespondActivityTaskFailedRequest -> IO (Either RpcError RespondActivityTaskFailedResponse) Source #
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.
respondActivityTaskFailedById :: Client -> RespondActivityTaskFailedByIdRequest -> IO (Either RpcError RespondActivityTaskFailedByIdResponse) Source #
See RecordActivityTaskCompleted
. This version allows clients to record completions by
namespaceworkflow idactivity id instead of task token.
respondQueryTaskCompleted :: Client -> RespondQueryTaskCompletedRequest -> IO (Either RpcError RespondQueryTaskCompletedResponse) Source #
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.
respondWorkflowTaskCompleted :: Client -> RespondWorkflowTaskCompletedRequest -> IO (Either RpcError RespondWorkflowTaskCompletedResponse) Source #
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).
respondWorkflowTaskFailed :: Client -> RespondWorkflowTaskFailedRequest -> IO (Either RpcError RespondWorkflowTaskFailedResponse) Source #
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.
scanWorkflowExecutions :: Client -> ScanWorkflowExecutionsRequest -> IO (Either RpcError ScanWorkflowExecutionsResponse) Source #
ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific namespace without order.
signalWithStartWorkflowExecution :: Client -> SignalWithStartWorkflowExecutionRequest -> IO (Either RpcError SignalWithStartWorkflowExecutionResponse) Source #
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.
signalWorkflowExecution :: Client -> SignalWorkflowExecutionRequest -> IO (Either RpcError SignalWorkflowExecutionResponse) Source #
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.
startWorkflowExecution :: Client -> StartWorkflowExecutionRequest -> IO (Either RpcError StartWorkflowExecutionResponse) Source #
terminateWorkflowExecution :: Client -> TerminateWorkflowExecutionRequest -> IO (Either RpcError TerminateWorkflowExecutionResponse) Source #
terminates an existing workflow execution by recording a
WORKFLOW_EXECUTION_TERMINATED
event in the history and immediately terminating the
execution instance.
updateNamespace :: Client -> UpdateNamespaceRequest -> IO (Either RpcError UpdateNamespaceResponse) Source #
UpdateNamespace is used to update the information and configuration of a registered namespace.
updateSchedule :: Client -> UpdateScheduleRequest -> IO (Either RpcError UpdateScheduleResponse) Source #
Changes the configuration or state of an existing schedule.
updateWorkflowExecution :: Client -> UpdateWorkflowExecutionRequest -> IO (Either RpcError UpdateWorkflowExecutionResponse) Source #
Invokes the specified update function on user workflow code.
updateWorkerBuildIdCompatibility :: Client -> UpdateWorkerBuildIdCompatibilityRequest -> IO (Either RpcError UpdateWorkerBuildIdCompatibilityResponse) Source #
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.