The flow builder to build a flow.

Constructors

  • Construct a flow builder with intial setup. The added node and context will be directly written into the given flow.

    Parameters

    Returns FlowBuilder

Properties

Methods

  • Add a context variable definition.

    Type Parameters

    Parameters

    • type: T

      the type of the context.

    • defn: FlowContextMap[T]

      the definition.

    Returns FlowContextMap[T]

    the definition.

  • Add a node to the flow and return.

    Type Parameters

    Parameters

    • type: T

      the node type.

    • meta: FlowNodeMetaMap[T]

      the metadata of the node.

    Returns FlowNodeMetaMap[T]

    the metadata.

  • A handy method to add a node to the flow and set as start element.

    Type Parameters

    Parameters

    • type: T

      the node type.

    • meta: FlowNodeMetaMap[T]

      the metadata of the node.

    Returns FlowNodeMetaMap[T]

    the metadata.

  • Set the start element.

    Parameters

    • name: string

      the name of the start element.

    Returns void