Evaluate decision table
Find the rules of a decision table that match the inputs and return what they give.
Command in the Business rules toolkit · id ooa.rules/evaluate_decision_table · 6 inputs (1 required), 4 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| File | File | No | A CSV file with a header row of in:NAME, out:NAME and rule columns. | |
| Table | Table | No | The decision table as a table value, with the same columns. | |
| Inputs | Dictionary | Yes | The values the in: columns test, by name. | |
| Hit policy | String | No | first | When several rules match. |
| Default outputs | Dictionary | No | What to give when no rule matches. | |
| Fail when none | Boolean | No | false | Fail the step when no rule matches. |
Outputs
| Output | Type | What it is |
|---|---|---|
| outputs | Dictionary | The out: values of the matching rule (first and unique); the first rule's for collect. |
| matched | Boolean | True when a rule matched. |
| rule | String | The matching rule's name (its rule column, else its row number). |
| all | List | With collect: the outputs of every matching rule, in order. |