Options
All
  • Public
  • Public/Protected
  • All
Menu

The flow builder to build a flow.

Hierarchy

  • FlowBuilder

Index

Constructors

constructor

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

    Parameters

    Returns FlowBuilder

Properties

Protected Readonly flow

Methods

addContext

  • addContext<T>(type: T, defn: FlowContextMap[T]): FlowContextMap[T]
  • Add a context variable definition.

    Type parameters

    • T: "variables" | "constants" | "formulas" | "structs"

    Parameters

    • type: T

      the type of the context.

    • defn: FlowContextMap[T]

      the definition.

    Returns FlowContextMap[T]

    the definition.

addNode

  • addNode<T>(type: T, meta: FlowNodeMetaMap[T]): FlowNodeMetaMap[T]
  • Add a node to the flow and return.

    Type parameters

    • T: "assignments" | "decisions" | "loops" | "breaks" | "waits" | "recordCreates" | "recordUpdates" | "recordDeletes" | "recordLookups" | "fastCreates" | "fastUpdates" | "fastDeletes" | "fastLookups" | "actionCalls" | "subFlows" | "innerFlows"

    Parameters

    • type: T

      the node type.

    • meta: FlowNodeMetaMap[T]

      the metadata of the node.

    Returns FlowNodeMetaMap[T]

    the metadata.

addStartNode

  • addStartNode<T>(type: T, meta: FlowNodeMetaMap[T]): FlowNodeMetaMap[T]
  • A handy method to add a node to the flow and set as start element.

    Type parameters

    • T: "assignments" | "decisions" | "loops" | "breaks" | "waits" | "recordCreates" | "recordUpdates" | "recordDeletes" | "recordLookups" | "fastCreates" | "fastUpdates" | "fastDeletes" | "fastLookups" | "actionCalls" | "subFlows" | "innerFlows"

    Parameters

    • type: T

      the node type.

    • meta: FlowNodeMetaMap[T]

      the metadata of the node.

    Returns FlowNodeMetaMap[T]

    the metadata.

getFlow

setStartElement

  • setStartElement(name: string): void
  • Set the start element.

    Parameters

    • name: string

      the name of the start element.

    Returns void