Class NexusStartActivityHelper

java.lang.Object
io.temporal.internal.nexus.NexusStartActivityHelper

@Experimental public class NexusStartActivityHelper extends Object
Shared helper for starting an activity from a Nexus operation.
  • Method Details

    • startActivityAndAttachLinks

      public static NexusStartActivityResponse startActivityAndAttachLinks(io.nexusrpc.handler.OperationContext ctx, io.nexusrpc.handler.OperationStartDetails details, String activityType, List<Object> args, StartActivityOptions options, Header header, Function<NexusStartActivityRequest,NexusStartActivityResponse> invoker)
      Starts an activity via the provided invoker function and returns the response. The root activity invoker records the link from StartActivityExecutionResponse; the Nexus task handler attaches that link to the operation response.
      Parameters:
      ctx - the operation context
      details - the operation start details containing requestId, callback, links
      activityType - the activity type name
      args - the activity arguments
      options - the activity scheduling options; the task queue defaults to the current worker's task queue
      header - the propagated header
      invoker - function that starts the activity given a NexusStartActivityRequest
      Returns:
      the NexusStartActivityResponse containing the activity ID and operation token