public class WorkflowExecutionUtils
extends java.lang.Object
Constructor and Description |
---|
WorkflowExecutionUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsEvent(java.util.List<io.temporal.api.history.v1.HistoryEvent> history,
io.temporal.api.enums.v1.EventType eventType) |
static io.temporal.api.enums.v1.WorkflowExecutionStatus |
getCloseStatus(io.temporal.api.history.v1.HistoryEvent event) |
static io.temporal.api.enums.v1.EventType |
getEventTypeForCommand(io.temporal.api.enums.v1.CommandType commandType)
Returns event that corresponds to a command.
|
static java.lang.String |
getFailureCause(io.temporal.api.history.v1.HistoryEvent historyEvent) |
static java.lang.String |
getId(io.temporal.api.history.v1.HistoryEvent historyEvent) |
static java.util.Optional<io.temporal.api.common.v1.Payloads> |
getResultFromCloseEvent(io.temporal.api.common.v1.WorkflowExecution workflowExecution,
java.util.Optional<java.lang.String> workflowType,
io.temporal.api.history.v1.HistoryEvent closeEvent,
DataConverter converter) |
static io.temporal.api.common.v1.WorkflowExecution |
getWorkflowIdFromExternalWorkflowCompletedEvent(io.temporal.api.history.v1.HistoryEvent event) |
static boolean |
isActivityTaskClosedEvent(io.temporal.api.history.v1.HistoryEvent event) |
static boolean |
isCommandEvent(io.temporal.api.history.v1.HistoryEvent event)
Command event is an event that is created to mirror a command issued by a workflow task
|
static boolean |
isExternalWorkflowClosedEvent(io.temporal.api.history.v1.HistoryEvent event) |
static boolean |
isFullHistory(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask) |
static boolean |
isWorkflowExecutionClosedEvent(io.temporal.api.history.v1.HistoryEventOrBuilder event) |
static boolean |
isWorkflowExecutionCompleteCommand(io.temporal.api.command.v1.Command command) |
static boolean |
isWorkflowTaskClosedEvent(io.temporal.api.history.v1.HistoryEventOrBuilder event) |
static java.lang.String |
prettyPrintCommands(java.lang.Iterable<io.temporal.api.command.v1.Command> commands) |
static java.lang.String |
prettyPrintObject(com.google.protobuf.MessageOrBuilder object)
Pretty prints a proto message.
|
static WorkflowExecutionHistory |
readHistory(java.io.File historyFile) |
static WorkflowExecutionHistory |
readHistoryFromResource(java.lang.String resourceFileName) |
public static java.util.Optional<io.temporal.api.common.v1.Payloads> getResultFromCloseEvent(io.temporal.api.common.v1.WorkflowExecution workflowExecution, java.util.Optional<java.lang.String> workflowType, io.temporal.api.history.v1.HistoryEvent closeEvent, DataConverter converter)
public static boolean isWorkflowTaskClosedEvent(io.temporal.api.history.v1.HistoryEventOrBuilder event)
public static boolean isWorkflowExecutionClosedEvent(io.temporal.api.history.v1.HistoryEventOrBuilder event)
public static boolean isWorkflowExecutionCompleteCommand(io.temporal.api.command.v1.Command command)
public static boolean isActivityTaskClosedEvent(io.temporal.api.history.v1.HistoryEvent event)
public static boolean isExternalWorkflowClosedEvent(io.temporal.api.history.v1.HistoryEvent event)
public static io.temporal.api.common.v1.WorkflowExecution getWorkflowIdFromExternalWorkflowCompletedEvent(io.temporal.api.history.v1.HistoryEvent event)
public static java.lang.String getId(io.temporal.api.history.v1.HistoryEvent historyEvent)
public static java.lang.String getFailureCause(io.temporal.api.history.v1.HistoryEvent historyEvent)
public static io.temporal.api.enums.v1.WorkflowExecutionStatus getCloseStatus(io.temporal.api.history.v1.HistoryEvent event)
public static java.lang.String prettyPrintCommands(java.lang.Iterable<io.temporal.api.command.v1.Command> commands)
public static java.lang.String prettyPrintObject(com.google.protobuf.MessageOrBuilder object)
public static boolean containsEvent(java.util.List<io.temporal.api.history.v1.HistoryEvent> history, io.temporal.api.enums.v1.EventType eventType)
public static boolean isCommandEvent(io.temporal.api.history.v1.HistoryEvent event)
public static io.temporal.api.enums.v1.EventType getEventTypeForCommand(io.temporal.api.enums.v1.CommandType commandType)
public static WorkflowExecutionHistory readHistoryFromResource(java.lang.String resourceFileName) throws java.io.IOException
java.io.IOException
public static WorkflowExecutionHistory readHistory(java.io.File historyFile) throws java.io.IOException
java.io.IOException
public static boolean isFullHistory(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask)