{"record":{"id":"797fb59925ad1532","repo":"flowable/flowable-engine","slug":"input-clause-is-required","errorCode":null,"errorMessage":"input clause is required","messagePattern":"input clause 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":34,"sourceCode":"import org.flowable.common.engine.impl.el.ExpressionManager;\nimport org.flowable.dmn.engine.FlowableDmnExpressionException;\nimport org.flowable.dmn.model.InputClause;\nimport 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);","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExpressionExecutor.java#L16-L52","documentation":"ELExpressionExecutor.executeInputExpression validates its DMN model arguments before evaluation and throws IllegalArgumentException when inputClause is null (also for null input expression or input entry). It ensures the executor never evaluates a malformed input clause.","triggerScenarios":"Executing a decision table whose rule/input structure is incomplete: an input entry or InputClause object is null because the DMN XML was malformed (missing <inputExpression> or <inputEntry>) or programmatically built DMN model objects were left partially populated.","commonSituations":"Generated or hand-edited DMN missing input expression elements; custom DMN model construction in tests; parser bugs/older DMN 1.0 files missing required elements that the executor assumes.","solutions":["Fix the DMN XML so every <input> has an <inputExpression> and each rule has a non-empty <inputEntry>.","Validate DMN resources against the DMN XSD before deployment.","In programmatic model building, populate InputClause, its input expression, and InputEntry objects before execution.","Catch IllegalArgumentException during decision execution and report which rule/clause is malformed."],"exampleFix":"// before\nInputClause clause = null; // never populated\nBoolean hit = ELExpressionExecutor.executeInputExpression(clause, entry, em, ctx);\n// after\nInputClause clause = new InputClause();\nclause.setInputExpression(new LiteralExpression());\nclause.getInputExpression().setText(\"${amount}\");\nBoolean hit = ELExpressionExecutor.executeInputExpression(clause, entry, em, ctx);","handlingStrategy":"validation","validationCode":"if (inputClause == null || inputClause.getInputExpression() == null || inputEntry == null) {\n    throw new IllegalArgumentException(\"Input clause, input expression and input entry must all be set\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    Boolean hit = ELExpressionExecutor.executeInputExpression(clause, entry, expressionManager, ctx);\n} catch (IllegalArgumentException e) {\n    log.warn(\"Malformed DMN input structure: {}\", e.getMessage());\n}","preventionTips":["Validate DMN XML has inputExpression and inputEntry for every input/rule","Fully populate programmatically built DMN model objects","Run DMN XSD validation before deploying files","Watch for old DMN 1.0 files missing required elements"],"tags":["flowable","dmn","el","null-argument","model-validation"],"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-14T11:17:12.474Z"}