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