Package io.temporal.internal.replay
Interface ReplayWorkflow
-
public interface ReplayWorkflow
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel(java.lang.String reason)
void
close()
boolean
eventLoop()
java.util.Optional<io.temporal.api.common.v1.Payloads>
getOutput()
WorkflowImplementationOptions
getWorkflowImplementationOptions()
void
handleSignal(java.lang.String signalName, java.util.Optional<io.temporal.api.common.v1.Payloads> input, long eventId)
Handle an external signal event.WorkflowExecutionException
mapUnexpectedException(java.lang.Throwable failure)
Convert exception that happened in the framework code to the format that ReplayWorkflow implementation understands.java.util.Optional<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.void
start(io.temporal.api.history.v1.HistoryEvent event, ReplayWorkflowContext context)
-
-
-
Method Detail
-
start
void start(io.temporal.api.history.v1.HistoryEvent event, ReplayWorkflowContext context)
-
handleSignal
void handleSignal(java.lang.String signalName, java.util.Optional<io.temporal.api.common.v1.Payloads> input, long eventId)
Handle an external signal event.
-
eventLoop
boolean eventLoop()
-
getOutput
java.util.Optional<io.temporal.api.common.v1.Payloads> getOutput()
- Returns:
- null means no output yet
-
cancel
void cancel(java.lang.String reason)
-
close
void close()
-
query
java.util.Optional<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.- Parameters:
query
- arguments- Returns:
- query result
-
mapUnexpectedException
WorkflowExecutionException mapUnexpectedException(java.lang.Throwable failure)
Convert exception that happened in the framework code to the format that ReplayWorkflow implementation understands. The framework code is not aware of DataConverter so this is working around this layering.- Parameters:
failure
- Unexpected failure cause- Returns:
- Serialized failure
-
getWorkflowImplementationOptions
WorkflowImplementationOptions getWorkflowImplementationOptions()
-
-