Documentation

The Four-Layer Hierarchy

Every workflow execution in BizFirst flows through four nested layers. Understanding what each layer owns makes the entire engine predictable and debuggable.

flowchart TD T(["Trigger\nHTTP · Schedule · Webhook · Manual"]) P["PROCESS\nManages threads · Top-level state"] TH["THREAD\nDirected node graph · Owns ExecutionMemory"] EL["ELEMENT\nConfig resolution · Expression evaluation · Validation"] NE["NODE EXECUTOR\nBusiness logic — OnEntry → OnProcess → OnExit"] R(["ProcessExecutionResult"]) T --> P --> TH --> EL --> NE --> R style T fill:#162040,stroke:#6c8cff,color:#c8d8ff style P fill:#1e2640,stroke:#6c8cff,color:#e2e8f0 style TH fill:#221c3e,stroke:#a78bfa,color:#e2e8f0 style EL fill:#162d22,stroke:#34d399,color:#e2e8f0 style NE fill:#2d2616,stroke:#fbbf24,color:#e2e8f0 style R fill:#162d22,stroke:#34d399,color:#c8ffd8

1 · Process

The top-level container. Coordinates one or more threads. Manages top-level state and represents a complete business workflow from trigger to completion.

Read more →

2 · Thread

A sequential execution path within a process. Contains an ordered graph of nodes. Owns the ExecutionMemory that flows between nodes.

Read more →

3 · Element

A single node instance in the thread. Responsible for config resolution, expression evaluation (Tier 1 & 2), validation, and dispatching to the executor.

Read more →

4 · Node Executor

The business logic. Runs through a structured 8-stage lifecycle: Entry → Validate → Guard → PreProcess → Process → PostProcess → Guard → Exit.

Read more →

Key Concepts Before You Start

Execution Context Objects

Every layer carries a typed execution context object that accumulates state as execution progresses.

LayerContext TypeWhat It Carries
ProcessProcessExecutionContextExecutorID, state, timing, accumulated thread outputs
ThreadProcessThreadExecutionContextExecutionMemory, node counts, stack state
ElementProcessElementExecutionContextElementDefinition, ResolvedConfig, InputData, OutputData, ConnectorData
NodeNodeExecutionContextElementExecutionContext (reference), RuntimeInfo, result

The Execution Stack

The thread execution loop is stack-based, not recursive. When a node completes, its downstream nodes (determined by the output port key) are pushed onto the stack. The loop pops and executes until the stack is empty. This design enables:

Execution Memory

The thread's ExecutionMemory is the shared data store that all nodes in a thread read from and write to. It contains:

Where to start Read the pages in order — Process → Thread → Element → Node — to build a complete mental model from the outside in. Each page links to the next.