Skip to main content
The decision graph is GoRules’ visual canvas for modeling business logic. You build decisions by placing nodes on the canvas and connecting them to define how data flows through your rules.

The canvas

When you create a new decision, you start with a blank canvas. Build your decision by adding nodes and connecting them. Data flows left to right through your graph:
  • Input node — Where data enters your decision (required)
  • Processing nodes — Decision tables, expressions, functions, switches
  • Output node — Optional; without one, results come from all endpoint nodes

Adding nodes

Drag nodes from the palette onto the canvas:
  1. Drag a node from node palette
  2. Drop it on the canvas
  3. Connect it to other nodes by dragging from output ports to input ports

Node types

NodePurposeUse when
Decision TableSpreadsheet-style conditional logicYou have multiple rules with conditions and outcomes
ExpressionTransform and calculate dataYou need to compute values or reshape data
FunctionCustom JavaScript logicYou need complex calculations or external calls
SwitchRoute data to different pathsDifferent inputs need different processing

Switch node

Use switch nodes to control the flow of your decision graph. Each branch has a condition — data flows down the first branch that matches. First hit (default) — Executes only the first matching branch: Collect — Executes all matching branches and combines results:

Connecting nodes

Click and drag from a node’s output port (right side) to another node’s input port (left side). The connection shows data flow direction. Nodes can have multiple incoming connections — data from all sources merges before processing. Nodes can also have multiple outgoing connections — the same output goes to all connected nodes.

How data merges

When multiple nodes connect to a single node, their outputs are merged into one object. Later connections overwrite earlier ones if they have the same field names.
[Discounts] outputs: { discount: 0.15, reason: "loyalty" }
[Shipping] outputs: { shipping: 9.99, method: "standard" }
         ↓ both connect to ↓
[Calculate Total] receives: { discount: 0.15, reason: "loyalty", shipping: 9.99, method: "standard" }
If you need to avoid conflicts, use unique field names or outputPath to namespace each node’s output (see Patterns).

Data flow

When you evaluate a decision:
  1. Input data enters through the Input node
  2. Each connected node processes the data in sequence
  3. Results pass through connections to downstream nodes
  4. Results return from all endpoint nodes (or the Output node if you have one)
The highlighted Calculate Total node receives data from both the original input and the discount table’s output. If a node has multiple inputs, data from all sources is merged.

Organizing your graph

For complex decisions:
  • Arrange left to right — Keep the flow direction consistent
  • Group related logic — Place similar operations near each other
  • Use meaningful names — Click on node’s name to rename it

Keyboard shortcuts

ShortcutAction
DeleteRemove selected node
Cmd/Ctrl + CCopy selected
Cmd/Ctrl + VPaste