Class WorkflowHandle<R>

java.lang.Object
io.temporal.nexus.WorkflowHandle<R>

public final class WorkflowHandle<R> extends Object
WorkflowHandle is a readonly representation of a workflow run backing a Nexus operation.
  • Method Details

    • fromWorkflowMethod

      public static WorkflowHandle<Void> fromWorkflowMethod(Functions.Proc workflow)
      Create a handle to a zero argument workflow with void return type
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1> WorkflowHandle<Void> fromWorkflowMethod(Functions.Proc1<A1> workflow, A1 arg1)
      Create a handle to a one argument workflow with void return type
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow argument
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2> WorkflowHandle<Void> fromWorkflowMethod(Functions.Proc2<A1,A2> workflow, A1 arg1, A2 arg2)
      Create a handle to a two argument workflow with void return type
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow argument
      arg2 - second workflow argument
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, A3> WorkflowHandle<Void> fromWorkflowMethod(Functions.Proc3<A1,A2,A3> workflow, A1 arg1, A2 arg2, A3 arg3)
      Create a handle to a three argument workflow with void return type
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, A3, A4> WorkflowHandle<Void> fromWorkflowMethod(Functions.Proc4<A1,A2,A3,A4> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
      Create a handle to a four argument workflow with void return type
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - third workflow argument
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, A3, A4, A5> WorkflowHandle<Void> fromWorkflowMethod(Functions.Proc5<A1,A2,A3,A4,A5> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
      Create a handle to a five argument workflow with void return type
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - fourth workflow argument
      arg5 - fifth workflow argument
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, A3, A4, A5, A6> WorkflowHandle<Void> fromWorkflowMethod(Functions.Proc6<A1,A2,A3,A4,A5,A6> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
      Create a handle to a five argument workflow with void return type
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow argument
      arg2 - second workflow argument
      arg3 - third workflow argument
      arg4 - fourth workflow argument
      arg5 - fifth workflow argument
      arg6 - fifth workflow argument
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <R> WorkflowHandle<R> fromWorkflowMethod(Functions.Func<R> workflow)
      Create a handle to a zero argument workflow
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, R> WorkflowHandle<R> fromWorkflowMethod(Functions.Func1<A1,R> workflow, A1 arg1)
      Create a handle to a one argument workflow.
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow argument
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, R> WorkflowHandle<R> fromWorkflowMethod(Functions.Func2<A1,A2,R> workflow, A1 arg1, A2 arg2)
      Create a handle to a two argument workflow.
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow function parameter
      arg2 - second workflow function parameter
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, A3, R> WorkflowHandle<R> fromWorkflowMethod(Functions.Func3<A1,A2,A3,R> workflow, A1 arg1, A2 arg2, A3 arg3)
      Create a handle to a three argument workflow.
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow function parameter
      arg2 - second workflow function parameter
      arg3 - third workflow function parameter
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, A3, A4, R> WorkflowHandle<R> fromWorkflowMethod(Functions.Func4<A1,A2,A3,A4,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
      Create a handle to a four argument workflow.
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow function parameter
      arg2 - second workflow function parameter
      arg3 - third workflow function parameter
      arg4 - fourth workflow function parameter
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, A3, A4, A5, R> WorkflowHandle<R> fromWorkflowMethod(Functions.Func5<A1,A2,A3,A4,A5,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
      Create a handle to a five argument workflow.
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow function parameter
      arg2 - second workflow function parameter
      arg3 - third workflow function parameter
      arg4 - fourth workflow function parameter
      arg5 - fifth workflow function parameter
      Returns:
      WorkflowHandle
    • fromWorkflowMethod

      public static <A1, A2, A3, A4, A5, A6, R> WorkflowHandle<R> fromWorkflowMethod(Functions.Func6<A1,A2,A3,A4,A5,A6,R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6)
      Create a handle to a six argument workflow.
      Parameters:
      workflow - The only supported value is method reference to a proxy created through WorkflowClient.newWorkflowStub(Class, WorkflowOptions).
      arg1 - first workflow function parameter
      arg2 - second workflow function parameter
      arg3 - third workflow function parameter
      arg4 - fourth workflow function parameter
      arg5 - fifth workflow function parameter
      arg6 - sixth workflow function parameter
      Returns:
      WorkflowHandle
    • fromWorkflowStub

      public static <R> WorkflowHandle<R> fromWorkflowStub(WorkflowStub stub, Class<R> resultClass, Object... args)
      Create a WorkflowHandle from an untyped workflow stub.
      Parameters:
      stub - The workflow stub to use
      resultClass - class of the workflow return value
      args - arguments to start the workflow
      Returns:
      WorkflowHandle