{"record":{"id":"4969f01a55a6ad12","repo":"flowable/flowable-engine","slug":"input-expression-is-required","errorCode":null,"errorMessage":"input expression is required","messagePattern":"input expression is required","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExpressionExecutor.java","lineNumber":37,"sourceCode":"import org.flowable.dmn.model.LiteralExpression;\nimport org.flowable.dmn.model.OutputClause;\nimport org.flowable.dmn.model.UnaryTests;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * @author Yvo Swillens\n */\npublic class ELExpressionExecutor {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(ELExpressionExecutor.class);\n\n    public static Boolean executeInputExpression(InputClause inputClause, UnaryTests inputEntry, ExpressionManager expressionManager, ELExecutionContext executionContext) {\n        if (inputClause == null) {\n            throw new IllegalArgumentException(\"input clause is required\");\n        }\n        if (inputClause.getInputExpression() == null) {\n            throw new IllegalArgumentException(\"input expression is required\");\n        }\n        if (inputEntry == null) {\n            throw new IllegalArgumentException(\"input entry is required\");\n        }\n        if (executionContext == null) {\n            throw new IllegalArgumentException(\"execution context is required\");\n        }\n        \n        String inputExpression = inputClause.getInputExpression().getText();\n        executionContext.checkExecutionContext(inputExpression);\n        \n        // pre parse expression\n        String parsedExpression = ELInputEntryExpressionPreParser.parse(inputEntry.getText(), inputExpression, inputClause.getInputExpression().getTypeRef());\n\n        Expression expression = expressionManager.createExpression(parsedExpression);\n        RuleExpressionCondition condition = new RuleExpressionCondition(expression);\n        \n        try {","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExpressionExecutor.java#L19-L55","documentation":"Thrown by ELExpressionExecutor.executeInputExpression when the InputClause argument is non-null but its getInputExpression() returns null. An input clause must carry the input expression (the FEEL/EL expression describing the hit policy input); without it the engine cannot build or evaluate the rule condition, so it fails fast with an IllegalArgumentException.","triggerScenarios":"Calling ELExpressionExecutor.executeInputExpression with an InputClause whose inputExpression field was never set — typically a programmatically built decision table or a partially parsed DMN model where the <inputExpression> element is missing from the <input> clause.","commonSituations":"Hand-constructing InputClause objects in unit tests or custom DMN tooling without calling setInputExpression; a malformed/incomplete DMN XML where the input element omits its child inputExpression; custom model converters that copy clauses but drop the expression.","solutions":["Set the input expression on the clause before executing: inputClause.setInputExpression(literalExpression) with a non-null LiteralExpression.","Inspect the DMN XML/model for <input> elements missing their <inputExpression> child and fix the model or the producing tool.","If the clause comes from a converter, check that it maps the source model's input expression into the Flowable DMN model.","Null-check the clause's input expression before invoking executeInputExpression and fail with a clear message at your boundary."],"exampleFix":"// before\nInputClause clause = new InputClause();\nclause.setInputEntryValues(...);\nBoolean hit = ELExpressionExecutor.executeInputExpression(clause, inputEntry, em, ctx);\n// after\nInputClause clause = new InputClause();\nLiteralExpression inputExpr = new LiteralExpression();\ninputExpr.setText(\"amount\");\nclause.setInputExpression(inputExpr);\nBoolean hit = ELExpressionExecutor.executeInputClauseGuarded(clause, inputEntry, em, ctx);","handlingStrategy":"validation","validationCode":"if (inputClause == null || inputClause.getInputExpression() == null) {\n    throw new IllegalStateException(\"DMN input clause has no input expression; fix the model before evaluation\");\n}","typeGuard":"boolean hasInputExpression(InputClause c) { return c != null && c.getInputExpression() != null; }","tryCatchPattern":"try {\n    ELExpressionExecutor.executeInputExpression(clause, entry, em, ctx);\n} catch (IllegalArgumentException e) {\n    if (\"input expression is required\".equals(e.getMessage())) {\n        // report malformed DMN model: missing input expression on clause\n    } else { throw e; }\n}","preventionTips":["Always set an input expression on every InputClause before evaluation","Validate the DMN model (presence of <inputExpression> in each <input>) before deploying/running","In converters, assert each clause's expression is mapped, not dropped","Fail fast with model-validation at deploy time rather than at evaluation time"],"tags":["java","dmn","null-argument","expression-evaluation"],"backgroundTag":"missing-required-argument","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"}