public class WorkflowExecutionUtils
extends java.lang.Object
| コンストラクタと説明 |
|---|
WorkflowExecutionUtils() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static WorkflowExecutionInfo |
describeWorkflowInstance(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution) |
static java.lang.String |
getFailureCause(HistoryEvent historyEvent) |
static java.util.List<HistoryEvent> |
getHistory(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution) |
static History |
getHistoryPage(java.lang.String nextPageToken,
AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution) |
static java.lang.String |
getId(HistoryEvent historyEvent) |
static HistoryEvent |
getInstanceCloseEvent(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution) |
static WorkflowExecutionCompletedEventAttributes |
getWorkflowExecutionResult(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution)
Returns result of workflow instance execution. result of
AmazonSimpleWorkflow#startWorkflowInstance(com.amazonaws.services.simpleworkflow.model.StartWorkflowInstanceRequest) |
static WorkflowExecution |
getWorkflowIdFromExternalWorkflowCompletedEvent(HistoryEvent event) |
static boolean |
isActivityTaskClosedEvent(HistoryEvent event) |
static boolean |
isExternalWorkflowClosedEvent(HistoryEvent event) |
static boolean |
isWorkflowExecutionCompletedEvent(HistoryEvent event) |
static java.lang.String |
prettyPrintDecision(Decision decision)
Returns single decision in a human readable format
|
static java.lang.String |
prettyPrintDecisions(java.lang.Iterable<Decision> decisions) |
static java.lang.String |
prettyPrintHistory(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution)
Returns workflow instance history in a human readable format.
|
static java.lang.String |
prettyPrintHistory(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution,
boolean showWorkflowTasks)
Returns workflow instance history in a human readable format.
|
static java.lang.String |
prettyPrintHistory(History history,
boolean showWorkflowTasks)
Returns workflow instance history in a human readable format.
|
static java.lang.String |
prettyPrintHistory(java.lang.Iterable<HistoryEvent> events,
boolean showWorkflowTasks) |
static java.lang.String |
prettyPrintHistoryEvent(HistoryEvent event)
Returns single event in a human readable format
|
static java.lang.String |
printDetails(java.lang.String details) |
static java.lang.String |
truncateDetails(java.lang.String details) |
static java.lang.String |
truncateReason(java.lang.String reason)
Simple Workflow limits length of the reason field.
|
static WorkflowExecutionCompletedEventAttributes |
waitForWorkflowExecutionResult(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution)
Blocks until workflow instance completes and returns its result.
|
static WorkflowExecutionCompletedEventAttributes |
waitForWorkflowExecutionResult(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds)
Waits up to specified timeout until workflow instance completes and
returns its result.
|
static java.lang.String |
waitForWorkflowInstanceCompletion(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution)
Blocks until workflow instance completes.
|
static java.lang.String |
waitForWorkflowInstanceCompletion(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds)
Waits up to specified timeout for workflow instance completion.
|
static java.lang.String |
waitForWorkflowInstanceCompletionAcrossGenerations(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution)
Like
waitForWorkflowInstanceCompletionAcrossGenerations(AmazonSimpleWorkflow, String, WorkflowExecution, long)
, but with no timeout. |
static java.lang.String |
waitForWorkflowInstanceCompletionAcrossGenerations(AmazonSimpleWorkflow service,
java.lang.String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds)
Like
waitForWorkflowInstanceCompletion(AmazonSimpleWorkflow, String, WorkflowExecution, long)
, except will wait for continued generations of the original workflow
execution too. |
public static WorkflowExecutionCompletedEventAttributes waitForWorkflowExecutionResult(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution) throws java.lang.InterruptedException
workflowExecution - result of
AmazonSimpleWorkflow#startWorkflowInstance(com.amazonaws.services.simpleworkflow.model.StartWorkflowInstanceRequest)java.lang.InterruptedException - if thread is interruptedjava.lang.RuntimeException - if workflow instance ended up in any state but completedpublic static WorkflowExecutionCompletedEventAttributes waitForWorkflowExecutionResult(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution, long timeoutSeconds) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
workflowExecution - result of
AmazonSimpleWorkflow#startWorkflowInstance(com.amazonaws.services.simpleworkflow.model.StartWorkflowInstanceRequest)java.lang.InterruptedException - if thread is interruptedjava.util.concurrent.TimeoutException - if instance is not complete after specified timeoutjava.lang.RuntimeException - if workflow instance ended up in any state but completedpublic static WorkflowExecutionCompletedEventAttributes getWorkflowExecutionResult(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution)
AmazonSimpleWorkflow#startWorkflowInstance(com.amazonaws.services.simpleworkflow.model.StartWorkflowInstanceRequest)java.lang.IllegalStateException - if workflow is still runningjava.lang.RuntimeException - if workflow instance ended up in any state but completedpublic static HistoryEvent getInstanceCloseEvent(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution)
public static boolean isWorkflowExecutionCompletedEvent(HistoryEvent event)
public static boolean isActivityTaskClosedEvent(HistoryEvent event)
public static boolean isExternalWorkflowClosedEvent(HistoryEvent event)
public static WorkflowExecution getWorkflowIdFromExternalWorkflowCompletedEvent(HistoryEvent event)
public static java.lang.String getId(HistoryEvent historyEvent)
public static java.lang.String getFailureCause(HistoryEvent historyEvent)
public static java.lang.String waitForWorkflowInstanceCompletion(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution) throws java.lang.InterruptedException
workflowExecution - result of
AmazonSimpleWorkflow#startWorkflowInstance(com.amazonaws.services.simpleworkflow.model.StartWorkflowInstanceRequest)java.lang.InterruptedExceptionpublic static java.lang.String waitForWorkflowInstanceCompletion(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution, long timeoutSeconds) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
workflowExecution - result of
AmazonSimpleWorkflow#startWorkflowInstance(com.amazonaws.services.simpleworkflow.model.StartWorkflowInstanceRequest)timeoutSeconds - maximum time to wait for completion. 0 means wait forever.java.util.concurrent.TimeoutExceptionjava.lang.InterruptedExceptionpublic static java.lang.String waitForWorkflowInstanceCompletionAcrossGenerations(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution, long timeoutSeconds) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
waitForWorkflowInstanceCompletion(AmazonSimpleWorkflow, String, WorkflowExecution, long)
, except will wait for continued generations of the original workflow
execution too.service - domain - workflowExecution - timeoutSeconds - java.lang.InterruptedExceptionjava.util.concurrent.TimeoutExceptionwaitForWorkflowInstanceCompletion(AmazonSimpleWorkflow, String,
WorkflowExecution, long)public static java.lang.String waitForWorkflowInstanceCompletionAcrossGenerations(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution) throws java.lang.InterruptedException
waitForWorkflowInstanceCompletionAcrossGenerations(AmazonSimpleWorkflow, String, WorkflowExecution, long)
, but with no timeout.service - domain - workflowExecution - java.lang.InterruptedExceptionpublic static WorkflowExecutionInfo describeWorkflowInstance(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution)
public static java.lang.String prettyPrintHistory(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution)
workflowExecution - result of
AmazonSimpleWorkflow#startWorkflowInstance(com.amazonaws.services.simpleworkflow.model.StartWorkflowInstanceRequest)public static java.lang.String prettyPrintHistory(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution, boolean showWorkflowTasks)
workflowExecution - result of
AmazonSimpleWorkflow#startWorkflowInstance(com.amazonaws.services.simpleworkflow.model.StartWorkflowInstanceRequest)showWorkflowTasks - when set to false workflow task events (decider events) are
not includedpublic static java.util.List<HistoryEvent> getHistory(AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution)
public static History getHistoryPage(java.lang.String nextPageToken, AmazonSimpleWorkflow service, java.lang.String domain, WorkflowExecution workflowExecution)
public static java.lang.String prettyPrintHistory(History history, boolean showWorkflowTasks)
showWorkflowTasks - when set to false workflow task events (decider events) are
not includedpublic static java.lang.String prettyPrintHistory(java.lang.Iterable<HistoryEvent> events, boolean showWorkflowTasks)
public static java.lang.String prettyPrintDecisions(java.lang.Iterable<Decision> decisions)
public static java.lang.String prettyPrintHistoryEvent(HistoryEvent event)
event - event to pretty printpublic static java.lang.String prettyPrintDecision(Decision decision)
event - event to pretty printpublic static java.lang.String printDetails(java.lang.String details)
public static java.lang.String truncateReason(java.lang.String reason)
reason - string value to truncatepublic static java.lang.String truncateDetails(java.lang.String details)