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
Modifier and TypeMethodDescriptionio.temporal.api.common.v1.WorkflowExecutionGets the workflow execution this update request was sent to.getId()Gets the unique ID of this update.Returns the result of the workflow update.Returns the result of the workflow update.Returns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.getResultAsync(long timeout, TimeUnit unit) Returns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.
-
Method Details
-
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
-
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
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
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
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
-