Package io.temporal.client
Interface WorkflowUpdateHandle<T>
-
- All Known Implementing Classes:
CompletedWorkflowUpdateHandleImpl,LazyWorkflowUpdateHandleImpl
public interface WorkflowUpdateHandle<T>WorkflowUpdateHandle is a handle to an update workflow execution request that can be used to get the status of that update request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.temporal.api.common.v1.WorkflowExecutiongetExecution()Gets the workflow execution this update request was sent to.java.lang.StringgetId()Gets the unique ID of this update.TgetResult()Returns the result of the workflow update.TgetResult(long timeout, java.util.concurrent.TimeUnit unit)Returns the result of the workflow update.java.util.concurrent.CompletableFuture<T>getResultAsync()Returns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.java.util.concurrent.CompletableFuture<T>getResultAsync(long timeout, java.util.concurrent.TimeUnit unit)Returns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.
-
-
-
Method Detail
-
getExecution
io.temporal.api.common.v1.WorkflowExecution getExecution()
Gets the workflow execution this update request was sent to.- Returns:
- the workflow execution this update was sent to.
-
getId
java.lang.String getId()
Gets the unique ID of this update.- Returns:
- the updates ID.
-
getResult
T getResult()
Returns the result of the workflow update.- Returns:
- the result of the workflow update
- Throws:
WorkflowUpdateException- if the update was rejected or failed by the workflow.
-
getResult
T getResult(long timeout, java.util.concurrent.TimeUnit unit)
Returns the result of the workflow update.- Parameters:
timeout- maximum time to wait and perform the background long pollingunit- unit of timeout- Returns:
- the result of the workflow update
- Throws:
WorkflowUpdateTimeoutOrCancelledException- if the timeout is reached.WorkflowUpdateException- if the update was rejected or failed by the workflow.
-
getResultAsync
java.util.concurrent.CompletableFuture<T> getResultAsync()
Returns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.- Returns:
- future completed with the result of the update or an exception
-
getResultAsync
java.util.concurrent.CompletableFuture<T> getResultAsync(long timeout, java.util.concurrent.TimeUnit unit)
Returns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.- Parameters:
timeout- maximum time to wait and perform the background long pollingunit- unit of timeout- Returns:
- future completed with the result of the update or an exception
-
-