Skip to content

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.

DMN Analytics HeatmapΒΆ

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]
Hold "Alt" / "Option" to enable pan & zoom

Process:

  1. DMN tables execute during process instances
  2. Camunda logs each decision evaluation
  3. Analytics aggregate rule hits by decision key + version
  4. 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 Key: discount-calculation
Version: 3

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

  1. Load DMN with heatmap
  2. Identify hottest rules (red)
  3. Review rule logic
  4. Optimize:
  5. Simplify complex expressions
  6. Cache expensive calculations
  7. Reorder rules (check fast conditions first)
  8. 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

  1. Load production DMN
  2. Filter rules with 0 hits
  3. Investigate why:
  4. Overlapping conditions?
  5. Impossible to reach?
  6. Legacy from old requirements?
  7. Options:
  8. Remove if truly dead
  9. Add test cases if valid edge case
  10. 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:

  1. Run test suite
  2. Load DMN analytics
  3. Check rule coverage
  4. 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:

  1. DRD view shows all decisions
  2. Click decision node β†’ Opens that table
  3. View statistics for specific table
  4. 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:

  1. Deploy new DMN version
  2. Run smoke tests
  3. Check heatmap after 24 hours
  4. Verify expected rule distribution
  5. 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ΒΆ