{"record":{"id":"ed877578918e9d9c","repo":"flowable/flowable-engine","slug":"dmn-decision-with-key-finaldecisionkeyvalue-exe","errorCode":null,"errorMessage":"DMN decision with key ${finalDecisionKeyValue} execution failed in ${execution}","messagePattern":"DMN decision with key (.+?) execution failed 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":113,"sourceCode":"        }\r\n\r\n        DmnDecisionService ruleService = CommandContextUtil.getDmnRuleService();\r\n\r\n        ExecuteDecisionBuilder executeDecisionBuilder = ruleService.createExecuteDecisionBuilder()\r\n            .decisionKey(finalDecisionKeyValue)\r\n            .instanceId(execution.getProcessInstanceId())\r\n            .executionId(execution.getId())\r\n            .activityId(task.getId())\r\n            .variables(execution.getVariables())\r\n            .tenantId(execution.getTenantId());\r\n\r\n        applyFallbackToDefaultTenant(execution, executeDecisionBuilder);\r\n        applyParentDeployment(execution, executeDecisionBuilder, processEngineConfiguration);\r\n\r\n        DecisionExecutionAuditContainer decisionExecutionAuditContainer = executeDecisionBuilder.executeWithAuditTrail();\r\n\r\n        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","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/DmnActivityBehavior.java#L95-L131","documentation":"The DMN engine executed the decision identified by finalDecisionKeyValue and the audit container reported failure. Flowable wraps the original decision exception in this FlowableException so the process-level error includes the decision key and execution context. Check the cause (decisionExecutionAuditContainer.getException()) for the real problem inside the decision model.","triggerScenarios":"executeDecisionBuilder.executeWithAuditTrail() returns a DecisionExecutionAuditContainer with isFailed()==true — typically an exception thrown while evaluating the decision table: invalid expression in a rule, missing input variable referenced by an input expression, or an internal DMN engine error.","commonSituations":"Decision table rules reference input variables not present on the execution; a rule condition expression throws (e.g. division by null); the deployed DMN model has a broken expression after being edited; hit-policy/aggregation misconfiguration causing evaluation errors.","solutions":["Inspect the exception cause (audit container / logged stack trace) to find the failing rule or expression in the DMN model","Verify all input variables referenced by the decision table's input expressions exist on the execution before the DMN task","Validate and redeploy the DMN model after fixes (fix expression syntax, types, hit policy)","Test the decision in isolation (DmnRuleService / DMN engine test harness) with representative input data"],"exampleFix":"// before: DMN input expression references missing variable\ninputExpression: ${customerAge}  // not set on execution\n// after\ndelegateExecution.setVariable(\"customerAge\", 30); // before DMN task","handlingStrategy":"try-catch","validationCode":"for (String name : List.of(\"customerAge\", \"customerCategory\")) {\n    if (execution.getVariable(name) == null) {\n        throw new IllegalStateException(\"Missing DMN input variable: \" + name);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    executeDecisionBuilder.executeWithAuditTrail();\n} catch (FlowableException e) {\n    log.error(\"DMN decision failed: {}\", e.getCause() != null ? e.getCause().getMessage() : e.getMessage(), e);\n    // route to boundary error event / compensation\n}","preventionTips":["Inspect the exception cause for the real rule/expression failure","Unit-test each DMN model with typical and edge-case inputs","Verify all input expressions' variables exist before execution","Validate DMN models before deployment"],"tags":["flowable","dmn","decision-table","execution-failed"],"backgroundTag":"upstream-api-error","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"}