{"record":{"id":"1d9428ce1029ab2a","repo":"flowable/flowable-engine","slug":"decision-table-does-not-contain-a-hit-policy","errorCode":null,"errorMessage":"decision table does not contain a hit policy","messagePattern":"decision table does not contain a hit policy","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/audit/DecisionExecutionAuditUtil.java","lineNumber":58,"sourceCode":"        \n        DmnEngineConfiguration dmnEngineConfiguration = CommandContextUtil.getDmnEngineConfiguration();\n\n        return new DecisionServiceExecutionAuditContainer(decisionService.getId(), decisionService.getName(), executeDecisionInfo.getDecisionVersion(),\n                dmnEngineConfiguration.isStrictMode(), executeDecisionInfo.getVariables(), dmnEngineConfiguration.getClock().getCurrentTime());\n    }\n\n    public static DecisionExecutionAuditContainer initializeDecisionExecutionAudit(Decision decision, ExecuteDecisionContext executeDecisionInfo) {\n\n        if (decision == null || decision.getId() == null) {\n            LOGGER.error(\"decision does not contain key\");\n            throw new IllegalArgumentException(\"decision does not contain decision key\");\n        }\n\n        DecisionTable decisionTable = (DecisionTable) decision.getExpression();\n\n        if (decisionTable.getHitPolicy() == null) {\n            LOGGER.error(\"decision table does not contain a hit policy\");\n            throw new IllegalArgumentException(\"decision table does not contain a hit policy\");\n        }\n        \n        Clock clock = CommandContextUtil.getDmnEngineConfiguration().getClock();\n\n        return new DecisionExecutionAuditContainer(decision.getId(), decision.getName(), executeDecisionInfo.getDecisionVersion(), \n                        decisionTable.getHitPolicy(), CommandContextUtil.getDmnEngineConfiguration().isStrictMode(), \n                        executeDecisionInfo.getVariables(), clock.getCurrentTime());\n    }\n}\n","sourceCodeStart":40,"sourceCodeEnd":68,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/audit/DecisionExecutionAuditUtil.java#L40-L68","documentation":"Every decision table processed by initializeDecisionExecutionAudit must declare a hit policy; a table with a null hit policy cannot be audited or executed deterministically, so this IllegalArgumentException is thrown after logging.","triggerScenarios":"initializeDecisionExecutionAudit reads decision.getExpression() as a DecisionTable and finds decisionTable.getHitPolicy() == null.","commonSituations":"DMN XML written without the hitPolicy attribute (some editors allow omitting it; the spec default UNIQUE is not auto-applied here); hand-crafted DecisionTable models in tests; older DMN files from tools that omit hitPolicy.","solutions":["Add an explicit hitPolicy attribute to the decision table in the DMN XML (e.g. hitPolicy=\"UNIQUE\")","Set hit policy programmatically if building the model in code","Re-export/re-save the DMN file from the modeling tool ensuring hit policy is set"],"exampleFix":"// before\n<decisionTable> <!-- no hitPolicy -->\n// after\n<decisionTable hitPolicy=\"UNIQUE\">","handlingStrategy":"validation","validationCode":"DecisionTable dt = (DecisionTable) decision.getExpression();\nif (dt.getHitPolicy() == null) throw new IllegalArgumentException(\"decision table must declare a hitPolicy\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always declare hitPolicy in DMN XML (default UNIQUE explicitly)","Enable strict mode at deploy time to catch invalid tables early","Re-save exported DMN files from tools that omit hitPolicy"],"tags":["dmn","audit","hit-policy","validation","flowable"],"backgroundTag":"schema-validation-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}