{"record":{"id":"c454dbf754fb4aa6","repo":"flowable/flowable-engine","slug":"dmn-decision-with-key-finaldecisionkeyvalue-did","errorCode":null,"errorMessage":"DMN decision with key ${finalDecisionKeyValue} did not hit any rules for the provided input. In ${execution}","messagePattern":"DMN decision with key (.+?) did not hit any rules for the provided input\\. In (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/DmnActivityBehavior.java","lineNumber":130,"sourceCode":"        if (decisionExecutionAuditContainer.isFailed()) {\r\n            throw new FlowableException(\"DMN decision with key \" + finalDecisionKeyValue + \" execution failed in \" + execution,\r\n                    decisionExecutionAuditContainer.getException());\r\n        }\r\n\r\n        /*Throw error if there were no rules hit when the flag indicates to do this.*/\r\n        FieldExtension throwErrorFieldExtension = DelegateHelper.getFlowElementField(execution, EXPRESSION_DECISION_TABLE_THROW_ERROR_FLAG);\r\n        if (throwErrorFieldExtension != null) {\r\n            String throwErrorString = null;\r\n            if (StringUtils.isNotEmpty(throwErrorFieldExtension.getStringValue())) {\r\n                throwErrorString = throwErrorFieldExtension.getStringValue();\r\n                \r\n            } else if (StringUtils.isNotEmpty(throwErrorFieldExtension.getExpression())) {\r\n                throwErrorString = throwErrorFieldExtension.getExpression();\r\n            }\r\n            \r\n            if (decisionExecutionAuditContainer.getDecisionResult().isEmpty() && throwErrorString != null) {\r\n                if (\"true\".equalsIgnoreCase(throwErrorString)) {\r\n                    throw new FlowableException(\"DMN decision with key \" + finalDecisionKeyValue + \" did not hit any rules for the provided input. In \" + execution);\r\n                    \r\n                } else if (!\"false\".equalsIgnoreCase(throwErrorString)) {\r\n                    Expression expression = expressionManager.createExpression(throwErrorString);\r\n                    Object expressionValue = expression.getValue(execution);\r\n                    \r\n                    if (expressionValue instanceof Boolean && ((Boolean) expressionValue)) {\r\n                        throw new FlowableException(\"DMN decision with key \" + finalDecisionKeyValue + \" did not hit any rules for the provided input. In \" + execution);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        if (processEngineConfiguration.getDecisionTableVariableManager() != null) {\r\n            if (decisionExecutionAuditContainer instanceof DecisionServiceExecutionAuditContainer decisionServiceExecutionAuditContainer) {\r\n                processEngineConfiguration.getDecisionTableVariableManager().setDecisionServiceVariablesOnExecution(decisionServiceExecutionAuditContainer.getDecisionServiceResult(),\r\n                    finalDecisionKeyValue, execution, processEngineConfiguration.getObjectMapper(), decisionExecutionAuditContainer.isMultipleResults());\r\n            } else {\r\n                processEngineConfiguration.getDecisionTableVariableManager().setVariablesOnExecution(decisionExecutionAuditContainer.getDecisionResult(),\r","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/DmnActivityBehavior.java#L112-L148","documentation":"The decision executed successfully but no rule matched the provided input, and the task's 'decisionTableThrowErrorOnNoHit' flag field (EXPRESSION_DECISION_TABLE_THROW_ERROR_FLAG) was set so that this condition must fail the task. Flowable throws this FlowableException when the flag is the literal 'true'; if the flag is an expression, it throws only when that expression evaluates to Boolean true. It signals incomplete decision coverage rather than an engine malfunction.","triggerScenarios":"decisionExecutionAuditContainer.getDecisionResult().isEmpty() (zero rules hit) AND the throwError field extension resolves to \"true\" or to an expression evaluating to true; typically input data doesn't satisfy any rule's conditions while strict no-hit enforcement is configured.","commonSituations":"Incomplete rule coverage in the decision table (no default/fallback rule); input values outside the ranges covered by rules; caller passes unexpected/edge-case data (null age, unknown category); deliberate strict mode where any no-hit must fail the process.","solutions":["Add a catch-all/default rule to the decision table covering unmatched inputs","Set the throw-error field to \"false\" (or remove it) if no-hit should be tolerated and handled by checking the empty result instead","Fix or validate the input variables before the DMN task so they fall inside existing rule conditions","Keep the flag but wrap the DMN task in a boundary error event in the process model to handle no-hit outcomes gracefully"],"exampleFix":"// before (BPMN XML)\n<flowable:field name=\"decisionTableThrowErrorOnNoHit\" stringValue=\"true\" />\n// after\n<flowable:field name=\"decisionTableThrowErrorOnNoHit\" stringValue=\"false\" /> // or add a default rule to the DMN table","handlingStrategy":"validation","validationCode":"DecisionExecutionAuditContainer audit = executeDecisionBuilder.executeWithAuditTrail();\nif (audit.getDecisionResult() == null || audit.getDecisionResult().isEmpty()) {\n    log.warn(\"No DMN rule hit for inputs {}\", inputVars);\n}","typeGuard":null,"tryCatchPattern":"try {\n    taskService.complete(taskId);\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"did not hit any rules\")) {\n        // handle no-hit business case explicitly\n    } else throw e;\n}","preventionTips":["Add a default/fallback rule to every decision table","Only enable the throw-no-hit flag when no-hit is a true business failure","Test decision tables with boundary and out-of-range inputs","Validate input data against rule conditions before the DMN task"],"tags":["flowable","dmn","decision-table","no-rules-hit","configuration"],"backgroundTag":"empty-result-set","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"}