Decision tables
Decide by rules inside a process — a DMN 1.3 decision table, versioned with the process, evaluated by a decision step, branched on by a gateway, with the matched rule in the trace and the audit chain.
Some choices in a process are rules, not judgement: refunds under 500 go through on their own, larger ones go to a manager; a gold customer gets the fast lane. A decision table writes those rules down as rows. A decision step evaluates the table on the run's state, writes its outputs, and a gateway branches on them.
A table is part of the process version. It is saved with the graph, it is in the diff a publisher reads, it is in the hash a run pins, and a run that parked on version 1 keeps deciding with version 1's table after version 2 changes it.
Build a table
On the Processes screen, open a process, click Edit, then Decision tables.
- Type a table id (
refund_route) and click Add table. - For each input: a label, the path in run state it reads (
amount,customer.tier,decision.score.band), and its type —string,number,booleanordate. - For each output: its id (the name later steps and gateways read) and its type.
- Add rules. Each rule has one entry per input (the condition) and one per output (the value it gives).
- Pick the hit policy, and whether a default applies when no rule matches.
- Try it: fill in sample inputs under Test this table and click Test — it runs the same evaluator as a run and names the rule that matched.
- Save version. A cell the server refuses is marked in red with the reason as you type; a
version with a broken table is refused at save (
422), nothing stored.
Then add a decision step on the graph (Add decision), pick its table in the inspector,
and add an exclusive gateway after it whose Branch on is the output, e.g.
decision.route.route. Label each connection out of the gateway with the value it is for
(double-click a connection to label it).
Conditions: FEEL-lite
An input entry is a unary test in a small subset of FEEL, the DMN expression language:
| Entry | Matches |
|---|---|
- (or empty) | any value, including no value |
"gold", 500, true, date("2026-01-31"), null | that value |
< 500, <= 500, > 10, >= date("2026-01-01") | a comparison (numbers and dates) |
[100..500], (100..500], ]100..500[, [100..500) | a range; [ ] include the end, ( ) or an outward ] [ exclude it |
"gold","silver" or < 0, > 100 | any of the tests in the list |
not("gold","silver") | none of them |
An output entry is one literal. Strings are in double quotes (\" for a quote inside).
Comparisons and ranges work on numbers and dates only; a string or boolean column takes values
and lists. Names, arithmetic and function calls are not supported — an entry that uses them is
refused, so the table never does something its author did not write.
When the path is missing from run state the input is null: only - and null match it,
not("gold") matches it (null is not "gold"), and comparisons do not. A value of the wrong type
(the text "lots" in a number column) fails the step with the reason. Numeric text ("450")
counts as a number, "true"/"false" as a boolean, an ISO timestamp as its day.
Hit policies
| Policy | Result |
|---|---|
UNIQUE (default) | Exactly one rule may match. Two matching fails the step and names both rules. |
FIRST | The first matching rule, top to bottom. Rule order matters (and the diff shows a move). |
PRIORITY | The matching rule whose first output comes earliest in that output's values list (its priority order). |
COLLECT | Every matching rule, in order: each output becomes a list. With SUM, MIN, MAX or COUNT (one output), the aggregate. |
No rule matches: with a default, its outputs apply (an output without a default is null) and the trace says default; without one, the step fails.
A step that fails ends the run with status failed at that step: the trace and the
run_started entry carry the reason (no_match, multiple_matches, type_error,
unknown_table). Nothing after it runs, and there is no fallback. Fix the table, publish a new
version and start the case again.
What a run records
A decision step writes each output to run state as decision.<step id>.<output id> — later
decision tables, gateways and steps read it there. The trace event (kind: "decision") carries
decision_result: the table, the hit policy, the inputs as read, the matched rules
([{rule: 2, id: "large"}]), the outputs and whether the default applied. The Runs screen shows
it on the step: Matched rule 2 (large), the inputs and the outputs.
The audit chain records which rules a drive matched: run_started (and gate_signed, for a
decision the resumed drive made for the first time) carry
decisions: [{step, visit, table, matched: [2], outputs}], or the error for one that failed. On the durable
Temporal runtime the run_started entry is written before the first drive, so there the trace
is the record of the decision.
A gateway with Branch on takes the connection whose label equals the value (ignoring
case; true/false and numbers by their text), else a connection labelled else,
otherwise or default. No match fails the run — a gateway never guesses.
Versions, publishing and tests
- Diff. The Versions panel lists each table added, removed or changed — the hit policy, columns and default, and every rule added, removed, changed or moved (by rule id).
- Publish. A version whose decision step names a table that does not exist, or whose gateway branches on an output the table does not have, is not runnable: it cannot be submitted or published.
- Pinning and replay. A resume re-walks the run on the graph it pinned and re-decides with that graph's tables — the same state gives the same answer.
- Test suites. A test case asserts on a decision step like
any step:
{"step": "route", "path": "$.outputs.route", "equals": "manual"},$.matched[0].rule, or$.errorwithexpect.status: "failed".
DMN 1.3 import and export
Export DMN (on the Decision tables pane, or GET /process-templates/drafts/{slug}/dmn?version=&table=)
writes the saved version's tables as one DMN 1.3 document: inputs with typeRef, outputs with
outputValues (priority order) and defaultOutputEntry, rules with their entries and
description. Camunda, Trisotech and Signavio open it; importing it gives back the same tables.
Import DMN reads the decision tables of a DMN 1.1–1.3 file into the editor
(POST /process-templates/decisions/import-dmn; with save and slug, straight into the next
version of a process). integer, long and double columns become number. The diagram
(DMNDI) is layout and is ignored. Anything else outside the subset refuses the whole file
with 422 and the list of what it found — other hit policies (ANY, RULE ORDER,
OUTPUT ORDER), decisions that require other decisions or knowledge, literal-expression
decisions, business knowledge models, input data, inputValues, annotation columns, types
other than the four, and FEEL beyond the table above. A table is never imported with something
silently dropped.
BPMN. A decision step exports as a businessRuleTask with minctrl:decisionRef; importing a
Camunda businessRuleTask keeps its camunda:decisionRef. The table itself travels as DMN.
API
| Call | What it does |
|---|---|
POST /process-templates with decisions: [...] | Saves the tables with the graph (the one save door). |
POST /process-templates/validate with decisions | Live checks of the graph and its tables. |
POST /process-templates/decisions/validate | Errors per cell: {table, rule, column, message}. |
POST /process-templates/decisions/evaluate | Decide one table for sample inputs; 422 {error, message} when it cannot. |
GET /process-templates/drafts/{slug}/dmn | DMN 1.3 export. |
POST /process-templates/decisions/import-dmn | DMN import; 422 {unsupported: [...]} outside the subset. |
Limits: 50 tables per process, 20 inputs and 20 outputs per table, 500 rules, 500 characters per entry, a 2 MB DMN file with no DOCTYPE.
Document extraction
Attach PDFs, images and emails to a run, let Claude fill a schema you declare — every field with a confidence and the page it was read from — and have a person review the uncertain fields at a gate, side by side with the document, before any step uses them.
Process mining
Import what really happened — a CSV or XES event log, or your own run history — and see the process map with its variants, times and bottlenecks, compare it with a published version, and turn it into a draft.