{"record":{"id":"e8329ff1c380a77e","repo":"flowable/flowable-engine","slug":"error-while-transforming-input-variable-inputvari","errorCode":null,"errorMessage":"error while transforming input variable <inputVariableName> for decision table <id>","messagePattern":"error while transforming input variable <inputVariableName> for decision table <id>","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExecutionContextBuilder.java","lineNumber":146,"sourceCode":"                    inputVariables.put(inputVariableName, transformedDate);\n                } else if (inputVariableValue instanceof java.time.LocalDate) {\n                    Date transformedDate = Date.from(((java.time.LocalDate) inputVariableValue).atStartOfDay()\n                            .atZone(ZoneId.systemDefault())\n                            .toInstant());\n                    inputVariables.put(inputVariableName, transformedDate);\n                } else if (inputVariableValue instanceof Long || inputVariableValue instanceof Integer) {\n                    BigInteger transformedNumber = new BigInteger(inputVariableValue.toString());\n                    inputVariables.put(inputVariableName, transformedNumber);\n                } else if (inputVariableValue instanceof Double ) {\n                    BigDecimal transformedNumber = new BigDecimal((Double) inputVariableValue);\n                    inputVariables.put(inputVariableName, transformedNumber);\n                } else if (inputVariableValue instanceof Float) {\n                    double doubleValue = Double.parseDouble(inputVariableValue.toString());\n                    BigDecimal transformedNumber = new BigDecimal(doubleValue);\n                    inputVariables.put(inputVariableName, transformedNumber);\n                }\n            } catch (Exception ex) {\n                throw new FlowableException(\"error while transforming input variable \" + inputVariableName + \" for decision table \" + decisionTable.getId(), ex);\n            }\n        }\n    }\n}\n","sourceCodeStart":128,"sourceCodeEnd":151,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExecutionContextBuilder.java#L128-L151","documentation":"During decision-table execution, ELExecutionContextBuilder.preProcessInputVariables converts each input variable value (e.g. Float to BigDecimal). Any exception in that conversion is wrapped in a FlowableException naming the variable and the decision table, preserving the cause.","triggerScenarios":"Passing an input variable value that fails numeric conversion — e.g. a Float/Number that cannot be represented or a value of an unexpected type hitting Double.parseDouble/BigDecimal construction inside the try block for an input expected to be numeric.","commonSituations":"Feeding String or custom types where the decision table's input expression expects numbers; locale-formatted number strings; NaN/Infinity floats; API deserializers delivering unexpected numeric wrappers.","solutions":["Inspect the wrapped cause (ex.getCause()) to see the actual conversion failure.","Convert variables to the expected types (BigDecimal/Integer/Double) before executing the decision table.","Ensure numeric inputs are not NaN/Infinity and are valid doubles.","Align input variable types with the DMN input expression type declarations (typeRef)."],"exampleFix":"// before\nvars.put(\"amount\", Float.valueOf(\"12,5\")); // locale/parsing issue surfaces later\n// after\nvars.put(\"amount\", new BigDecimal(\"12.5\"));","handlingStrategy":"try-catch","validationCode":"Object v = inputs.get(name);\nif (v instanceof Float || v instanceof Double) {\n    double d = ((Number) v).doubleValue();\n    if (Double.isNaN(d) || Double.isInfinite(d)) throw new IllegalArgumentException(\"Bad numeric input: \" + name);\n}","typeGuard":null,"tryCatchPattern":"try {\n    dmnEngine.evaluateDecisionTableByKey(tableKey, inputs);\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"error while transforming input variable\")) {\n        log.error(\"Check type of input variable named in: {}\", e.getMessage(), e.getCause());\n    }\n}","preventionTips":["Match input variable types to the decision table's typeRef declarations","Convert numbers to BigDecimal/Integer before execution","Reject NaN/Infinity and locale-formatted numeric strings","Always log the wrapped cause for diagnosis"],"tags":["flowable","dmn","type-conversion","input-variable","numeric"],"backgroundTag":"type-mismatch","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}