@smarthorizon-labs/dmn-runtime
v0.1.0
Published
DMN decision graph compilation and evaluation: decision tables, all seven hit policies, and an audit trace
Maintainers
Readme
@smarthorizon-labs/dmn-runtime
Decision graph compilation and evaluation for DMN: all seven hit policies,
COLLECT aggregations, business knowledge models, decision services with real
encapsulation, and execution tracing with a redaction policy.
Most users want @smarthorizon-labs/dmn
instead, which bundles this with the XML loader and the FEEL engine.
Early release (0.x). Usable for decision models that stay inside the documented feature set. See what works today for the exact boundary, and the TCK report for measured conformance.
Install
npm install @smarthorizon-labs/dmn-runtimeUsage
import { compileModel, evaluateModel } from '@smarthorizon-labs/dmn-runtime';
import { loadDmnXml } from '@smarthorizon-labs/dmn-xml';
const compiled = compileModel(loadDmnXml(xml));
const result = evaluateModel(compiled, inputs, {
// Traces record which decisions ran and which rules matched.
// They carry no values unless you opt in.
trace: { level: 'RULES', correlationId: 'case-84731' },
});Part of a set
| Package | Use it for |
|---|---|
| @smarthorizon-labs/dmn | Start here. Everything below, one install |
| @smarthorizon-labs/dmn-runtime | Decision graph, decision tables, tracing |
| @smarthorizon-labs/dmn-feel | FEEL parsing and evaluation |
| @smarthorizon-labs/dmn-xml | Secure DMN XML loading |
| @smarthorizon-labs/dmn-model | Normalized model types |
Full documentation, TCK results and design rationale are in the repository README.
License
Apache-2.0. Third-party attributions are in NOTICE.
