Skip to content

Building blocks

Decision tables

Ordered, typed business rules that return consistent outputs to workflows, applications and AI clients.

Last updated 1 min read Edit this page on GitHub
On this page

A decision table turns business policy into data that analysts can read and change without touching workflows. It has typed inputs, typed outputs and an ordered list of rules. The first enabled rule whose conditions all match wins and returns its outputs.

The decision table editor
An approval policy: amount and vendor risk in, approver level and auto-approve out.

Inputs and outputs#

Fields have a key, a label and a type: text, number, boolean or date. Values are converted to the input's type before rules are compared.

Conditions#

Each rule has conditions on inputs with one of these operators: equals, not_equals, contains, not_contains, starts_with, ends_with, greater_than, greater_than_or_equal, less_than, less_than_or_equal, is_empty, is_not_empty. A rule with no conditions always matches — put it last as the default.

#amountrisk→ approverauto_approve
1less than 1 000equals lownonetrue
2less than 10 000managerfalse
3less than 50 000directorfalse
4(any)cfofalse

Using a decision table#

  • Workflows — the Decision Table node maps variables to inputs and sets matched, rule_label and each output. Tables are read once per run, so evaluating one inside a loop is cheap.
  • Test — try inputs in the editor, or usertasks decision-tables test <id> --set values:='{"amount":4200,"risk":"low"}'.
  • API / MCP — POST /api/v1/decision-tables/{id}/test, decision_tables_* tools.
  • Move between workspaces — decision-tables export / import, or config as code.

Evaluations are recorded (report source business_rule_executions), so you can report on which rules fire.

Was this page helpful?