Package io.temporal.client
Interface WorkflowClient
-
- All Known Implementing Classes:
WorkflowClientInternal
public interface WorkflowClient
Client to the Temporal service used to start and query workflows by external processes. Also, it supports creation ofActivityCompletionClient
instances used to complete activities asynchronously. Do not create this object for each request, keep it for the duration of the process.Given a workflow interface executing a workflow requires initializing a
WorkflowClient
instance, creating a client side stub to the workflow, and then calling a method annotated with @WorkflowMethod
.
There are two ways to start workflow execution: synchronously and asynchronously. Synchronous invocation starts a workflow and then waits for its completion. If the process that started the workflow crashes or stops waiting, the workflow continues executing. Because workflows are potentially long-running, and crashes of clients happen, it is not very commonly found in production use. Asynchronous start initiates workflow execution and immediately returns to the caller. This is the most common way to start workflows in production code.WorkflowClient workflowClient = WorkflowClient.newInstance(service, clientOptions); // Create a workflow stub. FileProcessingWorkflow workflow = workflowClient.newWorkflowStub(FileProcessingWorkflow.class);
Synchronous start:
Asynchronous when the workflow result is not needed:// Start a workflow and wait for a result. // Note that if the waiting process is killed, the workflow will continue executing. String result = workflow.processFile(workflowArgs);
Asynchronous when the result is needed:// Returns as soon as the workflow is scheduled to start on the server. WorkflowExecution workflowExecution = WorkflowClient.start(workflow::processFile, workflowArgs); System.out.println("Started process file workflow with workflowId=\"" + workflowExecution.getWorkflowId() + "\" and runId=\"" + workflowExecution.getRunId() + "\"");
If you need to wait for a workflow completion after an asynchronous start, maybe even from a different process, the simplest way is to call the blocking version again. If// Returns a CompletableFuture<String> on the workflow result as soon as the workflow is scheduled to start on the server. CompletableFuture<String> result = WorkflowClient.execute(workflow::helloWorld, "User");
WorkflowOptions.getWorkflowIdReusePolicy()
is notAllowDuplicate
then instead of throwingWorkflowExecutionAlreadyStarted
, it reconnects to an existing workflow and waits for its completion. The following example shows how to do this from a different process than the one that started the workflow. All this process needs is aWorkflowId
.FileProcessingWorkflow workflow = workflowClient.newWorkflowStub(FileProcessingWorkflow.class, workflowId); // Returns result potentially waiting for workflow to complete. String result = workflow.processFile(workflowArgs);
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
QUERY_TYPE_REPLAY_ONLY
Replays workflow to the current state and returns empty result or error if replay failed.static java.lang.String
QUERY_TYPE_STACK_TRACE
Use this constant as a query type to get a workflow stack trace.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <R> java.util.concurrent.CompletableFuture<R>
execute(Functions.Func<R> workflow)
Executes zero argument workflow.static <A1,R>
java.util.concurrent.CompletableFuture<R>execute(Functions.Func1<A1,R> workflow, A1 arg1)
Executes one argument workflow asynchronously.static <A1,A2,R>
java.util.concurrent.CompletableFuture<R>execute(Functions.Func2<A1,A2,R> workflow, A1 arg1, A2 arg2)
Executes two argument workflow asynchronously.static <A1,A2,A3,R>
java.util.concurrent.CompletableFuture<R>execute(Functions.Func3<A1,A2,A3,R> workflow, A1 arg1, A2 arg2, A3 arg3)
Executes three argument workflow asynchronously.static <A1,A2,A3,A4,R>
java.util.concurrent.CompletableFuture<R>execute(Functions.Func4<A1,A2,A3,A4,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Executes four argument workflow asynchronously.static <A1,A2,A3,A4,A5,R>
java.util.concurrent.CompletableFuture<R>execute(Functions.Func5<A1,A2,A3,A4,A5,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
Executes five argument workflow asynchronously.static <A1,A2,A3,A4,A5,A6,R>
java.util.concurrent.CompletableFuture<R>execute(Functions.Func6<A1,A2,A3,A4,A5,A6,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
Executes six argument workflow asynchronously.static java.util.concurrent.CompletableFuture<java.lang.Void>
execute(Functions.Proc workflow)
Executes zero argument workflow with void return typestatic <A1> java.util.concurrent.CompletableFuture<java.lang.Void>
execute(Functions.Proc1<A1> workflow, A1 arg1)
Executes one argument workflow with void return typestatic <A1,A2>
java.util.concurrent.CompletableFuture<java.lang.Void>execute(Functions.Proc2<A1,A2> workflow, A1 arg1, A2 arg2)
Executes two argument workflow with void return typestatic <A1,A2,A3>
java.util.concurrent.CompletableFuture<java.lang.Void>execute(Functions.Proc3<A1,A2,A3> workflow, A1 arg1, A2 arg2, A3 arg3)
Executes three argument workflow with void return typestatic <A1,A2,A3,A4>
java.util.concurrent.CompletableFuture<java.lang.Void>execute(Functions.Proc4<A1,A2,A3,A4> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Executes four argument workflow with void return typestatic <A1,A2,A3,A4,A5>
java.util.concurrent.CompletableFuture<java.lang.Void>execute(Functions.Proc5<A1,A2,A3,A4,A5> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
Executes five argument workflow with void return typestatic <A1,A2,A3,A4,A5,A6>
java.util.concurrent.CompletableFuture<java.lang.Void>execute(Functions.Proc6<A1,A2,A3,A4,A5,A6> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
Executes six argument workflow with void return typeWorkflowClientOptions
getOptions()
io.temporal.serviceclient.WorkflowServiceStubs
getWorkflowServiceStubs()
ActivityCompletionClient
newActivityCompletionClient()
Creates newActivityCompletionClient
that can be used to complete activities asynchronously.static WorkflowClient
newInstance(io.temporal.serviceclient.WorkflowServiceStubs service)
Creates client that connects to an instance of the Temporal Service.static WorkflowClient
newInstance(io.temporal.serviceclient.WorkflowServiceStubs service, WorkflowClientOptions options)
Creates client that connects to an instance of the Temporal Service.BatchRequest
newSignalWithStartRequest()
Creates BatchRequest that can be used to signal an existing workflow or start a new one if not running.WorkflowStub
newUntypedWorkflowStub(io.temporal.api.common.v1.WorkflowExecution execution, java.util.Optional<java.lang.String> workflowType)
Creates workflow untyped client stub for a known execution.WorkflowStub
newUntypedWorkflowStub(java.lang.String workflowId)
Creates workflow untyped client stub that can be used to start a single workflow execution.WorkflowStub
newUntypedWorkflowStub(java.lang.String workflowType, WorkflowOptions options)
Creates workflow untyped client stub that can be used to start a single workflow execution.WorkflowStub
newUntypedWorkflowStub(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.util.Optional<java.lang.String> workflowType)
Creates workflow untyped client stub for a known execution.<T> T
newWorkflowStub(java.lang.Class<T> workflowInterface, WorkflowOptions options)
Creates workflow client stub that can be used to start a single workflow execution.<T> T
newWorkflowStub(java.lang.Class<T> workflowInterface, java.lang.String workflowId)
Creates workflow client stub for a known execution.<T> T
newWorkflowStub(java.lang.Class<T> workflowInterface, java.lang.String workflowId, java.util.Optional<java.lang.String> runId)
Creates workflow client stub for a known execution.io.temporal.api.common.v1.WorkflowExecution
signalWithStart(BatchRequest signalWithStartBatch)
Invoke SignalWithStart operation.static <R> io.temporal.api.common.v1.WorkflowExecution
start(Functions.Func<R> workflow)
Executes zero argument workflow.static <A1,R>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Func1<A1,R> workflow, A1 arg1)
Executes one argument workflow asynchronously.static <A1,A2,R>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Func2<A1,A2,R> workflow, A1 arg1, A2 arg2)
Executes two argument workflow asynchronously.static <A1,A2,A3,R>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Func3<A1,A2,A3,R> workflow, A1 arg1, A2 arg2, A3 arg3)
Executes three argument workflow asynchronously.static <A1,A2,A3,A4,R>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Func4<A1,A2,A3,A4,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Executes four argument workflow asynchronously.static <A1,A2,A3,A4,A5,R>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Func5<A1,A2,A3,A4,A5,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
Executes five argument workflow asynchronously.static <A1,A2,A3,A4,A5,A6,R>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Func6<A1,A2,A3,A4,A5,A6,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
Executes six argument workflow asynchronously.static io.temporal.api.common.v1.WorkflowExecution
start(Functions.Proc workflow)
Executes zero argument workflow with void return typestatic <A1> io.temporal.api.common.v1.WorkflowExecution
start(Functions.Proc1<A1> workflow, A1 arg1)
Executes one argument workflow with void return typestatic <A1,A2>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Proc2<A1,A2> workflow, A1 arg1, A2 arg2)
Executes two argument workflow with void return typestatic <A1,A2,A3>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Proc3<A1,A2,A3> workflow, A1 arg1, A2 arg2, A3 arg3)
Executes three argument workflow with void return typestatic <A1,A2,A3,A4>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Proc4<A1,A2,A3,A4> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Executes four argument workflow with void return typestatic <A1,A2,A3,A4,A5>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Proc5<A1,A2,A3,A4,A5> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
Executes five argument workflow with void return typestatic <A1,A2,A3,A4,A5,A6>
io.temporal.api.common.v1.WorkflowExecutionstart(Functions.Proc6<A1,A2,A3,A4,A5,A6> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
Executes six argument workflow with void return type
-
-
-
Field Detail
-
QUERY_TYPE_STACK_TRACE
static final java.lang.String QUERY_TYPE_STACK_TRACE
Use this constant as a query type to get a workflow stack trace.- See Also:
- Constant Field Values
-
QUERY_TYPE_REPLAY_ONLY
static final java.lang.String QUERY_TYPE_REPLAY_ONLY
Replays workflow to the current state and returns empty result or error if replay failed.- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
static WorkflowClient newInstance(io.temporal.serviceclient.WorkflowServiceStubs service)
Creates client that connects to an instance of the Temporal Service.- Parameters:
service
- client to the Temporal Service endpoint.
-
newInstance
static WorkflowClient newInstance(io.temporal.serviceclient.WorkflowServiceStubs service, WorkflowClientOptions options)
Creates client that connects to an instance of the Temporal Service.- Parameters:
service
- client to the Temporal Service endpoint.options
- Options (likeDataConverter
er override) for configuring client.
-
getOptions
WorkflowClientOptions getOptions()
-
newWorkflowStub
<T> T newWorkflowStub(java.lang.Class<T> workflowInterface, WorkflowOptions options)
Creates workflow client stub that can be used to start a single workflow execution. The first call must be to a method annotated with @WorkflowMethod. After workflow is started it can be also used to send signals or queries to it. IMPORTANT! Stub is per workflow instance. So new stub should be created for each new one.- Parameters:
workflowInterface
- interface that given workflow implementsoptions
- options used to start a workflow through returned stub- Returns:
- Stub that implements workflowInterface and can be used to start workflow and later to signal or query it.
-
newWorkflowStub
<T> T newWorkflowStub(java.lang.Class<T> workflowInterface, java.lang.String workflowId)
Creates workflow client stub for a known execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @WorkflowMethod.- Parameters:
workflowInterface
- interface that given workflow implements.workflowId
- Workflow id.- Returns:
- Stub that implements workflowInterface and can be used to signal or query it.
-
newWorkflowStub
<T> T newWorkflowStub(java.lang.Class<T> workflowInterface, java.lang.String workflowId, java.util.Optional<java.lang.String> runId)
Creates workflow client stub for a known execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @WorkflowMethod.- Parameters:
workflowInterface
- interface that given workflow implements.workflowId
- Workflow id.runId
- Run id of the workflow execution.- Returns:
- Stub that implements workflowInterface and can be used to signal or query it.
-
newUntypedWorkflowStub
WorkflowStub newUntypedWorkflowStub(java.lang.String workflowId)
Creates workflow untyped client stub that can be used to start a single workflow execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @WorkflowMethod.- Parameters:
workflowId
- Workflow id.- Returns:
- Stub that can be used to start workflow and later to signal or query it.
-
newUntypedWorkflowStub
WorkflowStub newUntypedWorkflowStub(java.lang.String workflowType, WorkflowOptions options)
Creates workflow untyped client stub that can be used to start a single workflow execution. After workflow is started it can be also used to send signals or queries to it. IMPORTANT! Stub is per workflow instance. So new stub should be created for each new one.- Parameters:
workflowType
- name of the workflow typeoptions
- options used to start a workflow through returned stub- Returns:
- Stub that can be used to start workflow and later to signal or query it.
-
newUntypedWorkflowStub
WorkflowStub newUntypedWorkflowStub(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.util.Optional<java.lang.String> workflowType)
Creates workflow untyped client stub for a known execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @WorkflowMethod.- Parameters:
workflowId
- workflow id and optional run id for executionrunId
- runId of the workflow execution. If not provided the last workflow with the given workflowId is assumed.workflowType
- type of the workflow. Optional as it is used for error reporting only.- Returns:
- Stub that can be used to start workflow and later to signal or query it.
-
newUntypedWorkflowStub
WorkflowStub newUntypedWorkflowStub(io.temporal.api.common.v1.WorkflowExecution execution, java.util.Optional<java.lang.String> workflowType)
Creates workflow untyped client stub for a known execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @WorkflowMethod.- Parameters:
execution
- workflow id and optional run id for executionworkflowType
- type of the workflow. Optional as it is used for error reporting only.- Returns:
- Stub that can be used to start workflow and later to signal or query it.
-
newActivityCompletionClient
ActivityCompletionClient newActivityCompletionClient()
Creates newActivityCompletionClient
that can be used to complete activities asynchronously. Only relevant for activity implementations that calledActivityExecutionContext.doNotCompleteOnReturn()
.TODO: Activity completion options with retries and timeouts.
-
newSignalWithStartRequest
BatchRequest newSignalWithStartRequest()
Creates BatchRequest that can be used to signal an existing workflow or start a new one if not running. The batch before invocation must contain exactly two operations. One annotated with @WorkflowMethod and another with @SignalMethod.- Returns:
- batch request used to call
signalWithStart(BatchRequest)
-
signalWithStart
io.temporal.api.common.v1.WorkflowExecution signalWithStart(BatchRequest signalWithStartBatch)
Invoke SignalWithStart operation.- Parameters:
signalWithStartBatch
- Must be created withnewSignalWithStartRequest()
- Returns:
- workflowId and runId of the signaled or started workflow.
-
getWorkflowServiceStubs
io.temporal.serviceclient.WorkflowServiceStubs getWorkflowServiceStubs()
-
start
static io.temporal.api.common.v1.WorkflowExecution start(Functions.Proc workflow)
Executes zero argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1> io.temporal.api.common.v1.WorkflowExecution start(Functions.Proc1<A1> workflow, A1 arg1)
Executes one argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2> io.temporal.api.common.v1.WorkflowExecution start(Functions.Proc2<A1,A2> workflow, A1 arg1, A2 arg2)
Executes two argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,A3> io.temporal.api.common.v1.WorkflowExecution start(Functions.Proc3<A1,A2,A3> workflow, A1 arg1, A2 arg2, A3 arg3)
Executes three argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,A3,A4> io.temporal.api.common.v1.WorkflowExecution start(Functions.Proc4<A1,A2,A3,A4> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Executes four argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,A3,A4,A5> io.temporal.api.common.v1.WorkflowExecution start(Functions.Proc5<A1,A2,A3,A4,A5> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
Executes five argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameterarg5
- fifth workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,A3,A4,A5,A6> io.temporal.api.common.v1.WorkflowExecution start(Functions.Proc6<A1,A2,A3,A4,A5,A6> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
Executes six argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameterarg5
- sixth workflow function parameterarg6
- sixth workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <R> io.temporal.api.common.v1.WorkflowExecution start(Functions.Func<R> workflow)
Executes zero argument workflow.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,R> io.temporal.api.common.v1.WorkflowExecution start(Functions.Func1<A1,R> workflow, A1 arg1)
Executes one argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow argument- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,R> io.temporal.api.common.v1.WorkflowExecution start(Functions.Func2<A1,A2,R> workflow, A1 arg1, A2 arg2)
Executes two argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,A3,R> io.temporal.api.common.v1.WorkflowExecution start(Functions.Func3<A1,A2,A3,R> workflow, A1 arg1, A2 arg2, A3 arg3)
Executes three argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,A3,A4,R> io.temporal.api.common.v1.WorkflowExecution start(Functions.Func4<A1,A2,A3,A4,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Executes four argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,A3,A4,A5,R> io.temporal.api.common.v1.WorkflowExecution start(Functions.Func5<A1,A2,A3,A4,A5,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
Executes five argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameterarg5
- sixth workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
start
static <A1,A2,A3,A4,A5,A6,R> io.temporal.api.common.v1.WorkflowExecution start(Functions.Func6<A1,A2,A3,A4,A5,A6,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
Executes six argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow argumentarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameterarg5
- sixth workflow function parameterarg6
- sixth workflow function parameter- Returns:
- WorkflowExecution that contains WorkflowId and RunId of the started workflow.
-
execute
static java.util.concurrent.CompletableFuture<java.lang.Void> execute(Functions.Proc workflow)
Executes zero argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.- Returns:
- future becomes ready upon workflow completion with null value or failure
-
execute
static <A1> java.util.concurrent.CompletableFuture<java.lang.Void> execute(Functions.Proc1<A1> workflow, A1 arg1)
Executes one argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameter- Returns:
- future becomes ready upon workflow completion with null value or failure
-
execute
static <A1,A2> java.util.concurrent.CompletableFuture<java.lang.Void> execute(Functions.Proc2<A1,A2> workflow, A1 arg1, A2 arg2)
Executes two argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameter- Returns:
- future becomes ready upon workflow completion with null value or failure
-
execute
static <A1,A2,A3> java.util.concurrent.CompletableFuture<java.lang.Void> execute(Functions.Proc3<A1,A2,A3> workflow, A1 arg1, A2 arg2, A3 arg3)
Executes three argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameter- Returns:
- future becomes ready upon workflow completion with null value or failure
-
execute
static <A1,A2,A3,A4> java.util.concurrent.CompletableFuture<java.lang.Void> execute(Functions.Proc4<A1,A2,A3,A4> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Executes four argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameter- Returns:
- future becomes ready upon workflow completion with null value or failure
-
execute
static <A1,A2,A3,A4,A5> java.util.concurrent.CompletableFuture<java.lang.Void> execute(Functions.Proc5<A1,A2,A3,A4,A5> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
Executes five argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameterarg5
- fifth workflow function parameter- Returns:
- future becomes ready upon workflow completion with null value or failure
-
execute
static <A1,A2,A3,A4,A5,A6> java.util.concurrent.CompletableFuture<java.lang.Void> execute(Functions.Proc6<A1,A2,A3,A4,A5,A6> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
Executes six argument workflow with void return type- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameterarg5
- sixth workflow function parameterarg6
- sixth workflow function parameter- Returns:
- future becomes ready upon workflow completion with null value or failure
-
execute
static <R> java.util.concurrent.CompletableFuture<R> execute(Functions.Func<R> workflow)
Executes zero argument workflow.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.- Returns:
- future that contains workflow result or failure
-
execute
static <A1,R> java.util.concurrent.CompletableFuture<R> execute(Functions.Func1<A1,R> workflow, A1 arg1)
Executes one argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow argument- Returns:
- future that contains workflow result or failure
-
execute
static <A1,A2,R> java.util.concurrent.CompletableFuture<R> execute(Functions.Func2<A1,A2,R> workflow, A1 arg1, A2 arg2)
Executes two argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameter- Returns:
- future that contains workflow result or failure
-
execute
static <A1,A2,A3,R> java.util.concurrent.CompletableFuture<R> execute(Functions.Func3<A1,A2,A3,R> workflow, A1 arg1, A2 arg2, A3 arg3)
Executes three argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameter- Returns:
- future that contains workflow result or failure
-
execute
static <A1,A2,A3,A4,R> java.util.concurrent.CompletableFuture<R> execute(Functions.Func4<A1,A2,A3,A4,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Executes four argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameter- Returns:
- future that contains workflow result or failure
-
execute
static <A1,A2,A3,A4,A5,R> java.util.concurrent.CompletableFuture<R> execute(Functions.Func5<A1,A2,A3,A4,A5,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
Executes five argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow function parameterarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameterarg5
- sixth workflow function parameter- Returns:
- future that contains workflow result or failure
-
execute
static <A1,A2,A3,A4,A5,A6,R> java.util.concurrent.CompletableFuture<R> execute(Functions.Func6<A1,A2,A3,A4,A5,A6,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
Executes six argument workflow asynchronously.- Parameters:
workflow
- The only supported value is method reference to a proxy created throughnewWorkflowStub(Class, WorkflowOptions)
.arg1
- first workflow argumentarg2
- second workflow function parameterarg3
- third workflow function parameterarg4
- fourth workflow function parameterarg5
- sixth workflow function parameterarg6
- sixth workflow function parameter- Returns:
- future that contains workflow result or failure
-
-