Skip to main content

Router node

Decision

The Router node routes each input row to one of N output ports based on rule matches. Think of it as a multi-way switch over the row content: for each row, the runtime picks the first matching route and emits the row there.

When to use

  • The row's downstream fate depends on a categorical value (event_type, severity, region) and you want distinct branches per value.
  • You want more than two branches — otherwise use Branch's two-way split.
  • The rules are declarative and static; for dynamic routing, use Loop + Filter combinations instead.

Ports

PortDirectionKindNotes
inindataRows to route.
<routeId>outdataOne dynamic output port per configured route.
defaultoutdataRows that matched no route (when the default route is enabled).
erroroutcontrolFires when a rule expression throws.
notifyoutcontrolNotification policy port.

Configuration

  • Routes. Ordered list of { id, label, rule }. Each rule is either a Filter-style rules group (structured) or a raw expression.
  • Show route labels. When on, the canvas prints the route label next to each output port so the graph is self-documenting.
  • Fall-through mode.
    • first-match (default) — the row is emitted on the first matching route.
    • every-match — the row is emitted on every matching route. Rare; useful for auditing branches.
  • Default route. When enabled, unmatched rows fire on the default port; when disabled, unmatched rows are silently dropped.

Configure Action walkthrough

  1. Add a route with the + button. Each route has a name, a label, and a rule.
  2. Configure each rule with the same Filter Rules / Expression toggle Filter uses.
  3. Toggle Show route labels for a self-documenting canvas.

Runtime behaviour

  • For each row, rules are evaluated in configuration order until the first match (or all matches in every-match mode). Falls through to default if enabled, else dropped.
  • Rule expressions run via evalTransformExpr.

Failure modes

  • Rule error on a row. Row routes to error; the run continues.