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)
Query workflow by invoking its query handler.
|
<R> R |
query(java.lang.String queryType,
java.lang.Class<R> resultClass,
QueryRejectCondition queryRejectCondition,
java.lang.Object... args)
Deprecated: please use
queryWithOptions(String, QueryOptions, Type, Class, Object...)
to avoid variable argument ambiguity with Object... |
<R> R |
query(java.lang.String queryType,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType,
java.lang.Object... args)
Deprecated: please use
queryWithOptions(String, QueryOptions, Type, Class, Object...)
to avoid variable argument ambiguity with Object... |
<R> R |
query(java.lang.String queryType,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType,
QueryRejectCondition queryRejectCondition,
java.lang.Object... args)
Deprecated: please use
queryWithOptions(String, QueryOptions, Type, Class, Object...)
to avoid variable argument ambiguity with Object... |
<R> R |
queryWithOptions(java.lang.String queryType,
QueryOptions options,
java.lang.reflect.Type resultType,
java.lang.Class<R> resultClass,
java.lang.Object... args) |
void |
signal(java.lang.String signalName,
java.lang.Object... args) |
java.util.concurrent.CompletableFuture<java.lang.Void> |
signalAsync(java.lang.String signalName,
java.lang.Object... args) |
java.util.concurrent.CompletableFuture<java.lang.Void> |
signalAsyncWithTimeout(long timeout,
java.util.concurrent.TimeUnit unit,
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) |
java.util.concurrent.CompletableFuture<WorkflowExecution> |
startAsync(java.lang.Object... args) |
java.util.concurrent.CompletableFuture<WorkflowExecution> |
startAsyncWithTimeout(long timeout,
java.util.concurrent.TimeUnit unit,
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)
java.util.concurrent.CompletableFuture<java.lang.Void> signalAsync(java.lang.String signalName, java.lang.Object... args)
java.util.concurrent.CompletableFuture<java.lang.Void> signalAsyncWithTimeout(long timeout, java.util.concurrent.TimeUnit unit, java.lang.String signalName, java.lang.Object... args)
WorkflowExecution start(java.lang.Object... args)
java.util.concurrent.CompletableFuture<WorkflowExecution> startAsync(java.lang.Object... args)
java.util.concurrent.CompletableFuture<WorkflowExecution> startAsyncWithTimeout(long timeout, java.util.concurrent.TimeUnit unit, 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)
QueryMethod
.R
- type of the query resultqueryType
- name of the query handler. Usually it is a method name.resultClass
- class of the query result typeargs
- optional query argumentsWorkflowQueryException
- if query failed for any reason.WorkflowClientOptions.Builder.setQueryRejectCondition(QueryRejectCondition)
<R> R query(java.lang.String queryType, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, java.lang.Object... args)
queryWithOptions(String, QueryOptions, Type, Class, Object...)
to avoid variable argument ambiguity with Object... args<R> R query(java.lang.String queryType, java.lang.Class<R> resultClass, QueryRejectCondition queryRejectCondition, java.lang.Object... args)
queryWithOptions(String, QueryOptions, Type, Class, Object...)
to avoid variable argument ambiguity with Object... args<R> R query(java.lang.String queryType, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, QueryRejectCondition queryRejectCondition, java.lang.Object... args)
queryWithOptions(String, QueryOptions, Type, Class, Object...)
to avoid variable argument ambiguity with Object... args<R> R queryWithOptions(java.lang.String queryType, QueryOptions options, java.lang.reflect.Type resultType, java.lang.Class<R> resultClass, java.lang.Object... args)
void cancel()
java.util.Optional<WorkflowOptions> getOptions()