Model a decision with DMN
Separate policy rules from the process that uses their result.
Make every boundary intentional
| Amount | Illustrative decision |
|---|---|
| Less than 1,000 | Standard review |
| 1,000 or more | Enhanced review |
This example partitions the boundary at 1,000 without leaving a gap. Test just below, at and above every threshold; also test missing and incorrectly typed input.
What evaluation returns
Priostack evaluates a decision table and returns the outputs of the first rule that matches, whatever hit policy the table declares, and every output comes back as a string. Write tables whose rules do not overlap, or order them so the first match is the one you want (the FIRST policy), and convert numbers in the caller.
Deploy and evaluate
Deploy a DMN model with POST /api/v1/models: a raw XML body, JSON {"resourceName", "xml"} or multipart text fields. It costs 1 credit, refunded if the deploy fails. The process-definitions route deploys BPMN only and answers 422 for DMN.
Evaluate with POST /api/v1/decisions/{decisionId}/evaluate and a flat JSON object of inputs. The answer is {"result": {...}} and costs 1 credit; an unknown decision answers 422.
Version the policy with its callers
Record the decision identifier, expected input types and output shape alongside the process that calls it. When changing a decision table, replay representative cases and compare results.