Package io.temporal.nexus
Class WorkflowRunOperation
- java.lang.Object
-
- io.temporal.nexus.WorkflowRunOperation
-
public final class WorkflowRunOperation extends java.lang.ObjectWorkflowRunOperation can be used to map a workflow run to a Nexus operationPre-release feature: Attaching multiple Nexus callers to an underlying handler Workflow:
WorkflowOptions.getWorkflowIdConflictPolicy()is by default set to fail if a workflow is already running. That is, if a caller executes another operation that starts the same workflow, it will fail. You can set it toWorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTINGto attach the caller's callback to the existing running workflow. This way, all attached callers will be notified when the workflow completes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,R>
io.nexusrpc.handler.OperationHandler<T,R>fromWorkflowHandle(WorkflowHandleFactory<T,R> handleFactory)Maps a workflow handle to anOperationHandler.static <T,R>
io.nexusrpc.handler.OperationHandler<T,R>fromWorkflowMethod(WorkflowMethodFactory<T,R> startMethod)Maps a workflow method to anOperationHandler.
-
-
-
Method Detail
-
fromWorkflowMethod
public static <T,R> io.nexusrpc.handler.OperationHandler<T,R> fromWorkflowMethod(WorkflowMethodFactory<T,R> startMethod)
Maps a workflow method to anOperationHandler.- Parameters:
startMethod- returns the workflow method reference to call- Returns:
- Operation handler to be used as an
OperationImpl
-
fromWorkflowHandle
public static <T,R> io.nexusrpc.handler.OperationHandler<T,R> fromWorkflowHandle(WorkflowHandleFactory<T,R> handleFactory)
Maps a workflow handle to anOperationHandler.- Parameters:
handleFactory- returns the workflow handle that will be mapped to the call- Returns:
- Operation handler to be used as an
OperationImpl
-
-