JDM (JSON Decision Model) is the file format used by GoRules to represent decision graphs. It’s a human-readable JSON structure that captures nodes, edges, and configuration in a portable format.Documentation Index
Fetch the complete documentation index at: https://docs.gorules.io/llms.txt
Use this file to discover all available pages before exploring further.
Why JDM?
| Benefit | Description |
|---|---|
| Portable | Works across all GoRules SDKs and tools |
| Version controllable | Store in Git alongside your code |
| Human readable | Review and diff changes easily |
| Extensible | Add custom metadata without breaking compatibility |
File structure
A JDM file contains three main sections:Nodes
Each node represents a processing step in the decision:Edges
Edges define connections between nodes:Metadata
Optional metadata about the decision:Loading JDM files
Load and evaluate JDM files using any GoRules SDK:Validating structure
The@gorules/jdm-editor package exports a Zod schema for validating JDM files:
Version control best practices
File organization
rules
pricing
customer-discount.json
volume-discount.json
eligibility
loan-qualification.json
README.md
Meaningful commits
Review diffs
JDM’s JSON format makes diffs readable:Exporting from BRMS
The GoRules BRMS exports decisions in JDM format:- Open the decision in BRMS
- Click Export in the toolbar
- Choose JSON Decision Model (.json)
- Save to your repository