Package com.uber.cadence
Interface WorkflowService.Iface
-
- All Known Subinterfaces:
IWorkflowService
- All Known Implementing Classes:
IWorkflowServiceBase,MigrationIWorkflowService,TestWorkflowEnvironmentInternal.WorkflowServiceWrapper,TestWorkflowService,Thrift2ProtoAdapter,WorkflowService.Client,WorkflowServiceTChannel
- Enclosing class:
- WorkflowService
public static interface WorkflowService.IfaceWorkflowService API is exposed to provide support for long running applications. Application is expected to call StartWorkflowExecution to create an instance for each instance of long running workflow. Such applications are expected to have a worker which regularly polls for DecisionTask and ActivityTask from the WorkflowService. For each DecisionTask, application is expected to process the history of events for that session and respond back with next decisions. For each ActivityTask, application is expected to execute the actual logic for that task and respond back with completion or failure. Worker is expected to regularly heartbeat while activity task is running.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CountWorkflowExecutionsResponseCountWorkflowExecutions(CountWorkflowExecutionsRequest countRequest)CountWorkflowExecutions is a visibility API to count of workflow executions in a specific domain.voidDeprecateDomain(DeprecateDomainRequest deprecateRequest)DeprecateDomain us used to update status of a registered domain to DEPRECATED.DescribeDomainResponseDescribeDomain(DescribeDomainRequest describeRequest)DescribeDomain returns the information and configuration for a registered domain.DescribeTaskListResponseDescribeTaskList(DescribeTaskListRequest request)DescribeTaskList returns information about the target tasklist, right now this API returns the pollers which polled this tasklist in last few minutes.DescribeWorkflowExecutionResponseDescribeWorkflowExecution(DescribeWorkflowExecutionRequest describeRequest)DescribeWorkflowExecution returns information about the specified workflow execution.ClusterInfoGetClusterInfo()GetClusterInfo returns information about cadence clusterGetSearchAttributesResponseGetSearchAttributes()GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIsGetTaskListsByDomainResponseGetTaskListsByDomain(GetTaskListsByDomainRequest request)GetTaskListsByDomain returns the list of all the task lists for a domainName.GetWorkflowExecutionHistoryResponseGetWorkflowExecutionHistory(GetWorkflowExecutionHistoryRequest getRequest)Returns the history of specified workflow execution.ListArchivedWorkflowExecutionsResponseListArchivedWorkflowExecutions(ListArchivedWorkflowExecutionsRequest listRequest)ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific domain.ListClosedWorkflowExecutionsResponseListClosedWorkflowExecutions(ListClosedWorkflowExecutionsRequest listRequest)ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific domain.ListDomainsResponseListDomains(ListDomainsRequest listRequest)ListDomains returns the information and configuration for all domains.ListOpenWorkflowExecutionsResponseListOpenWorkflowExecutions(ListOpenWorkflowExecutionsRequest listRequest)ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific domain.ListTaskListPartitionsResponseListTaskListPartitions(ListTaskListPartitionsRequest request)ReapplyEvents applies stale events to the current workflow and current runListWorkflowExecutionsResponseListWorkflowExecutions(ListWorkflowExecutionsRequest listRequest)ListWorkflowExecutions is a visibility API to list workflow executions in a specific domain.PollForActivityTaskResponsePollForActivityTask(PollForActivityTaskRequest pollRequest)PollForActivityTask is called by application worker to process ActivityTask from a specific taskList.PollForDecisionTaskResponsePollForDecisionTask(PollForDecisionTaskRequest pollRequest)PollForDecisionTask is called by application worker to process DecisionTask from a specific taskList.QueryWorkflowResponseQueryWorkflow(QueryWorkflowRequest queryRequest)QueryWorkflow returns query result for a specified workflow executionRecordActivityTaskHeartbeatResponseRecordActivityTaskHeartbeat(RecordActivityTaskHeartbeatRequest heartbeatRequest)RecordActivityTaskHeartbeat is called by application worker while it is processing an ActivityTask.RecordActivityTaskHeartbeatResponseRecordActivityTaskHeartbeatByID(RecordActivityTaskHeartbeatByIDRequest heartbeatRequest)RecordActivityTaskHeartbeatByID is called by application worker while it is processing an ActivityTask.voidRefreshWorkflowTasks(RefreshWorkflowTasksRequest request)RefreshWorkflowTasks refreshes all tasks of a workflowvoidRegisterDomain(RegisterDomainRequest registerRequest)RegisterDomain creates a new domain which can be used as a container for all resources.voidRequestCancelWorkflowExecution(RequestCancelWorkflowExecutionRequest cancelRequest)RequestCancelWorkflowExecution is called by application worker when it wants to request cancellation of a workflow instance.ResetStickyTaskListResponseResetStickyTaskList(ResetStickyTaskListRequest resetRequest)Reset the sticky tasklist related information in mutable state of a given workflow.ResetWorkflowExecutionResponseResetWorkflowExecution(ResetWorkflowExecutionRequest resetRequest)ResetWorkflowExecution reset an existing workflow execution to DecisionTaskCompleted event(exclusive).voidRespondActivityTaskCanceled(RespondActivityTaskCanceledRequest canceledRequest)RespondActivityTaskCanceled is called by application worker when it is successfully canceled an ActivityTask.voidRespondActivityTaskCanceledByID(RespondActivityTaskCanceledByIDRequest canceledRequest)RespondActivityTaskCanceledByID is called by application worker when it is successfully canceled an ActivityTask.voidRespondActivityTaskCompleted(RespondActivityTaskCompletedRequest completeRequest)RespondActivityTaskCompleted is called by application worker when it is done processing an ActivityTask.voidRespondActivityTaskCompletedByID(RespondActivityTaskCompletedByIDRequest completeRequest)RespondActivityTaskCompletedByID is called by application worker when it is done processing an ActivityTask.voidRespondActivityTaskFailed(RespondActivityTaskFailedRequest failRequest)RespondActivityTaskFailed is called by application worker when it is done processing an ActivityTask.voidRespondActivityTaskFailedByID(RespondActivityTaskFailedByIDRequest failRequest)RespondActivityTaskFailedByID is called by application worker when it is done processing an ActivityTask.RespondDecisionTaskCompletedResponseRespondDecisionTaskCompleted(RespondDecisionTaskCompletedRequest completeRequest)RespondDecisionTaskCompleted is called by application worker to complete a DecisionTask handed as a result of 'PollForDecisionTask' API call.voidRespondDecisionTaskFailed(RespondDecisionTaskFailedRequest failedRequest)RespondDecisionTaskFailed is called by application worker to indicate failure.voidRespondQueryTaskCompleted(RespondQueryTaskCompletedRequest completeRequest)RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a DecisionTask for query) as a result of 'PollForDecisionTask' API call.RestartWorkflowExecutionResponseRestartWorkflowExecution(RestartWorkflowExecutionRequest restartRequest)RestartWorkflowExecution restarts a previous workflow If the workflow is currently running it will terminate and restartListWorkflowExecutionsResponseScanWorkflowExecutions(ListWorkflowExecutionsRequest listRequest)ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific domain without order.StartWorkflowExecutionResponseSignalWithStartWorkflowExecution(SignalWithStartWorkflowExecutionRequest signalWithStartRequest)SignalWithStartWorkflowExecution is used to ensure sending signal to a workflow.SignalWithStartWorkflowExecutionAsyncResponseSignalWithStartWorkflowExecutionAsync(SignalWithStartWorkflowExecutionAsyncRequest signalWithStartRequest)SignalWithStartWorkflowExecutionAsync is used to ensure sending signal to a workflow asynchronously.voidSignalWorkflowExecution(SignalWorkflowExecutionRequest signalRequest)SignalWorkflowExecution is used to send a signal event to running workflow execution.StartWorkflowExecutionResponseStartWorkflowExecution(StartWorkflowExecutionRequest startRequest)StartWorkflowExecution starts a new long running workflow instance.StartWorkflowExecutionAsyncResponseStartWorkflowExecutionAsync(StartWorkflowExecutionAsyncRequest startRequest)StartWorkflowExecutionAsync starts a new long running workflow instance asynchronously.voidTerminateWorkflowExecution(TerminateWorkflowExecutionRequest terminateRequest)TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event in the history and immediately terminating the execution instance.UpdateDomainResponseUpdateDomain(UpdateDomainRequest updateRequest)UpdateDomain is used to update the information and configuration for a registered domain.
-
-
-
Method Detail
-
RegisterDomain
void RegisterDomain(RegisterDomainRequest registerRequest) throws BadRequestError, DomainAlreadyExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
RegisterDomain creates a new domain which can be used as a container for all resources. Domain is a top level entity within Cadence, used as a container for all resources like workflow executions, tasklists, etc. Domain acts as a sandbox and provides isolation for all resources within the domain. All resources belongs to exactly one domain.- Parameters:
registerRequest-- Throws:
BadRequestErrorDomainAlreadyExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
DescribeDomain
DescribeDomainResponse DescribeDomain(DescribeDomainRequest describeRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
DescribeDomain returns the information and configuration for a registered domain.- Parameters:
describeRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
ListDomains
ListDomainsResponse ListDomains(ListDomainsRequest listRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
ListDomains returns the information and configuration for all domains.- Parameters:
listRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
UpdateDomain
UpdateDomainResponse UpdateDomain(UpdateDomainRequest updateRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, ClientVersionNotSupportedError, org.apache.thrift.TException
UpdateDomain is used to update the information and configuration for a registered domain.- Parameters:
updateRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorDomainNotActiveErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
DeprecateDomain
void DeprecateDomain(DeprecateDomainRequest deprecateRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, ClientVersionNotSupportedError, org.apache.thrift.TException
DeprecateDomain us used to update status of a registered domain to DEPRECATED. Once the domain is deprecated it cannot be used to start new workflow executions. Existing workflow executions will continue to run on deprecated domains.- Parameters:
deprecateRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorDomainNotActiveErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
RestartWorkflowExecution
RestartWorkflowExecutionResponse RestartWorkflowExecution(RestartWorkflowExecutionRequest restartRequest) throws BadRequestError, ServiceBusyError, DomainNotActiveError, LimitExceededError, EntityNotExistsError, ClientVersionNotSupportedError, org.apache.thrift.TException
RestartWorkflowExecution restarts a previous workflow If the workflow is currently running it will terminate and restart- Parameters:
restartRequest-- Throws:
BadRequestErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorEntityNotExistsErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
StartWorkflowExecution
StartWorkflowExecutionResponse StartWorkflowExecution(StartWorkflowExecutionRequest startRequest) throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, DomainNotActiveError, LimitExceededError, EntityNotExistsError, ClientVersionNotSupportedError, org.apache.thrift.TException
StartWorkflowExecution starts a new long running workflow instance. It will create the instance with 'WorkflowExecutionStarted' event in history and also schedule the first DecisionTask for the worker to make the first decision for this instance. It will return 'WorkflowExecutionAlreadyStartedError', if an instance already exists with same workflowId.- Parameters:
startRequest-- Throws:
BadRequestErrorWorkflowExecutionAlreadyStartedErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorEntityNotExistsErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
StartWorkflowExecutionAsync
StartWorkflowExecutionAsyncResponse StartWorkflowExecutionAsync(StartWorkflowExecutionAsyncRequest startRequest) throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, DomainNotActiveError, LimitExceededError, EntityNotExistsError, ClientVersionNotSupportedError, org.apache.thrift.TException
StartWorkflowExecutionAsync starts a new long running workflow instance asynchronously. It will push a StartWorkflowExecutionRequest to a queue and immediately return a response. The request will be processed by a separate consumer eventually.- Parameters:
startRequest-- Throws:
BadRequestErrorWorkflowExecutionAlreadyStartedErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorEntityNotExistsErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
GetWorkflowExecutionHistory
GetWorkflowExecutionHistoryResponse GetWorkflowExecutionHistory(GetWorkflowExecutionHistoryRequest getRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
Returns the history of specified workflow execution. It fails with 'EntityNotExistError' if speficied workflow execution in unknown to the service.- Parameters:
getRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
PollForDecisionTask
PollForDecisionTaskResponse PollForDecisionTask(PollForDecisionTaskRequest pollRequest) throws BadRequestError, ServiceBusyError, LimitExceededError, EntityNotExistsError, DomainNotActiveError, ClientVersionNotSupportedError, org.apache.thrift.TException
PollForDecisionTask is called by application worker to process DecisionTask from a specific taskList. A DecisionTask is dispatched to callers for active workflow executions, with pending decisions. Application is then expected to call 'RespondDecisionTaskCompleted' API when it is done processing the DecisionTask. It will also create a 'DecisionTaskStarted' event in the history for that session before handing off DecisionTask to application worker.- Parameters:
pollRequest-- Throws:
BadRequestErrorServiceBusyErrorLimitExceededErrorEntityNotExistsErrorDomainNotActiveErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
RespondDecisionTaskCompleted
RespondDecisionTaskCompletedResponse RespondDecisionTaskCompleted(RespondDecisionTaskCompletedRequest completeRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RespondDecisionTaskCompleted is called by application worker to complete a DecisionTask handed as a result of 'PollForDecisionTask' API call. Completing a DecisionTask will result in new events for the workflow execution and potentially new ActivityTask being created for corresponding decisions. It will also create a DecisionTaskCompleted event in the history for that session. Use the 'taskToken' provided as response of PollForDecisionTask API call for completing the DecisionTask. The response could contain a new decision task if there is one or if the request asking for one.- Parameters:
completeRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RespondDecisionTaskFailed
void RespondDecisionTaskFailed(RespondDecisionTaskFailedRequest failedRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RespondDecisionTaskFailed is called by application worker to indicate failure. This results in DecisionTaskFailedEvent written to the history and a new DecisionTask created. This API can be used by client to either clear sticky tasklist or report any panics during DecisionTask processing. Cadence will only append first DecisionTaskFailed event to the history of workflow execution for consecutive failures.- Parameters:
failedRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
PollForActivityTask
PollForActivityTaskResponse PollForActivityTask(PollForActivityTaskRequest pollRequest) throws BadRequestError, ServiceBusyError, LimitExceededError, EntityNotExistsError, DomainNotActiveError, ClientVersionNotSupportedError, org.apache.thrift.TException
PollForActivityTask is called by application worker to process ActivityTask from a specific taskList. ActivityTask is dispatched to callers whenever a ScheduleTask decision is made for a workflow execution. Application is expected to call 'RespondActivityTaskCompleted' or 'RespondActivityTaskFailed' once it is done processing the task. Application also needs to call 'RecordActivityTaskHeartbeat' API within 'heartbeatTimeoutSeconds' interval to prevent the task from getting timed out. An event 'ActivityTaskStarted' event is also written to workflow execution history before the ActivityTask is dispatched to application worker.- Parameters:
pollRequest-- Throws:
BadRequestErrorServiceBusyErrorLimitExceededErrorEntityNotExistsErrorDomainNotActiveErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
RecordActivityTaskHeartbeat
RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeat(RecordActivityTaskHeartbeatRequest heartbeatRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RecordActivityTaskHeartbeat is called by application worker while it is processing an ActivityTask. If worker fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeat' will fail with 'EntityNotExistsError' in such situations. Use the 'taskToken' provided as response of PollForActivityTask API call for heartbeating.- Parameters:
heartbeatRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RecordActivityTaskHeartbeatByID
RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeatByID(RecordActivityTaskHeartbeatByIDRequest heartbeatRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RecordActivityTaskHeartbeatByID is called by application worker while it is processing an ActivityTask. If worker fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeatByID' will fail with 'EntityNotExistsError' in such situations. Instead of using 'taskToken' like in RecordActivityTaskHeartbeat, use Domain, WorkflowID and ActivityID- Parameters:
heartbeatRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RespondActivityTaskCompleted
void RespondActivityTaskCompleted(RespondActivityTaskCompletedRequest completeRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RespondActivityTaskCompleted is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new DecisionTask created for the workflow so new decisions could be made. Use the 'taskToken' provided as response of PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity timeout.- Parameters:
completeRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RespondActivityTaskCompletedByID
void RespondActivityTaskCompletedByID(RespondActivityTaskCompletedByIDRequest completeRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RespondActivityTaskCompletedByID is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new DecisionTask created for the workflow so new decisions could be made. Similar to RespondActivityTaskCompleted but use Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not valid anymore due to activity timeout.- Parameters:
completeRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RespondActivityTaskFailed
void RespondActivityTaskFailed(RespondActivityTaskFailedRequest failRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RespondActivityTaskFailed is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new DecisionTask created for the workflow instance so new decisions could be made. Use the 'taskToken' provided as response of PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity timeout.- Parameters:
failRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RespondActivityTaskFailedByID
void RespondActivityTaskFailedByID(RespondActivityTaskFailedByIDRequest failRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RespondActivityTaskFailedByID is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new DecisionTask created for the workflow instance so new decisions could be made. Similar to RespondActivityTaskFailed but use Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not valid anymore due to activity timeout.- Parameters:
failRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RespondActivityTaskCanceled
void RespondActivityTaskCanceled(RespondActivityTaskCanceledRequest canceledRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RespondActivityTaskCanceled is called by application worker when it is successfully canceled an ActivityTask. It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new DecisionTask created for the workflow instance so new decisions could be made. Use the 'taskToken' provided as response of PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity timeout.- Parameters:
canceledRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RespondActivityTaskCanceledByID
void RespondActivityTaskCanceledByID(RespondActivityTaskCanceledByIDRequest canceledRequest) throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RespondActivityTaskCanceledByID is called by application worker when it is successfully canceled an ActivityTask. It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new DecisionTask created for the workflow instance so new decisions could be made. Similar to RespondActivityTaskCanceled but use Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not valid anymore due to activity timeout.- Parameters:
canceledRequest-- Throws:
BadRequestErrorEntityNotExistsErrorDomainNotActiveErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
RequestCancelWorkflowExecution
void RequestCancelWorkflowExecution(RequestCancelWorkflowExecutionRequest cancelRequest) throws BadRequestError, EntityNotExistsError, CancellationAlreadyRequestedError, ServiceBusyError, DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
RequestCancelWorkflowExecution is called by application worker when it wants to request cancellation of a workflow instance. It will result in a new 'WorkflowExecutionCancelRequested' event being written to the workflow history and a new DecisionTask created for the workflow instance so new decisions could be made. It fails with 'EntityNotExistsError' if the workflow is not valid anymore due to completion or doesn't exist.- Parameters:
cancelRequest-- Throws:
BadRequestErrorEntityNotExistsErrorCancellationAlreadyRequestedErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
SignalWorkflowExecution
void SignalWorkflowExecution(SignalWorkflowExecutionRequest signalRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
SignalWorkflowExecution is used to send a signal event to running workflow execution. This results in WorkflowExecutionSignaled event recorded in the history and a decision task being created for the execution.- Parameters:
signalRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
SignalWithStartWorkflowExecution
StartWorkflowExecutionResponse SignalWithStartWorkflowExecution(SignalWithStartWorkflowExecutionRequest signalWithStartRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, LimitExceededError, WorkflowExecutionAlreadyStartedError, ClientVersionNotSupportedError, org.apache.thrift.TException
SignalWithStartWorkflowExecution is used to ensure sending signal to a workflow. If the workflow is running, this results in WorkflowExecutionSignaled event being recorded in the history and a decision task being created for the execution. If the workflow is not running or not found, this results in WorkflowExecutionStarted and WorkflowExecutionSignaled events being recorded in history, and a decision task being created for the execution- Parameters:
signalWithStartRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorWorkflowExecutionAlreadyStartedErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
SignalWithStartWorkflowExecutionAsync
SignalWithStartWorkflowExecutionAsyncResponse SignalWithStartWorkflowExecutionAsync(SignalWithStartWorkflowExecutionAsyncRequest signalWithStartRequest) throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, DomainNotActiveError, LimitExceededError, EntityNotExistsError, ClientVersionNotSupportedError, org.apache.thrift.TException
SignalWithStartWorkflowExecutionAsync is used to ensure sending signal to a workflow asynchronously. It will push a SignalWithStartWorkflowExecutionRequest to a queue and immediately return a response. The request will be processed by a separate consumer eventually.- Parameters:
signalWithStartRequest-- Throws:
BadRequestErrorWorkflowExecutionAlreadyStartedErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorEntityNotExistsErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
ResetWorkflowExecution
ResetWorkflowExecutionResponse ResetWorkflowExecution(ResetWorkflowExecutionRequest resetRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, org.apache.thrift.TException
ResetWorkflowExecution reset an existing workflow execution to DecisionTaskCompleted event(exclusive). And it will immediately terminating the current execution instance.- Parameters:
resetRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
TerminateWorkflowExecution
void TerminateWorkflowExecution(TerminateWorkflowExecutionRequest terminateRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event in the history and immediately terminating the execution instance.- Parameters:
terminateRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorDomainNotActiveErrorLimitExceededErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
ListOpenWorkflowExecutions
ListOpenWorkflowExecutionsResponse ListOpenWorkflowExecutions(ListOpenWorkflowExecutionsRequest listRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, LimitExceededError, ClientVersionNotSupportedError, org.apache.thrift.TException
ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific domain.- Parameters:
listRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorLimitExceededErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
ListClosedWorkflowExecutions
ListClosedWorkflowExecutionsResponse ListClosedWorkflowExecutions(ListClosedWorkflowExecutionsRequest listRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific domain.- Parameters:
listRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
ListWorkflowExecutions
ListWorkflowExecutionsResponse ListWorkflowExecutions(ListWorkflowExecutionsRequest listRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
ListWorkflowExecutions is a visibility API to list workflow executions in a specific domain.- Parameters:
listRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
ListArchivedWorkflowExecutions
ListArchivedWorkflowExecutionsResponse ListArchivedWorkflowExecutions(ListArchivedWorkflowExecutionsRequest listRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific domain.- Parameters:
listRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
ScanWorkflowExecutions
ListWorkflowExecutionsResponse ScanWorkflowExecutions(ListWorkflowExecutionsRequest listRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific domain without order.- Parameters:
listRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
CountWorkflowExecutions
CountWorkflowExecutionsResponse CountWorkflowExecutions(CountWorkflowExecutionsRequest countRequest) throws BadRequestError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
CountWorkflowExecutions is a visibility API to count of workflow executions in a specific domain.- Parameters:
countRequest-- Throws:
BadRequestErrorEntityNotExistsErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
GetSearchAttributes
GetSearchAttributesResponse GetSearchAttributes() throws ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs- Throws:
ServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
RespondQueryTaskCompleted
void RespondQueryTaskCompleted(RespondQueryTaskCompletedRequest completeRequest) throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, DomainNotActiveError, ClientVersionNotSupportedError, org.apache.thrift.TException
RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a DecisionTask for query) as a result of 'PollForDecisionTask' API call. Completing a QueryTask will unblock the client call to 'QueryWorkflow' API and return the query result to client as a response to 'QueryWorkflow' API call.- Parameters:
completeRequest-- Throws:
BadRequestErrorEntityNotExistsErrorLimitExceededErrorServiceBusyErrorDomainNotActiveErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
ResetStickyTaskList
ResetStickyTaskListResponse ResetStickyTaskList(ResetStickyTaskListRequest resetRequest) throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, DomainNotActiveError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, org.apache.thrift.TException
Reset the sticky tasklist related information in mutable state of a given workflow. Things cleared are: 1. StickyTaskList 2. StickyScheduleToStartTimeout 3. ClientLibraryVersion 4. ClientFeatureVersion 5. ClientImpl- Parameters:
resetRequest-- Throws:
BadRequestErrorEntityNotExistsErrorLimitExceededErrorServiceBusyErrorDomainNotActiveErrorClientVersionNotSupportedErrorWorkflowExecutionAlreadyCompletedErrororg.apache.thrift.TException
-
QueryWorkflow
QueryWorkflowResponse QueryWorkflow(QueryWorkflowRequest queryRequest) throws BadRequestError, EntityNotExistsError, QueryFailedError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
QueryWorkflow returns query result for a specified workflow execution- Parameters:
queryRequest-- Throws:
BadRequestErrorEntityNotExistsErrorQueryFailedErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
DescribeWorkflowExecution
DescribeWorkflowExecutionResponse DescribeWorkflowExecution(DescribeWorkflowExecutionRequest describeRequest) throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
DescribeWorkflowExecution returns information about the specified workflow execution.- Parameters:
describeRequest-- Throws:
BadRequestErrorEntityNotExistsErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
DescribeTaskList
DescribeTaskListResponse DescribeTaskList(DescribeTaskListRequest request) throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
DescribeTaskList returns information about the target tasklist, right now this API returns the pollers which polled this tasklist in last few minutes.- Parameters:
request-- Throws:
BadRequestErrorEntityNotExistsErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
GetClusterInfo
ClusterInfo GetClusterInfo() throws InternalServiceError, ServiceBusyError, org.apache.thrift.TException
GetClusterInfo returns information about cadence cluster- Throws:
InternalServiceErrorServiceBusyErrororg.apache.thrift.TException
-
GetTaskListsByDomain
GetTaskListsByDomainResponse GetTaskListsByDomain(GetTaskListsByDomainRequest request) throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, ClientVersionNotSupportedError, org.apache.thrift.TException
GetTaskListsByDomain returns the list of all the task lists for a domainName.- Parameters:
request-- Throws:
BadRequestErrorEntityNotExistsErrorLimitExceededErrorServiceBusyErrorClientVersionNotSupportedErrororg.apache.thrift.TException
-
ListTaskListPartitions
ListTaskListPartitionsResponse ListTaskListPartitions(ListTaskListPartitionsRequest request) throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, org.apache.thrift.TException
ReapplyEvents applies stale events to the current workflow and current run- Parameters:
request-- Throws:
BadRequestErrorEntityNotExistsErrorLimitExceededErrorServiceBusyErrororg.apache.thrift.TException
-
RefreshWorkflowTasks
void RefreshWorkflowTasks(RefreshWorkflowTasksRequest request) throws BadRequestError, DomainNotActiveError, ServiceBusyError, EntityNotExistsError, org.apache.thrift.TException
RefreshWorkflowTasks refreshes all tasks of a workflow- Parameters:
request-- Throws:
BadRequestErrorDomainNotActiveErrorServiceBusyErrorEntityNotExistsErrororg.apache.thrift.TException
-
-