# Holiday entitlement (DMN) Entitlement calculations are exactly the sort of rule that lives in a policy document and gets applied inconsistently. A table fixes that. --- ## What this example shows * Service length as a numeric range. * A contract type input constraining which rules apply. * An output in days, pro-rated in the annotation. --- ## Columns | **Column** | **Type and meaning** | | ------------------------- | ------------------------------- | | Years of service (input) | number: complete years | | Contract (input) | string: permanent or fixed-term | | Entitlement days (output) | number: annual entitlement | --- ## The decision table Hit policy: **U (Unique)**. Cells are FEEL expressions, so a range, a list or a negation is a legal value; a dash means the input is irrelevant to that rule. | **Years** | **Contract** | **Days** | **Annotation** | | --------- | ------------ | -------- | ----------------------------------- | | < 1 | "permanent" | 25 | Pro-rated from start date | | \[1..3) | "permanent" | 25 | | | \[3..5) | "permanent" | 27 | | | \[5..10) | "permanent" | 29 | | | \>= 10 | "permanent" | 32 | Capped at 32 | | \- | "fixed-term" | 25 | Always pro-rated by contract length | --- ## Making it your own * Pro-rating belongs in a literal expression, not in this table. Keep the two separate. * Add a part-time input if entitlement scales with hours. * Note the statutory minimum somewhere; the table should never fall below it. --- ## Related [Insurance risk score (DMN)Collect, because every matching rule contributes.](https://help.gocapable.com/diagrams/insurance-risk-score-dmn.html) [Access level by role (DMN)Roles to permissions, with a Priority hit policy.](https://help.gocapable.com/diagrams/access-level-by-role-dmn.html) [DMN examplesBack to the rest of these examples.](https://help.gocapable.com/diagrams/dmn-examples.html) --- _The hit policy is the whole decision._