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.io.temporal.api.failure.v1.Failure
mapExceptionToFailure(java.lang.Throwable exception)
Convert exception to the serialized Failure that can be reported to the server.
This method is needed when framework code needs to serialize aTemporalFailure
instance with details object produced by the application code.
The framework code is not aware of DataConverter so this is working around this layering.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
-
mapExceptionToFailure
io.temporal.api.failure.v1.Failure mapExceptionToFailure(java.lang.Throwable exception)
Convert exception to the serialized Failure that can be reported to the server.
This method is needed when framework code needs to serialize aTemporalFailure
instance with details object produced by the application code.
The framework code is not aware of DataConverter so this is working around this layering.- Parameters:
exception
- throwable to convert- Returns:
- Serialized failure
-
getWorkflowImplementationOptions
WorkflowImplementationOptions getWorkflowImplementationOptions()
-
-