Interface OrchestratorFunction<R>

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface OrchestratorFunction<R>
    Functional interface for inline orchestrator functions.

    See the description of TaskOrchestration for more information about how to correctly implement orchestrators.

    • Method Detail

      • apply

        R apply​(TaskOrchestrationContext ctx)
        Executes an orchestrator function and returns a result to use as the orchestration output.

        This functional interface is designed to support implementing orchestrators as lambda functions. It's intended to be very similar to Function, but with a signature that's specific to orchestrators.

        Parameters:
        ctx - the orchestration context, which provides access to additional context for the current orchestration execution
        Returns:
        the serializable output of the orchestrator function