Skip to content
DMN templates

DMN — Holiday Entitlement (the DMN specification's own example)

The example the DMN specification itself uses to introduce COLLECT with a maximum: base entitlement plus separate age and service allowances, where the answer is the largest matching rule rather than the sum. Complete over both declared domains.

Template previewDMN
Holiday entitlementEmployee recordHoliday daysinformation requirementHoliday days — Collect (max)C>Age[16..70]Service[0..50]Days[22..30]AnnotationR1[16..70][0..50]22base entitlement, always appliesR2[16..70][30..50]30R3[60..70][0..50]25R4[16..17][0..50]25R5[16..70][15..50]27R6[45..70][15..50]29No overlaps and no gaps over the declared input space · 1 decision · 1 input data · 1 table · 6 rules13 rule pairs overlap, which Collect resolves by design.

Make it your own.

title "Holiday entitlement"

input    Employee "Employee record"
decision Days     "Holiday days"

Employee -> Days

decision Days "Holiday days" {
  hit C>
  input  Age     number [16..70]
  input  Service number [0..50]
  output Days    number [22..30]

  rule [16..70] | [0..50]  -> 22   // base entitlement, always applies
  rule [16..70] | [30..50] -> 30
  rule [60..70] | [0..50]  -> 25
  rule [16..17] | [0..50]  -> 25
  rule [16..70] | [15..50] -> 27
  rule [45..70] | [15..50] -> 29
}