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) . |
io.temporal.proto.common.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)
Synchronously queries workflow by invoking its query handler.
|
<R> R |
query(java.lang.String queryType,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType,
java.lang.Object... args) |
void |
signal(java.lang.String signalName,
java.lang.Object... args) |
io.temporal.proto.common.WorkflowExecution |
signalWithStart(java.lang.String signalName,
java.lang.Object[] signalArgs,
java.lang.Object[] startArgs) |
io.temporal.proto.common.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)
io.temporal.proto.common.WorkflowExecution start(java.lang.Object... args)
io.temporal.proto.common.WorkflowExecution signalWithStart(java.lang.String signalName, java.lang.Object[] signalArgs, java.lang.Object[] startArgs)
java.util.Optional<java.lang.String> getWorkflowType()
io.temporal.proto.common.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 reasonWorkflowClientOptions.Builder.setQueryRejectCondition(QueryRejectCondition)
<R> R query(java.lang.String queryType, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, java.lang.Object... args)
void cancel()
java.util.Optional<WorkflowOptions> getOptions()