DMN AnalyticsΒΆ
Champa Intelligence provides powerful analytics for your Decision Model and Notation (DMN) tables, transforming them from black boxes into transparent, analyzable assets. This feature helps you understand how your business rules are being executed in the real world.
ΒΆ
OverviewΒΆ
DMN Analytics provides real-time visualization of how your business rules execute in production. Color-coded heatmaps show which rules fire most frequently, helping optimize decision logic and identify unused rules.
Key FeaturesΒΆ
- π¨ Interactive Heatmaps - Color-coded rule execution frequency
- π Hit Statistics - Detailed execution metrics per rule
- πΊοΈ DRD Support - Decision Requirements Diagram visualization
- π Multi-Table Navigation - Switch between related decision tables
- π Performance Insights - Identify hot paths and dead rules
How It WorksΒΆ
Data CollectionΒΆ
graph LR
A[DMN Execution] --> B[Camunda Engine]
B --> C[Historic Decision Instance]
C --> D[DMN Analytics]
D --> E[Heatmap Visualization] Process:
- DMN tables execute during process instances
- Camunda logs each decision evaluation
- Analytics aggregate rule hits by decision key + version
- Heatmap overlays execution frequency on visual table
Color Coding: - π’ Green β Low frequency (cool) - π‘ Yellow β Medium frequency (warm) - π΄ Red β High frequency (hot)
Quick StartΒΆ
Step 1: Select DMNΒΆ
Navigate to /dmn-analytics
Select from dropdown:
DMN Types:
- (DRD) - Decision Requirements Diagram (multiple tables)
- (DMN in DRD) - Individual decision in a diagram
- Standalone - Single decision table
Step 2: Load & AnalyzeΒΆ
Click "Load & Analyze" button
Loading process:
- Fetches DMN XML from database
- Migrates to DMN 1.3 if needed (from 1.1 or 1.2)
- Loads execution statistics
- Renders diagram
- Applies heatmap overlay
Step 3: View ResultsΒΆ
Decision Table View:
- Color-coded rows by hit frequency
- Hit count badges on rules
- Statistics panel (right side)
- Scroll to see full table
DRD View:
- Visual decision diagram
- Summary statistics per table
- Click table to drill down
Interface GuideΒΆ
Main LayoutΒΆ
βββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββ
β β β
β DMN Canvas β Statistics β
β (Decision Table or DRD) β Panel β
β β β
β β β
βββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββ
ControlsΒΆ
Top Right Corner:
- π Toggle statistics panel (expand/collapse)
Zoom Controls (right side):
- π+ Zoom in
- π- Zoom out
- βΆ Fit viewport (DRD only)
Keyboard/Mouse:
- Scroll: Vertical/horizontal navigation
- Drag (DRD): Pan diagram
- Click decision (DRD): Open table
Statistics PanelΒΆ
For Decision Tables:
Summary Cards:
βββββββββββββββ¬ββββββββββββββ¬ββββββββββββββ¬ββββββββββββββ
β Total Hits β Avg/Rule β Max Hits β Min Hits β
β 12,450 β 498.0 β 2,834 β 0 β
βββββββββββββββ΄ββββββββββββββ΄ββββββββββββββ΄ββββββββββββββ
Rule Details Table:
| Rule Order | Rule ID | Hit Count | % of Total | Visual |
|---|---|---|---|---|
| 1 | rule_premium_15 | 2,834 | 22.8% | ββββββββ |
| 2 | rule_standard_10 | 1,456 | 11.7% | ββββ |
For DRD:
Shows summary for each decision table:
ββββββββββββββββββββββββββββββββββββ
β determine-discount β
β Rules: 5 β
β Total Hits: 12,450 β
β Avg Hits/Rule: 2,490.0 β
ββββββββββββββββββββββββββββββββββββ
Understanding HeatmapsΒΆ
Color InterpretationΒΆ
Gradient Scale:
Green ββββββΊ Yellow ββββββΊ Orange ββββββΊ Red
(Low) (Medium) (High) (Very High)
What Heatmaps RevealΒΆ
Hot Rules (Red/Orange):
- Most frequently executed
- Business rule workhorses
- Prime optimization targets
- Highest testing priority
Cold Rules (Green):
- Rarely executed
- Edge case handlers
- Potential dead code
- May need review
Zero Hits (White/No Color):
- Never executed
- Possible issues:
- Unreachable conditions
- Redundant logic
- Misconfigured expressions
- Missing test coverage
Use CasesΒΆ
Rule OptimizationΒΆ
Scenario: Optimize performance-critical decisions
- Load DMN with heatmap
- Identify hottest rules (red)
- Review rule logic
- Optimize:
- Simplify complex expressions
- Cache expensive calculations
- Reorder rules (check fast conditions first)
- Split into multiple decisions
Example:
Rule 3: 45% of hits, complex calculation
β Extract calculation to process variable
β Use simpler condition in DMN
β Performance improved 3x
Dead Rule DetectionΒΆ
Scenario: Clean up unused business logic
- Load production DMN
- Filter rules with 0 hits
- Investigate why:
- Overlapping conditions?
- Impossible to reach?
- Legacy from old requirements?
- Options:
- Remove if truly dead
- Add test cases if valid edge case
- Fix conditions if bug
Business InsightsΒΆ
Scenario: Understand decision outcomes
Example - Loan Approval:
Rule 1 (Approved): 35% of decisions
Rule 2 (Manual Review): 52% of decisions
Rule 3 (Rejected): 13% of decisions
Insights:
- Most loans go to manual review
- Opportunity to automate more approvals
- Rejection rate acceptable
- Focus on reducing manual review bottleneck
Testing & ValidationΒΆ
Scenario: Ensure comprehensive test coverage
Before deployment:
- Run test suite
- Load DMN analytics
- Check rule coverage
- Add tests for unexecuted rules
Multi-Table DMNΒΆ
DRD NavigationΒΆ
Decision Requirements Diagram shows relationships between decisions.
Example:
βββββββββββββββββββ
β Calculate Price β
ββββββββββ¬βββββββββ
β uses
ββββββΌββββββ ββββββββββββββββ
β Discount ββββββββ Customer Tierβ
ββββββββββββ ββββββββββββββββ
Navigation:
- DRD view shows all decisions
- Click decision node β Opens that table
- View statistics for specific table
- Navigate between tables using panel buttons
Table SwitchingΒΆ
When multiple tables exist:
Top of statistics panel shows:
βββββββββββββββββββββββββββββββββββββββββββ
β Available Decision Tables: β
β β
β [Discount Rules] [Customer Tier] [VAT] β
βββββββββββββββββββββββββββββββββββββββββββ
- Blue button = Currently active
- Gray buttons = Available tables
- Click to switch instantly
Best PracticesΒΆ
Performance MonitoringΒΆ
Regular Reviews:
Weekly: Check hot rules for optimization opportunities
Monthly: Audit dead rules and update test coverage
Quarterly: Analyze decision distribution trends
Rule MaintenanceΒΆ
Workflow:
- Deploy new DMN version
- Run smoke tests
- Check heatmap after 24 hours
- Verify expected rule distribution
- Investigate anomalies
Testing StrategyΒΆ
Coverage goals:
Production Critical: 100% rule coverage
Standard Business Rules: 90% coverage
Edge Cases: 70% coverage
Use heatmap to:
- Identify untested rules
- Focus testing on hot paths
- Validate rare conditions fire correctly
Next StepsΒΆ
- AI Analysis - AI insights on DMN execution patterns
- Process Intelligence - How DMN fits in process flow