Portal Community

What Edges Do

An edge between two nodes serves two purposes simultaneously:

Port Visual Language

Ports are the connection points on nodes. They are rendered as small squares on the node boundary:

Port TypeVisualMeaning
Main (data) Blue squarePrimary data flow — the happy path
Error Red squareException routing — node threw an error
Control Grey squareNamed output ports (e.g., "true", "false", "approved")
Input (target)Left / top side of nodeReceives data from upstream
Output (source)Right / bottom side of nodeSends data downstream

WorkflowConnection Model

Connections are stored in workflowStore.edges as WorkflowConnection objects:

interface WorkflowConnection {
  id: string;
  source: string;          // source node ID
  sourceHandle: string;    // source port key (e.g., "output", "true", "error")
  target: string;          // target node ID
  targetHandle: string;    // target port key (e.g., "input")
  data?: {
    condition?: string;    // JavaScript expression (optional)
    label?: string;        // display label
    priority?: number;     // evaluation order (1 = first)
  };
  type: 'custom' | 'smart'; // edge rendering type
}