Provides methods to query, retrieve, and manage tasks and their results within a FlowController.

Constructors

Accessors

Methods

  • Finds the first task in the completed collection that matches the provided builder.

    Type Parameters

    • T

      Type of the task.

    Parameters

    • builder: BuilderIs<T>

      Builder used to identify the task.

    Returns undefined | T

    The matching task, or undefined if not found.

  • Finds the last task in the completed collection that matches the provided builder.

    Type Parameters

    • T

      Type of the task.

    Parameters

    • builder: BuilderIs<T>

      Builder used to identify the task.

    Returns undefined | T

    The matching task, or undefined if not found.

  • Retrieves the first task in the completed collection that matches the provided builder.

    This method behaves the same as find, except it throws an error if no task is found.

    Type Parameters

    • T

      Type of the task.

    Parameters

    • builder: BuilderIs<T>

      Builder used to identify the task.

    Returns NonNullable<T>

    The matching task.

    If no task is found.

  • Retrieves all tasks in the completed collection that match the provided builder.

    Type Parameters

    • T

      Type of the task.

    Parameters

    • builder: BuilderIs<T>

      Builder used to identify the tasks.

    Returns T[]

    An array of matching tasks.

  • Retrieves the last task in the completed collection that matches the provided builder.

    This method behaves the same as findLast, except it throws an error if no task is found.

    Type Parameters

    • T

      Type of the task.

    Parameters

    • builder: BuilderIs<T>

      Builder used to identify the task.

    Returns NonNullable<T>

    The matching task.

    If no task is found.

  • Retrieves the result of the last task in the completed collection that matches the provided builder.

    Type Parameters

    • TSpec extends TaskSpec

      Specification of the task.

    Parameters

    Returns NonNullable<TSpec["TResult"]>

    The result of the task.

    If the task is not found or its result is empty.

  • Retrieves the result of the first task in the completed collection that matches the provided builder.

    Type Parameters

    • TSpec extends TaskSpec

      Specification of the task.

    Parameters

    Returns NonNullable<TSpec["TResult"]>

    The result of the task.

    If the task is not found or its result is empty.

  • Retrieves the results of all tasks in the completed collection that match the provided builder.

    Type Parameters

    • TSpec extends TaskSpec

      Specification of the task.

    Parameters

    Returns NonNullable<TSpec["TResult"]>[]

    An array of results from the matching tasks.

    If any task result is empty.