A Business Rules project holds one DMN decision table. DMN and FEEL follow the OMG standard; this skill covers only what UiPath accepts on top of it.
When to Use This Skill
- Create a business rule (decision table) from a policy, spreadsheet, or description
- Edit the rows, columns, or hit policy of a
.dmnin a BusinessRules project - Validate or debug a rule that returns the wrong output
- List deployed rules or read a deployed rule's inputs and outputs
Critical Rules
- Write DMN 1.5. Use the MODEL and DMNDI namespaces
https://www.omg.org/spec/DMN/20230324/...and DC/DIhttp://www.omg.org/spec/DMN/20180521/.... When editing a file on an older DMN version, rewrite it to these namespaces. - One
.dmnper project.rules debugevaluates only the project's first.dmn. - One decision per file, and its logic is a decision table. When the user asks for chained decisions, a decision requirements diagram, business knowledge models, or a literal expression, say authoring them is not supported yet, then offer to flatten the logic into one table or to create one rules project per decision and let the calling process chain them. Never write the unsupported element.
- No DOCTYPE, XML comments, or processing instructions. Put notes in the annotation column or a
<description>element. - Use the designer's types.
string,number,boolean,Any,date,time,date and time,dayTimeDuration,yearMonthDuration, for both columns and input arguments.
- Scaffold a new project with
init; after every edit,refreshthenvalidate. An existing project needs noinit: edit its.dmnand runrefresh. Fix whatvalidatereports. Never hand-write or deleteproject.uiproj,entry-points.json, orbindings_v2.json; edit the scaffolded.dmnin place, keeping its root element. - A rule is done when
validatepasses anddebugreturns what the reviewed table expects. On a wrong output, read the trace withuip traces spans get <Data.traceId>. Stop after 3 fix rounds and show the user the table and the failing inputs.
- Stop on a tenant without Business Rules, and publish through
uip solution. Whenrules debugfails withBusiness Rules is not enabled on tenant '<TENANT>'., stop and relay the CLI's instruction. Pack, publish, and deploy belong to the uipath-solution skill. - Name every rule. Give each
<rule>an<annotationEntry>with a short name for the case it covers; the review table's Annotation column is what goes there.
Quick Start
1. Scaffold (new projects only)
uip rules init <RULE_NAME> --output json
Run init from the solution folder when one exists; outside a solution it creates <RULE_NAME>Solution/<RULE_NAME>/. Data.RuleStatus: "Preserved" means the project already held a .dmn and init left it untouched. The rule is the one .dmn file in the project folder.
2. Design and review
Show the table as Markdown before authoring and after each change. Ask only what the request leaves open, in one question; ask nothing when told not to pause.
**Hit policy:** FIRST
| # | creditScore (number) | income (number) | riskBand (string) | Annotation |
|---|---|---|---|---|
| 1 | < 580 | - | "High" | Subprime |
| 2 | [580..700) | >= 50000 | "Medium" | Near-prime, sufficient income |
| 3 | - | - | "Low" | Default |
3. Author the table
Replace the scaffolded table with the reviewed design.
4. Refresh and validate
uip rules refresh <PROJECT_DIR> --output json
uip rules validate <PROJECT_DIR> --output json
Fix every error in Data.Diagnostics, then run both again.
5. Verify
uip rules debug <PROJECT_DIR> --inputs '<INPUTS_JSON>' --output json
--inputs takes one JSON object keyed by input-argument name, or @<FILE>. Compare Data.result.decisions[].outputs with the expected values. The run failed when debug exits 1 (Result: Failure); the decision and input errors are in Data.result, the summary code in Data.error. On a mismatch, read the trace:
uip traces spans get <TRACE_ID> --output json
<TRACE_ID> is Data.traceId. The trace shows which rules fired. Data.traceId is present only when tracing is on for the tenant (the default); without it, compare the inputs against each row by hand. rules debug needs the project directly inside its solution folder, as init creates it, and a logged-in user (uip login). debug uploads the whole solution folder and overwrites its Studio Web solution; pull Studio Web edits first.
Editing an Existing Rule
- Keep the decision's
idandnameand the.dmnfile name. Consumers bind to the entry point/<file>.dmn#<decisionId>, and renaming either points them at an entry point that no longer exists. - Change only what the request names; every other row keeps its entries, annotation, and position.
Deployed Rules (Preview)
uip rules list --folder-path <FOLDER_PATH> --output json
uip rules list --all-folders --output json
uip rules get <RULE_NAME> --folder-path <FOLDER_PATH> --output json
uip rules versions <RULE_NAME> --folder-path <FOLDER_PATH> --output json
uip rules describe <RULE_NAME> --folder-path <FOLDER_PATH> --output json
Each command takes --folder-path or --folder-key, never both. Exception: list --all-folders spans every folder you can see (mutually exclusive with the folder flags) — use it to locate a rule when its folder is unknown. describe returns the active version's entry points, with InputArguments and OutputArguments as JSON Schema strings. OutputArguments carrying "x-uipath-decision-keyed": true nests each output under its decision's name.
Binding a rule into a process, workflow, or case belongs to that artifact's skill.
Reference Navigation
| Reference | When to read |
|---|---|
| Failure Modes Guide | A uip rules command reports an error |
Anti-patterns
- Guessing an input value's JSON shape instead of reading the input argument's
typeRef - Naming an output with spaces or a leading digit;
validaterejects it