footprintjs - v11.2.0
    Preparing search index...

    Class FlowchartTraverser<TOut, TScope>

    Type Parameters

    • TOut = any
    • TScope = any
    Index
    MAX_EXECUTE_DEPTH: 500

    Default maximum nested executeNode depth before an error is thrown.

    What counts as depth (trampoline model): executeNode is an iterative driver — linear next hops, loop edges (loopTo/dynamic next), and dynamic-subflow re-entry are followed in a flat loop and consume NO depth. Depth grows only with true tree nesting: one level for a fork's or selector's children, one per decider branch dispatch that must return to its invoker (decider with its own next). A subflow mount consumes no depth: Phase 0 hands it to SubflowExecutor, and the subflow body runs on a FRESH traverser whose root context has no parent, so it starts again at depth 1. Nesting subflows inside subflows is not bounded by this cap.

    500 therefore covers any realistic chart — it bounds nesting within one traverser, not chain length or loop count. Loops are bounded by ContinuationResolver's independent iteration limit (default 1000, configurable via RunOptions.maxIterations), which is now the binding constraint for loop-heavy pipelines.

    Parallel siblings share their parent's depth + 1 — a fork or selector of any width is one level, never one level per child.

    Not safe for concurrent .execute() calls on the same instance (the break flag and the resolver's loop counts are per instance). Use a separate FlowchartTraverser per concurrent execution. FlowChartExecutor.run() always creates a fresh traverser per call.

    • Break state captured at the top-level of the most recent execute(). shouldBreak is true when a stage called scope.$break(reason); the optional reason carries the string passed to $break.

      Used by SubflowExecutor to propagate an inner subflow's break up to the parent traverser when the mount sets propagateBreak: true.

      Returns { reason?: string; shouldBreak: boolean }

    • Global recorder backend when constructed here; component dispatch may exist with prose disabled.

      Returns FlowRecorderDispatcher | undefined

    • Parameters

      • Optionaloptions: { redact?: boolean }

      Returns {
          commitLog: unknown[];
          correlation?: RunCorrelation;
          executionTree: unknown;
          initialState?: Record<string, unknown>;
          logAddress?: LogAddress;
          readSources?: EngineReadSources;
          recorders?: { data: unknown; id: string; name: string }[];
          runId: string;
          sharedState: Record<string, unknown>;
          subflowResults?: Record<string, unknown>;
      }

      • commitLog: unknown[]
      • Optionalcorrelation?: RunCorrelation
      • executionTree: unknown
      • OptionalinitialState?: Record<string, unknown>

        The commit log's fold base — see RuntimeSnapshot.initialState.

      • Optional ReadonlylogAddress?: LogAddress
      • Optional ReadonlyreadSources?: EngineReadSources
      • Optionalrecorders?: { data: unknown; id: string; name: string }[]
      • runId: string
      • sharedState: Record<string, unknown>
      • OptionalsubflowResults?: Record<string, unknown>

        Dual-keyed by subflow path (last iteration) AND per-execution mount runtimeStageId (each iteration) — see RuntimeSnapshot.subflowResults / subflow-commit-visibility.