Package io.temporal.internal.replay
Interface WorkflowRunTaskHandler
-
public interface WorkflowRunTaskHandler
Task handler that encapsulates a cached workflow and can handle multiple calls to handleWorkflowTask for the same workflow run.Instances of this object can be cached in between workflow tasks.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
QueryResult
handleDirectQueryWorkflowTask(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask, WorkflowHistoryIterator historyIterator)
Handles a Direct Query (or Legacy Query) scenario.WorkflowTaskResult
handleWorkflowTask(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask, WorkflowHistoryIterator historyIterator)
Handles a single new workflow task of the workflow.
-
-
-
Method Detail
-
handleWorkflowTask
WorkflowTaskResult handleWorkflowTask(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask, WorkflowHistoryIterator historyIterator) throws java.lang.Throwable
Handles a single new workflow task of the workflow.- Parameters:
workflowTask
- task to handle- Returns:
- an object that can be used to build workflow task completion or failure response
- Throws:
java.lang.Throwable
- if processing experienced issues that are considered unrecoverable inside the current workflow task.NonDeterministicException
orError
are such cases.
-
handleDirectQueryWorkflowTask
QueryResult handleDirectQueryWorkflowTask(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask, WorkflowHistoryIterator historyIterator) throws java.lang.Throwable
Handles a Direct Query (or Legacy Query) scenario. In this case, it's not a real workflow task and the processing can't generate any new commands.- Parameters:
workflowTask
- task to handle- Returns:
- an object that can be used to build a legacy query response
- Throws:
java.lang.Throwable
- if processing experienced issues that are considered unrecoverable inside the current workflow task.NonDeterministicException
orError
are such cases.
-
close
void close()
-
-