Interface TemporalNexusClient


@Experimental public interface TemporalNexusClient
Nexus-aware client wrapping WorkflowClient. Provides methods for interacting with Temporal from within a Nexus operation handler.

Passed to TemporalOperation-annotated methods (and TemporalOperationHandler.StartHandler implementations) alongside the start context and input.

Example usage to start a workflow from an operation:


 @TemporalOperation
 public TemporalOperationResult<TransferResult> startTransfer(
     TemporalOperationStartContext ctx, TemporalNexusClient client, TransferInput input) {
   return client.startWorkflow(
       TransferWorkflow.class,
       TransferWorkflow::transfer,
       input,
       WorkflowOptions.newBuilder()
           .setWorkflowId("transfer-" + input.getTransferId())
           .build());
 }
 

For synchronous operations, use getWorkflowClient() directly and return a TemporalOperationResult.sync(R) result. For example, to send a signal:


 @TemporalOperation
 public TemporalOperationResult<Void> cancelOrder(
     TemporalOperationStartContext ctx, TemporalNexusClient client, CancelOrderInput input) {
   client.getWorkflowClient()
       .newUntypedWorkflowStub("order-" + input.getOrderId())
       .signal("requestCancellation", input);
   return TemporalOperationResult.sync(null);
 }
 
  • Method Details

    • getWorkflowClient

      WorkflowClient getWorkflowClient()
      Returns the underlying WorkflowClient for advanced use cases.
    • startWorkflow

      <T, R> TemporalOperationResult<R> startWorkflow(Class<T> workflowClass, Functions.Func1<T,R> workflowMethod, WorkflowOptions options)
      Starts a zero-argument workflow that returns a value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::run, options)
       
      Type Parameters:
      T - the workflow interface type
      R - the workflow return type
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, R> TemporalOperationResult<R> startWorkflow(Class<T> workflowClass, Functions.Func2<T,A1,R> workflowMethod, A1 arg1, WorkflowOptions options)
      Starts a one-argument workflow that returns a value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::processOrder, input, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      R - the workflow return type
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, R> TemporalOperationResult<R> startWorkflow(Class<T> workflowClass, Functions.Func3<T,A1,A2,R> workflowMethod, A1 arg1, A2 arg2, WorkflowOptions options)
      Starts a two-argument workflow that returns a value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::run, arg1, arg2, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      R - the workflow return type
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, A3, R> TemporalOperationResult<R> startWorkflow(Class<T> workflowClass, Functions.Func4<T,A1,A2,A3,R> workflowMethod, A1 arg1, A2 arg2, A3 arg3, WorkflowOptions options)
      Starts a three-argument workflow that returns a value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::run, arg1, arg2, arg3, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      A3 - the type of the third workflow argument
      R - the workflow return type
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, A3, A4, R> TemporalOperationResult<R> startWorkflow(Class<T> workflowClass, Functions.Func5<T,A1,A2,A3,A4,R> workflowMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, WorkflowOptions options)
      Starts a four-argument workflow that returns a value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::run, arg1, arg2, arg3, arg4, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      A3 - the type of the third workflow argument
      A4 - the type of the fourth workflow argument
      R - the workflow return type
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - fourth workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, A3, A4, A5, R> TemporalOperationResult<R> startWorkflow(Class<T> workflowClass, Functions.Func6<T,A1,A2,A3,A4,A5,R> workflowMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, WorkflowOptions options)
      Starts a five-argument workflow that returns a value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::run, arg1, arg2, arg3, arg4, arg5, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      A3 - the type of the third workflow argument
      A4 - the type of the fourth workflow argument
      A5 - the type of the fifth workflow argument
      R - the workflow return type
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - fourth workflow argument
      arg5 - fifth workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, A3, A4, A5, A6, R> TemporalOperationResult<R> startWorkflow(Class<T> workflowClass, Functions.Func7<T,A1,A2,A3,A4,A5,A6,R> workflowMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, WorkflowOptions options)
      Starts a six-argument workflow that returns a value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::run, arg1, arg2, arg3, arg4, arg5, arg6, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      A3 - the type of the third workflow argument
      A4 - the type of the fourth workflow argument
      A5 - the type of the fifth workflow argument
      A6 - the type of the sixth workflow argument
      R - the workflow return type
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - fourth workflow argument
      arg5 - fifth workflow argument
      arg6 - sixth workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T> TemporalOperationResult<Void> startWorkflow(Class<T> workflowClass, Functions.Proc1<T> workflowMethod, WorkflowOptions options)
      Starts a zero-argument workflow with no return value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::execute, options)
       
      Type Parameters:
      T - the workflow interface type
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1> TemporalOperationResult<Void> startWorkflow(Class<T> workflowClass, Functions.Proc2<T,A1> workflowMethod, A1 arg1, WorkflowOptions options)
      Starts a one-argument workflow with no return value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::execute, input, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2> TemporalOperationResult<Void> startWorkflow(Class<T> workflowClass, Functions.Proc3<T,A1,A2> workflowMethod, A1 arg1, A2 arg2, WorkflowOptions options)
      Starts a two-argument workflow with no return value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::execute, arg1, arg2, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, A3> TemporalOperationResult<Void> startWorkflow(Class<T> workflowClass, Functions.Proc4<T,A1,A2,A3> workflowMethod, A1 arg1, A2 arg2, A3 arg3, WorkflowOptions options)
      Starts a three-argument workflow with no return value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::execute, arg1, arg2, arg3, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      A3 - the type of the third workflow argument
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, A3, A4> TemporalOperationResult<Void> startWorkflow(Class<T> workflowClass, Functions.Proc5<T,A1,A2,A3,A4> workflowMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, WorkflowOptions options)
      Starts a four-argument workflow with no return value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::execute, arg1, arg2, arg3, arg4, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      A3 - the type of the third workflow argument
      A4 - the type of the fourth workflow argument
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - fourth workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, A3, A4, A5> TemporalOperationResult<Void> startWorkflow(Class<T> workflowClass, Functions.Proc6<T,A1,A2,A3,A4,A5> workflowMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, WorkflowOptions options)
      Starts a five-argument workflow with no return value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::execute, arg1, arg2, arg3, arg4, arg5, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      A3 - the type of the third workflow argument
      A4 - the type of the fourth workflow argument
      A5 - the type of the fifth workflow argument
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - fourth workflow argument
      arg5 - fifth workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <T, A1, A2, A3, A4, A5, A6> TemporalOperationResult<Void> startWorkflow(Class<T> workflowClass, Functions.Proc7<T,A1,A2,A3,A4,A5,A6> workflowMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, WorkflowOptions options)
      Starts a six-argument workflow with no return value.

      Example:

      
       client.startWorkflow(MyWorkflow.class, MyWorkflow::execute, arg1, arg2, arg3, arg4, arg5, arg6, options)
       
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first workflow argument
      A2 - the type of the second workflow argument
      A3 - the type of the third workflow argument
      A4 - the type of the fourth workflow argument
      A5 - the type of the fifth workflow argument
      A6 - the type of the sixth workflow argument
      Parameters:
      workflowClass - the workflow interface class
      workflowMethod - unbound method reference to the workflow method
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - fourth workflow argument
      arg5 - fifth workflow argument
      arg6 - sixth workflow argument
      options - workflow start options (must include workflowId)
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <R> TemporalOperationResult<R> startWorkflow(String workflowType, Class<R> resultClass, WorkflowOptions options, Object... args)
      Starts a workflow using an untyped workflow type name.

      Example:

      
       client.startWorkflow("MyWorkflow", String.class, options, input)
       
      Type Parameters:
      R - the workflow return type
      Parameters:
      workflowType - the workflow type name string
      resultClass - the expected result class
      options - workflow start options (must include workflowId)
      args - workflow arguments
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflow

      <R> TemporalOperationResult<R> startWorkflow(String workflowType, Class<R> resultClass, Type resultType, WorkflowOptions options, Object... args)
      Starts a workflow using an untyped workflow type name, with both a result class and a generic Type. Use this overload when the workflow returns a generic type (e.g. List<String>) so the result can be deserialized correctly.

      Example:

      
       client.startWorkflow(
           "MyWorkflow",
           List.class,
           new TypeToken<List<String>>() {}.getType(),
           options,
           input)
       
      Type Parameters:
      R - the workflow return type
      Parameters:
      workflowType - the workflow type name string
      resultClass - the expected result class
      resultType - the expected result Type (carries generic parameters)
      options - workflow start options (must include workflowId)
      args - workflow arguments
      Returns:
      an async TemporalOperationResult with the workflow-run operation token
    • startWorkflowUpdate

      <T, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Func1<T,R> updateMethod, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a workflow update on an existing workflow as a Nexus operation. The result is delivered asynchronously via the Nexus completion callback, unless the update RPC comes back already completed (e.g. a retried request, or a request that failed validation), in which case the result (or failure) is returned synchronously.

      updateMethod must be an unbound method reference to a method on workflowClass (as opposed to startWorkflow(java.lang.Class<T>, io.temporal.workflow.Functions.Func1<T, R>, io.temporal.client.WorkflowOptions), which creates a new workflow, this targets the existing workflow identified by workflowId).

      options' waitForStage has to be set to WaitForStage = ACCEPTED as Nexus Operations only support async Update requests. If not, the operation will be marked as failed. If options does not set an update ID, it defaults to the Nexus request ID which is consistent with other SDKs usage.

      A Nexus callback URL is required for this operation; if the caller did not provide one, this method throws a BAD_REQUEST HandlerException.

      Example:

      
       client.startWorkflowUpdate(
           MyWorkflow.class, input.getWorkflowId(),
           MyWorkflow::myUpdate, input.getArg(),
           UpdateOptions.newBuilder(String.class)
               .setUpdateName("myUpdate")
               .setWaitForStage(WorkflowUpdateStage.ACCEPTED)
               .build())
       
      Type Parameters:
      T - the workflow interface type
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Func2<T,A1,R> updateMethod, A1 arg1, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a one-argument workflow update on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Func3<T,A1,A2,R> updateMethod, A1 arg1, A2 arg2, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a two-argument workflow update on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Func4<T,A1,A2,A3,R> updateMethod, A1 arg1, A2 arg2, A3 arg3, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a three-argument workflow update on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Func5<T,A1,A2,A3,A4,R> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a four-argument workflow update on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, A5, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Func6<T,A1,A2,A3,A4,A5,R> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a five-argument workflow update on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      A5 - the type of the fifth update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      arg5 - fifth update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, A5, A6, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Func7<T,A1,A2,A3,A4,A5,A6,R> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a six-argument workflow update on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      A5 - the type of the fifth update argument
      A6 - the type of the sixth update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      arg5 - fifth update argument
      arg6 - sixth update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Proc1<T> updateMethod, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a zero-argument workflow update with no return value on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Proc2<T,A1> updateMethod, A1 arg1, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a one-argument workflow update with no return value on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Proc3<T,A1,A2> updateMethod, A1 arg1, A2 arg2, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a two-argument workflow update with no return value on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Proc4<T,A1,A2,A3> updateMethod, A1 arg1, A2 arg2, A3 arg3, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a three-argument workflow update with no return value on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Proc5<T,A1,A2,A3,A4> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a four-argument workflow update with no return value on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, A5> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Proc6<T,A1,A2,A3,A4,A5> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a five-argument workflow update with no return value on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      A5 - the type of the fifth update argument
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      arg5 - fifth update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, A5, A6> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, String workflowId, Functions.Proc7<T,A1,A2,A3,A4,A5,A6> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a six-argument workflow update with no return value on an existing workflow as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      A5 - the type of the fifth update argument
      A6 - the type of the sixth update argument
      Parameters:
      workflowClass - the workflow interface class
      workflowId - the ID of the existing workflow to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      arg5 - fifth update argument
      arg6 - sixth update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Func1<T,R> updateMethod, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a workflow update on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Func2<T,A1,R> updateMethod, A1 arg1, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a one-argument workflow update on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Func3<T,A1,A2,R> updateMethod, A1 arg1, A2 arg2, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a two-argument workflow update on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Func4<T,A1,A2,A3,R> updateMethod, A1 arg1, A2 arg2, A3 arg3, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a three-argument workflow update on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Func5<T,A1,A2,A3,A4,R> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a four-argument workflow update on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, A5, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Func6<T,A1,A2,A3,A4,A5,R> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a five-argument workflow update on the provided workflow execution. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      A5 - the type of the fifth update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      arg5 - fifth update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, A5, A6, R> TemporalOperationResult<R> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Func7<T,A1,A2,A3,A4,A5,A6,R> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, UpdateOptions<R> options) throws io.nexusrpc.OperationException
      Starts a six-argument workflow update on the provided workflow execution. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      A5 - the type of the fifth update argument
      A6 - the type of the sixth update argument
      R - the update return type
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      arg5 - fifth update argument
      arg6 - sixth update argument
      options - update options (must include the update result class)
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Proc1<T> updateMethod, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a zero-argument workflow update with no return value on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Proc2<T,A1> updateMethod, A1 arg1, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a one-argument workflow update with no return value on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Proc3<T,A1,A2> updateMethod, A1 arg1, A2 arg2, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a two-argument workflow update with no return value on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Proc4<T,A1,A2,A3> updateMethod, A1 arg1, A2 arg2, A3 arg3, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a three-argument workflow update with no return value on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Proc5<T,A1,A2,A3,A4> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a four-argument workflow update with no return value on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, A5> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Proc6<T,A1,A2,A3,A4,A5> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a five-argument workflow update with no return value on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      A5 - the type of the fifth update argument
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      arg5 - fifth update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startWorkflowUpdate

      <T, A1, A2, A3, A4, A5, A6> TemporalOperationResult<Void> startWorkflowUpdate(Class<T> workflowClass, io.temporal.api.common.v1.WorkflowExecution execution, Functions.Proc7<T,A1,A2,A3,A4,A5,A6> updateMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, UpdateOptions<Void> options) throws io.nexusrpc.OperationException
      Starts a six-argument workflow update with no return value on the provided workflow execution as a Nexus operation. See startWorkflowUpdate(Class, String, Functions.Func1, UpdateOptions) for the full behavior contract.
      Type Parameters:
      T - the workflow interface type
      A1 - the type of the first update argument
      A2 - the type of the second update argument
      A3 - the type of the third update argument
      A4 - the type of the fourth update argument
      A5 - the type of the fifth update argument
      A6 - the type of the sixth update argument
      Parameters:
      workflowClass - the workflow interface class
      execution - the workflow execution to update
      updateMethod - unbound method reference to the update method
      arg1 - first update argument
      arg2 - second update argument
      arg3 - third update argument
      arg4 - fourth update argument
      arg5 - fifth update argument
      arg6 - sixth update argument
      options - update options
      Returns:
      a TemporalOperationResult; sync if the update already completed, async (carrying the update-workflow operation token) otherwise
      Throws:
      io.nexusrpc.OperationException
    • startActivity

      <I, R> TemporalOperationResult<R> startActivity(Class<I> activityInterface, Functions.Func1<I,R> activityMethod, StartActivityOptions options)
      Starts a zero-argument activity that returns a value.

      Example:

      
       client.startActivity(MyActivity.class, MyActivity::run, options)
       
      Type Parameters:
      I - the activity interface type
      R - the activity return type
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, R> TemporalOperationResult<R> startActivity(Class<I> activityInterface, Functions.Func2<I,A1,R> activityMethod, A1 arg1, StartActivityOptions options)
      Starts a one-argument activity that returns a value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      R - the activity return type
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, R> TemporalOperationResult<R> startActivity(Class<I> activityInterface, Functions.Func3<I,A1,A2,R> activityMethod, A1 arg1, A2 arg2, StartActivityOptions options)
      Starts a two-argument activity that returns a value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      R - the activity return type
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, A3, R> TemporalOperationResult<R> startActivity(Class<I> activityInterface, Functions.Func4<I,A1,A2,A3,R> activityMethod, A1 arg1, A2 arg2, A3 arg3, StartActivityOptions options)
      Starts a three-argument activity that returns a value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      A3 - the type of the third activity argument
      R - the activity return type
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      arg3 - third activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, A3, A4, R> TemporalOperationResult<R> startActivity(Class<I> activityInterface, Functions.Func5<I,A1,A2,A3,A4,R> activityMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, StartActivityOptions options)
      Starts a four-argument activity that returns a value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      A3 - the type of the third activity argument
      A4 - the type of the fourth activity argument
      R - the activity return type
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      arg3 - third activity argument
      arg4 - fourth activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, A3, A4, A5, R> TemporalOperationResult<R> startActivity(Class<I> activityInterface, Functions.Func6<I,A1,A2,A3,A4,A5,R> activityMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, StartActivityOptions options)
      Starts a five-argument activity that returns a value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      A3 - the type of the third activity argument
      A4 - the type of the fourth activity argument
      A5 - the type of the fifth activity argument
      R - the activity return type
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      arg3 - third activity argument
      arg4 - fourth activity argument
      arg5 - fifth activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, A3, A4, A5, A6, R> TemporalOperationResult<R> startActivity(Class<I> activityInterface, Functions.Func7<I,A1,A2,A3,A4,A5,A6,R> activityMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, StartActivityOptions options)
      Starts a six-argument activity that returns a value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      A3 - the type of the third activity argument
      A4 - the type of the fourth activity argument
      A5 - the type of the fifth activity argument
      A6 - the type of the sixth activity argument
      R - the activity return type
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      arg3 - third activity argument
      arg4 - fourth activity argument
      arg5 - fifth activity argument
      arg6 - sixth activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I> TemporalOperationResult<Void> startActivity(Class<I> activityInterface, Functions.Proc1<I> activityMethod, StartActivityOptions options)
      Starts a zero-argument activity with no return value.
      Type Parameters:
      I - the activity interface type
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1> TemporalOperationResult<Void> startActivity(Class<I> activityInterface, Functions.Proc2<I,A1> activityMethod, A1 arg1, StartActivityOptions options)
      Starts a one-argument activity with no return value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2> TemporalOperationResult<Void> startActivity(Class<I> activityInterface, Functions.Proc3<I,A1,A2> activityMethod, A1 arg1, A2 arg2, StartActivityOptions options)
      Starts a two-argument activity with no return value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, A3> TemporalOperationResult<Void> startActivity(Class<I> activityInterface, Functions.Proc4<I,A1,A2,A3> activityMethod, A1 arg1, A2 arg2, A3 arg3, StartActivityOptions options)
      Starts a three-argument activity with no return value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      A3 - the type of the third activity argument
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      arg3 - third activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, A3, A4> TemporalOperationResult<Void> startActivity(Class<I> activityInterface, Functions.Proc5<I,A1,A2,A3,A4> activityMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, StartActivityOptions options)
      Starts a four-argument activity with no return value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      A3 - the type of the third activity argument
      A4 - the type of the fourth activity argument
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      arg3 - third activity argument
      arg4 - fourth activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, A3, A4, A5> TemporalOperationResult<Void> startActivity(Class<I> activityInterface, Functions.Proc6<I,A1,A2,A3,A4,A5> activityMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, StartActivityOptions options)
      Starts a five-argument activity with no return value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      A3 - the type of the third activity argument
      A4 - the type of the fourth activity argument
      A5 - the type of the fifth activity argument
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      arg3 - third activity argument
      arg4 - fourth activity argument
      arg5 - fifth activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <I, A1, A2, A3, A4, A5, A6> TemporalOperationResult<Void> startActivity(Class<I> activityInterface, Functions.Proc7<I,A1,A2,A3,A4,A5,A6> activityMethod, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, StartActivityOptions options)
      Starts a six-argument activity with no return value.
      Type Parameters:
      I - the activity interface type
      A1 - the type of the first activity argument
      A2 - the type of the second activity argument
      A3 - the type of the third activity argument
      A4 - the type of the fourth activity argument
      A5 - the type of the fifth activity argument
      A6 - the type of the sixth activity argument
      Parameters:
      activityInterface - the activity interface class
      activityMethod - unbound method reference to the activity method
      arg1 - first activity argument
      arg2 - second activity argument
      arg3 - third activity argument
      arg4 - fourth activity argument
      arg5 - fifth activity argument
      arg6 - sixth activity argument
      options - activity start options; taskQueue defaults to the current worker task queue
      Returns:
      an async TemporalOperationResult with the activity-execution operation token
    • startActivity

      <R> TemporalOperationResult<R> startActivity(String activityType, Class<R> resultClass, StartActivityOptions options, Object... args)
      Starts an activity using an untyped activity type name.

      Example:

      
       client.startActivity("MyActivity", String.class, options, input)
       
      Type Parameters:
      R - the activity return type
      Parameters:
      activityType - the activity type name string
      resultClass - the expected result class
      options - activity start options; taskQueue defaults to the current worker task queue
      args - activity arguments
      Returns:
      an async TemporalOperationResult with the activity-execution operation token