Package io.temporal.internal.replay
Interface WorkflowRunTaskHandler
-
public interface WorkflowRunTaskHandlerTask 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 voidclose()QueryResulthandleDirectQueryWorkflowTask(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask, WorkflowHistoryIterator historyIterator)Handles a Direct Query (or Legacy Query) scenario.WorkflowTaskResulthandleWorkflowTask(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask, WorkflowHistoryIterator historyIterator)Handles a single new workflow task of the workflow.voidresetStartedEventId(java.lang.Long eventId)Reset the workflow event ID.
-
-
-
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.NonDeterministicExceptionorErrorare 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.NonDeterministicExceptionorErrorare such cases.
-
resetStartedEventId
void resetStartedEventId(java.lang.Long eventId)
Reset the workflow event ID.- Parameters:
eventId- the event ID to reset the cached state to.
-
close
void close()
-
-