Class NexusStartWorkflowHelper
java.lang.Object
io.temporal.internal.nexus.NexusStartWorkflowHelper
Shared helper for starting a workflow from a Nexus operation and attaching workflow links to the
operation context. Used by both
WorkflowRunOperationImpl and
TemporalNexusClientImpl.-
Method Summary
Modifier and TypeMethodDescriptionstatic NexusStartWorkflowResponsestartWorkflowAndAttachLinks(io.nexusrpc.handler.OperationContext ctx, io.nexusrpc.handler.OperationStartDetails details, Function<NexusStartWorkflowRequest, NexusStartWorkflowResponse> invoker) Starts a workflow via the provided invoker function, attaches workflow links to the operation context, and returns the response.
-
Method Details
-
startWorkflowAndAttachLinks
public static NexusStartWorkflowResponse startWorkflowAndAttachLinks(io.nexusrpc.handler.OperationContext ctx, io.nexusrpc.handler.OperationStartDetails details, Function<NexusStartWorkflowRequest, NexusStartWorkflowResponse> invoker) Starts a workflow via the provided invoker function, attaches workflow links to the operation context, and returns the response.- Parameters:
ctx- the operation context (links will be attached as a side-effect)details- the operation start details containing requestId, callback, linksinvoker- function that starts the workflow given aNexusStartWorkflowRequest- Returns:
- the
NexusStartWorkflowResponsecontaining the operation token and workflow execution
-