{"record":{"id":"39aa484546071031","repo":"flowable/flowable-engine","slug":"no-rules-present-in-table","errorCode":null,"errorMessage":"no rules present in table","messagePattern":"no rules present in table","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/RuleEngineExecutorImpl.java","lineNumber":109,"sourceCode":"            // evaluate decision table\n            evaluateDecisionTable(currentDecisionTable, executionContext);\n\n        } catch (FlowableException fe) {\n            LOGGER.error(\"decision table execution sanity check failed\", fe);\n            executionContext.getAuditContainer().setFailedWithException(fe);\n            executionContext.getAuditContainer().setExceptionMessage(getExceptionMessage(fe));\n\n        } finally {\n            // end audit trail\n            executionContext.getAuditContainer().stopAudit(dmnEngineConfiguration.getClock().getCurrentTime());\n        }\n\n        return executionContext.getAuditContainer();\n    }\n\n    protected void evaluateDecisionTable(DecisionTable decisionTable, ELExecutionContext executionContext) {\n        if (decisionTable == null || decisionTable.getRules().isEmpty()) {\n            throw new IllegalArgumentException(\"no rules present in table\");\n        }\n\n        LOGGER.debug(\"Start table evaluation: {}\", decisionTable.getId());\n\n        if (executionContext == null) {\n            throw new FlowableException(\"no execution context available\");\n        }\n\n        try {\n            // evaluate rule conditions\n            Map<Integer, List<RuleOutputClauseContainer>> validRuleOutputEntries = new HashMap<>();\n\n            for (DecisionRule rule : decisionTable.getRules()) {\n                boolean ruleResult = executeRule(rule, executionContext);\n\n                if (ruleResult) {\n                    // evaluate decision table hit policy validity\n                    if (getHitPolicyBehavior(decisionTable.getHitPolicy()) instanceof EvaluateRuleValidityBehavior) {","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/RuleEngineExecutorImpl.java#L91-L127","documentation":"The DMN rule engine requires at least one rule in the decision table being evaluated. evaluateDecisionTable throws this IllegalArgumentException when the DecisionTable is null or its getRules() list is empty (RuleEngineExecutorImpl.java:108-110). Since it is thrown inside execute's try block but is an IllegalArgumentException (not FlowableException), it is not captured into the audit container and propagates to the caller.","triggerScenarios":"Executing a decision table that was deployed with zero <rule> rows, a programmatically built DecisionTable without rules, or code that filters/strips rules before calling execute. Also triggered when decisionTable is null, though execute() normally guards that earlier.","commonSituations":"Modeling a decision table in the DMN editor and saving it with the rule rows all removed, generating DMN XML from a template where the rules loop rendered nothing, or an incomplete conversion producing an empty rules list.","solutions":["Add at least one rule row to the decision table in your .dmn XML / DMN modeler and redeploy the decision.","If you truly need a no-rule table, guard the call: check decisionTable.getRules().isEmpty() before executing and skip or return an empty audit result.","Check your deployment pipeline / template for conditions that could drop rule rows.","Re-export the model from the DMN modeler to ensure the converter populated rules."],"exampleFix":"// before\nruleEngineExecutor.execute(decision, ctx); // table has no rules -> IllegalArgumentException\n// after\nDecisionTable table = (DecisionTable) decision.getExpression();\nif (table != null && !table.getRules().isEmpty()) {\n    ruleEngineExecutor.execute(decision, ctx);\n}","handlingStrategy":"validation","validationCode":"DecisionTable table = decision != null && decision.getExpression() instanceof DecisionTable\n        ? (DecisionTable) decision.getExpression() : null;\nif (table == null || table.getRules() == null || table.getRules().isEmpty()) {\n    throw new IllegalStateException(\"decision table has no rules to evaluate\");\n}","typeGuard":"boolean hasRules(Decision d) {\n    return d != null && d.getExpression() instanceof DecisionTable t && t.getRules() != null && !t.getRules().isEmpty();\n}","tryCatchPattern":null,"preventionTips":["Never save a decision table without at least one rule row; enforce this in model review or CI validation of .dmn files.","Add a unit test that executes each deployed decision and asserts rules exist.","Check dynamic DMN generators/templates for loops that may render zero rules."],"tags":["dmn","java","validation","empty-collection"],"backgroundTag":"empty-required-field","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"}