public class WorkflowExecutionUtils extends Object
Constructor and Description |
---|
WorkflowExecutionUtils() |
Modifier and Type | Method and Description |
---|---|
static software.amazon.awssdk.services.swf.model.WorkflowExecutionInfo |
describeWorkflowInstance(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution) |
static software.amazon.awssdk.services.swf.model.WorkflowExecutionInfo |
describeWorkflowInstance(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
SimpleWorkflowClientConfig config) |
static String |
getFailureCause(software.amazon.awssdk.services.swf.model.HistoryEvent historyEvent) |
static List<software.amazon.awssdk.services.swf.model.HistoryEvent> |
getHistory(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution) |
static List<software.amazon.awssdk.services.swf.model.HistoryEvent> |
getHistory(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
boolean reverseOrder) |
static List<software.amazon.awssdk.services.swf.model.HistoryEvent> |
getHistory(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
boolean reverseOrder,
SimpleWorkflowClientConfig config) |
static List<software.amazon.awssdk.services.swf.model.HistoryEvent> |
getHistory(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
SimpleWorkflowClientConfig config) |
static software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse |
getHistoryPage(String nextPageToken,
software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution) |
static software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse |
getHistoryPage(String nextPageToken,
software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
boolean reverseOrder) |
static software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse |
getHistoryPage(String nextPageToken,
software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
boolean reverseOrder,
SimpleWorkflowClientConfig config) |
static software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse |
getHistoryPage(String nextPageToken,
software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
SimpleWorkflowClientConfig config) |
static String |
getId(software.amazon.awssdk.services.swf.model.HistoryEvent historyEvent) |
static software.amazon.awssdk.services.swf.model.HistoryEvent |
getInstanceCloseEvent(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution) |
static software.amazon.awssdk.services.swf.model.HistoryEvent |
getInstanceCloseEvent(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
SimpleWorkflowClientConfig config) |
static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes |
getWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution)
Blocks until workflow instance completes and returns its result.
|
static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes |
getWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
SimpleWorkflowClientConfig config)
Blocks until workflow instance completes and returns its result.
|
static WorkflowExecution |
getWorkflowIdFromExternalWorkflowCompletedEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event) |
static boolean |
isActivityTaskClosedEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event) |
static boolean |
isExternalWorkflowClosedEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event) |
static boolean |
isWorkflowExecutionCompletedEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event) |
static String |
prettyPrintDecision(software.amazon.awssdk.services.swf.model.Decision decision)
Returns single decision in a human readable format
|
static String |
prettyPrintDecisions(Iterable<software.amazon.awssdk.services.swf.model.Decision> decisions)
Returns decision events in a human readable format
|
static String |
prettyPrintHistory(software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse history,
boolean showWorkflowTasks)
Returns workflow instance history in a human readable format.
|
static String |
prettyPrintHistory(Iterable<software.amazon.awssdk.services.swf.model.HistoryEvent> events,
boolean showWorkflowTasks)
Returns workflow instance history in a human readable format.
|
static String |
prettyPrintHistory(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution)
Returns workflow instance history in a human readable format.
|
static String |
prettyPrintHistory(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
boolean showWorkflowTasks)
Returns workflow instance history in a human readable format.
|
static String |
prettyPrintHistory(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
boolean showWorkflowTasks,
SimpleWorkflowClientConfig config)
Returns workflow instance history in a human readable format.
|
static String |
prettyPrintHistory(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
SimpleWorkflowClientConfig config)
Returns workflow instance history in a human readable format.
|
static String |
prettyPrintHistoryEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event)
Returns single event in a human readable format
|
static String |
printDetails(String details) |
static String |
truncateDetails(String details) |
static String |
truncateReason(String reason)
Simple Workflow limits length of the reason field.
|
static Throwable |
truncateStackTrace(Throwable throwable) |
static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes |
waitForWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution)
Blocks until workflow instance completes and returns its result.
|
static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes |
waitForWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds)
Waits up to specified timeout until workflow instance completes and
returns its result.
|
static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes |
waitForWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds,
SimpleWorkflowClientConfig config)
Blocks until workflow instance completes and returns its result.
|
static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes |
waitForWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
SimpleWorkflowClientConfig config)
Blocks until workflow instance completes and returns its result.
|
static String |
waitForWorkflowInstanceCompletion(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution)
Blocks until workflow instance completes.
|
static String |
waitForWorkflowInstanceCompletion(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds)
Waits up to specified timeout for workflow instance completion.
|
static String |
waitForWorkflowInstanceCompletion(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds,
SimpleWorkflowClientConfig config)
Waits up to specified timeout for workflow instance completion.
|
static String |
waitForWorkflowInstanceCompletion(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
SimpleWorkflowClientConfig config) |
static String |
waitForWorkflowInstanceCompletionAcrossGenerations(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution)
Like
waitForWorkflowInstanceCompletion(SwfClient, String, WorkflowExecution, long) ,
except will wait for continued generations of the original workflow
execution too. |
static String |
waitForWorkflowInstanceCompletionAcrossGenerations(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds)
Like
waitForWorkflowInstanceCompletion(SwfClient, String, WorkflowExecution, long) ,
except will wait for continued generations of the original workflow
execution too. |
static String |
waitForWorkflowInstanceCompletionAcrossGenerations(software.amazon.awssdk.services.swf.SwfClient service,
String domain,
WorkflowExecution workflowExecution,
long timeoutSeconds,
SimpleWorkflowClientConfig config)
Like
waitForWorkflowInstanceCompletion(SwfClient, String, WorkflowExecution, long) ,
except will wait for continued generations of the original workflow
execution too. |
public static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes waitForWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution) throws InterruptedException
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
InterruptedException
- if thread is interruptedRuntimeException
- if workflow instance ended up in any state but completedpublic static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes waitForWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, SimpleWorkflowClientConfig config) throws InterruptedException
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
config
- - SWF client configurationInterruptedException
- if thread is interruptedRuntimeException
- if workflow instance ended up in any state but completedpublic static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes waitForWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, long timeoutSeconds) throws InterruptedException, TimeoutException
service
- - SWF clientworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
domain
- Registered Workflow domaintimeoutSeconds
- maximum time to wait for completion. 0 means wait forever.InterruptedException
- if thread is interruptedTimeoutException
- if instance is not complete after specified timeoutRuntimeException
- if workflow instance ended up in any state but completedpublic static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes waitForWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, long timeoutSeconds, SimpleWorkflowClientConfig config) throws InterruptedException, TimeoutException
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
config
- - SWF client configurationtimeoutSeconds
- maximum time to wait for completion. 0 means wait forever.InterruptedException
- if thread is interruptedTimeoutException
- if instance is not complete after specified timeoutRuntimeException
- if workflow instance ended up in any state but completedpublic static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes getWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution)
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
IllegalStateException
- if workflow is still runningRuntimeException
- if workflow instance ended up in any state but completedpublic static software.amazon.awssdk.services.swf.model.WorkflowExecutionCompletedEventAttributes getWorkflowExecutionResult(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, SimpleWorkflowClientConfig config)
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
config
- - SWF client configurationIllegalStateException
- if workflow is still runningRuntimeException
- if workflow instance ended up in any state but completedpublic static software.amazon.awssdk.services.swf.model.HistoryEvent getInstanceCloseEvent(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution)
public static software.amazon.awssdk.services.swf.model.HistoryEvent getInstanceCloseEvent(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, SimpleWorkflowClientConfig config)
public static boolean isWorkflowExecutionCompletedEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event)
public static boolean isActivityTaskClosedEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event)
public static boolean isExternalWorkflowClosedEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event)
public static WorkflowExecution getWorkflowIdFromExternalWorkflowCompletedEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event)
public static String getId(software.amazon.awssdk.services.swf.model.HistoryEvent historyEvent)
public static String getFailureCause(software.amazon.awssdk.services.swf.model.HistoryEvent historyEvent)
public static String waitForWorkflowInstanceCompletion(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution) throws InterruptedException
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
InterruptedException
- if thread is interruptedpublic static String waitForWorkflowInstanceCompletion(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, SimpleWorkflowClientConfig config) throws InterruptedException
InterruptedException
public static String waitForWorkflowInstanceCompletion(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, long timeoutSeconds) throws InterruptedException, TimeoutException
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
timeoutSeconds
- maximum time to wait for completion. 0 means wait forever.InterruptedException
- if thread is interruptedTimeoutException
- if instance is not complete after specified timeoutRuntimeException
- if workflow instance ended up in any state but completedpublic static String waitForWorkflowInstanceCompletion(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, long timeoutSeconds, SimpleWorkflowClientConfig config) throws InterruptedException, TimeoutException
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
timeoutSeconds
- maximum time to wait for completion. 0 means wait forever.config
- - SWF client configurationInterruptedException
- if thread is interruptedTimeoutException
- if instance is not complete after specified timeoutRuntimeException
- if workflow instance ended up in any state but completedpublic static String waitForWorkflowInstanceCompletionAcrossGenerations(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, long timeoutSeconds) throws InterruptedException, TimeoutException
waitForWorkflowInstanceCompletion(SwfClient, String, WorkflowExecution, long)
,
except will wait for continued generations of the original workflow
execution too.service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
timeoutSeconds
- maximum time to wait for completion. 0 means wait forever.InterruptedException
- if thread is interruptedTimeoutException
- if instance is not complete after specified timeoutRuntimeException
- if workflow instance ended up in any state but completedwaitForWorkflowInstanceCompletion(SwfClient, String,
WorkflowExecution, long)
public static String waitForWorkflowInstanceCompletionAcrossGenerations(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, long timeoutSeconds, SimpleWorkflowClientConfig config) throws InterruptedException, TimeoutException
waitForWorkflowInstanceCompletion(SwfClient, String, WorkflowExecution, long)
,
except will wait for continued generations of the original workflow
execution too.service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
timeoutSeconds
- maximum time to wait for completion. 0 means wait forever.config
- - SWF client configurationInterruptedException
- if thread is interruptedTimeoutException
- if instance is not complete after specified timeoutRuntimeException
- if workflow instance ended up in any state but completedwaitForWorkflowInstanceCompletion(SwfClient, String,
WorkflowExecution, long)
public static String waitForWorkflowInstanceCompletionAcrossGenerations(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution) throws InterruptedException
waitForWorkflowInstanceCompletion(SwfClient, String, WorkflowExecution, long)
,
except will wait for continued generations of the original workflow
execution too.service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
InterruptedException
- if thread is interruptedwaitForWorkflowInstanceCompletion(SwfClient, String,
WorkflowExecution, long)
public static software.amazon.awssdk.services.swf.model.WorkflowExecutionInfo describeWorkflowInstance(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution)
public static software.amazon.awssdk.services.swf.model.WorkflowExecutionInfo describeWorkflowInstance(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, SimpleWorkflowClientConfig config)
public static String prettyPrintHistory(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution)
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
public static String prettyPrintHistory(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, SimpleWorkflowClientConfig config)
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
config
- - SWF client configurationpublic static String prettyPrintHistory(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, boolean showWorkflowTasks)
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
showWorkflowTasks
- when set to false workflow task events (decider events) are
not includedpublic static String prettyPrintHistory(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, boolean showWorkflowTasks, SimpleWorkflowClientConfig config)
service
- - SWF clientdomain
- Registered Workflow domainworkflowExecution
- result of
SwfClient.startWorkflowExecution(StartWorkflowExecutionRequest)
config
- - SWF client configurationshowWorkflowTasks
- when set to false workflow task events (decider events) are
not includedpublic static List<software.amazon.awssdk.services.swf.model.HistoryEvent> getHistory(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution)
public static List<software.amazon.awssdk.services.swf.model.HistoryEvent> getHistory(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, SimpleWorkflowClientConfig config)
public static List<software.amazon.awssdk.services.swf.model.HistoryEvent> getHistory(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, boolean reverseOrder)
public static List<software.amazon.awssdk.services.swf.model.HistoryEvent> getHistory(software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, boolean reverseOrder, SimpleWorkflowClientConfig config)
public static software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse getHistoryPage(String nextPageToken, software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution)
public static software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse getHistoryPage(String nextPageToken, software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, SimpleWorkflowClientConfig config)
public static software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse getHistoryPage(String nextPageToken, software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, boolean reverseOrder)
public static software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse getHistoryPage(String nextPageToken, software.amazon.awssdk.services.swf.SwfClient service, String domain, WorkflowExecution workflowExecution, boolean reverseOrder, SimpleWorkflowClientConfig config)
public static String prettyPrintHistory(software.amazon.awssdk.services.swf.model.GetWorkflowExecutionHistoryResponse history, boolean showWorkflowTasks)
history
- Workflow instance historyshowWorkflowTasks
- when set to false workflow task events (decider events) are
not includedpublic static String prettyPrintHistory(Iterable<software.amazon.awssdk.services.swf.model.HistoryEvent> events, boolean showWorkflowTasks)
events
- Workflow instance history eventsshowWorkflowTasks
- when set to false workflow task events (decider events) are
not includedpublic static String prettyPrintDecisions(Iterable<software.amazon.awssdk.services.swf.model.Decision> decisions)
decisions
- decisions to pretty printpublic static String prettyPrintHistoryEvent(software.amazon.awssdk.services.swf.model.HistoryEvent event)
event
- event to pretty printpublic static String prettyPrintDecision(software.amazon.awssdk.services.swf.model.Decision decision)
decision
- event to pretty printpublic static String truncateReason(String reason)
reason
- string value to truncateCopyright © 2025. All rights reserved.