Nodes & Edges
What Is a Node?
A node is a single processing unit in a workflow. Each node has:
- A type (e.g.
schedule_node,http_request,if_node) - A configuration — a JSON object specific to the node type
- One or more input handles (where data flows in)
- One or more output handles (where data flows out)
- A position on the canvas
Nodes are stored in the voodflow_nodes table.
What Is an Edge?
An edge is a directed connection between two nodes. It specifies:
source— the source node UUIDsource_handle— which output handle to use (e.g.output,true,false,case_1)target— the target node UUIDtarget_handle— which input handle on the target (typicallyinput)
Edges are stored in the voodflow_edges table.
Node Anatomy
class MyNode extends AbstractNode
{
// Unique string identifier — used in DB and exports
public static function type(): string { return 'my_node'; }
// Human-readable name — shown in the node selector
public static function name(): string { return 'My Node'; }
// UI metadata: icon, color, group, description
public static function metadata(): array { ... }
// Default values for the config JSON
public static function defaultConfig(): array { ... }
// Filament form definition for the node's config panel
public static function definition(): array { ... }
// The actual execution logic
public function execute(ExecutionContext $context): ExecutionResult { ... }
}Handle Types
| Handle Type | Description |
|---|---|
input | Standard single input (most nodes) |
output | Standard single output (most nodes) |
true / false | If node conditional outputs |
case_{n} | Switch node dynamic case outputs |
default | Switch node fallback output |
success / error | Catch node outputs |
item | For Each node per-iteration output |
Data Flow Between Nodes
When node A completes and produces ExecutionResult::success(['key' => 'value']), the engine:
- Saves the output to
voodflow_execution_nodes.output - Finds all edges where
source = A.id - For each edge, calls
NodeB::execute($context)where$context->input = ['key' => 'value']
The data flows sequentially — each node receives the complete output of its predecessor as its input.
Multiple Outputs
Some nodes have multiple output handles (If, Switch, ForEach). The engine follows all paths that should be activated based on the node's execution result. For If/Switch, only the branch matching the condition is followed.
Terminal Nodes
Terminal nodes have no output handles. They end the execution path. Examples:
- HTTP Response — sends an HTTP response and terminates the webhook handler path
- Any node without outgoing edges
The AbstractNode Base Class
AbstractNode implements NodeInterface and provides helpers:
// Read a config value with a default
$value = $this->getConfig($context, 'field_name', 'default');
// Get the node's full configuration array
$config = $context->config;
// Access previous node's output
$input = $context->input;
// Set a workflow-level variable
$context->setVar('my_key', 'my_value');
// Read a workflow-level variable
$value = $context->getVar('my_key');