public interface WorkflowStub
WorkflowClient.newUntypedWorkflowStub(String, WorkflowOptions)
or WorkflowClient.newUntypedWorkflowStub(WorkflowExecution, Optional)
.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Request cancellation.
|
static <T> WorkflowStub |
fromTyped(T typed)
Extracts untyped WorkflowStub from a typed workflow stub created through
WorkflowClient.newWorkflowStub(Class) . |
WorkflowExecution |
getExecution() |
java.util.Optional<WorkflowOptions> |
getOptions() |
<R> R |
getResult(java.lang.Class<R> resultClass)
Returns workflow result potentially waiting for workflow to complete.
|
<R> R |
getResult(java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType)
Returns workflow result potentially waiting for workflow to complete.
|
<R> R |
getResult(long timeout,
java.util.concurrent.TimeUnit unit,
java.lang.Class<R> resultClass)
Returns workflow result potentially waiting for workflow to complete.
|
<R> R |
getResult(long timeout,
java.util.concurrent.TimeUnit unit,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType)
Returns workflow result potentially waiting for workflow to complete.
|
<R> java.util.concurrent.CompletableFuture<R> |
getResultAsync(java.lang.Class<R> resultClass) |
<R> java.util.concurrent.CompletableFuture<R> |
getResultAsync(java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType) |
<R> java.util.concurrent.CompletableFuture<R> |
getResultAsync(long timeout,
java.util.concurrent.TimeUnit unit,
java.lang.Class<R> resultClass) |
<R> java.util.concurrent.CompletableFuture<R> |
getResultAsync(long timeout,
java.util.concurrent.TimeUnit unit,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType) |
java.util.Optional<java.lang.String> |
getWorkflowType() |
<R> R |
query(java.lang.String queryType,
java.lang.Class<R> resultClass,
java.lang.Object... args) |
<R> QueryResponse<R> |
query(java.lang.String queryType,
java.lang.Class<R> resultClass,
QueryRejectCondition queryRejectCondition,
java.lang.Object... args) |
<R> R |
query(java.lang.String queryType,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType,
java.lang.Object... args) |
<R> QueryResponse<R> |
query(java.lang.String queryType,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType,
QueryRejectCondition queryRejectCondition,
java.lang.Object... args) |
void |
signal(java.lang.String signalName,
java.lang.Object... args) |
WorkflowExecution |
signalWithStart(java.lang.String signalName,
java.lang.Object[] signalArgs,
java.lang.Object[] startArgs) |
WorkflowExecution |
start(java.lang.Object... args) |
static <T> WorkflowStub fromTyped(T typed)
WorkflowClient.newWorkflowStub(Class)
.T
- type of the workflow stub interfacetyped
- typed workflow stubvoid signal(java.lang.String signalName, java.lang.Object... args)
WorkflowExecution start(java.lang.Object... args)
WorkflowExecution signalWithStart(java.lang.String signalName, java.lang.Object[] signalArgs, java.lang.Object[] startArgs)
java.util.Optional<java.lang.String> getWorkflowType()
WorkflowExecution getExecution()
<R> R getResult(java.lang.Class<R> resultClass, java.lang.reflect.Type resultType)
R
- type of the workflow return valueresultClass
- class of the workflow return valueresultType
- type of the workflow return value. Differs from resultClass for generic
types.<R> java.util.concurrent.CompletableFuture<R> getResultAsync(java.lang.Class<R> resultClass, java.lang.reflect.Type resultType)
<R> R getResult(java.lang.Class<R> resultClass)
R
- type of the workflow return valueresultClass
- class of the workflow return value<R> java.util.concurrent.CompletableFuture<R> getResultAsync(java.lang.Class<R> resultClass)
<R> R getResult(long timeout, java.util.concurrent.TimeUnit unit, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType) throws java.util.concurrent.TimeoutException
R
- type of the workflow return valuetimeout
- maximum time to waitunit
- unit of timeoutresultClass
- class of the workflow return valueresultType
- type of the workflow return value. Differs from resultClass for genericjava.util.concurrent.TimeoutException
- if workflow is not completed after the timeout time.<R> R getResult(long timeout, java.util.concurrent.TimeUnit unit, java.lang.Class<R> resultClass) throws java.util.concurrent.TimeoutException
R
- type of the workflow return valuetimeout
- maximum time to waitunit
- unit of timeoutresultClass
- class of the workflow return valuejava.util.concurrent.TimeoutException
- if workflow is not completed after the timeout time.<R> java.util.concurrent.CompletableFuture<R> getResultAsync(long timeout, java.util.concurrent.TimeUnit unit, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType)
<R> java.util.concurrent.CompletableFuture<R> getResultAsync(long timeout, java.util.concurrent.TimeUnit unit, java.lang.Class<R> resultClass)
<R> R query(java.lang.String queryType, java.lang.Class<R> resultClass, java.lang.Object... args)
<R> R query(java.lang.String queryType, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, java.lang.Object... args)
<R> QueryResponse<R> query(java.lang.String queryType, java.lang.Class<R> resultClass, QueryRejectCondition queryRejectCondition, java.lang.Object... args)
<R> QueryResponse<R> query(java.lang.String queryType, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, QueryRejectCondition queryRejectCondition, java.lang.Object... args)
void cancel()
java.util.Optional<WorkflowOptions> getOptions()