Interface ReplayWorkflow
public interface ReplayWorkflow
Manages event loop, workflow method, an abstraction level over Deterministic Runner to provide a
communication interface for the control thread for Start, Signal, Query, etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()booleanOptional<io.temporal.api.common.v1.Payloads> voidhandleSignal(String signalName, Optional<io.temporal.api.common.v1.Payloads> input, long eventId, io.temporal.api.common.v1.Header header) Handle an external signal event.voidhandleUpdate(String updateName, String updateId, Optional<io.temporal.api.common.v1.Payloads> input, long eventId, io.temporal.api.common.v1.Header header, UpdateProtocolCallback callbacks) Handle an update workflow execution eventOptional<io.temporal.api.common.v1.Payloads> query(io.temporal.api.query.v1.WorkflowQuery query) Called after all history is replayed and workflow cannot make any progress if workflow task is a query.voidstart(io.temporal.api.history.v1.HistoryEvent event, ReplayWorkflowContext context)
-
Method Details
-
start
-
handleSignal
-
handleUpdate
void handleUpdate(String updateName, String updateId, Optional<io.temporal.api.common.v1.Payloads> input, long eventId, io.temporal.api.common.v1.Header header, UpdateProtocolCallback callbacks) Handle an update workflow execution event -
eventLoop
boolean eventLoop()- Returns:
- true if the execution of the workflow method is finished or an exit was explicitly called by it
-
getOutput
Optional<io.temporal.api.common.v1.Payloads> getOutput()- Returns:
- null means no output yet
-
cancel
-
close
void close() -
query
Called after all history is replayed and workflow cannot make any progress if workflow task is a query.- Parameters:
query- arguments- Returns:
- query result
-
getWorkflowContext
WorkflowContext getWorkflowContext()- Returns:
- the fullest context of the workflow possible
-