{"record":{"id":"567ab11c1f50e7fc","repo":"flowable/flowable-engine","slug":"output-entry-is-required","errorCode":null,"errorMessage":"output entry is required","messagePattern":"output entry 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":68,"sourceCode":"        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 {\n            return condition.evaluate(executionContext.getStackVariables(), executionContext);\n        } catch (Exception ex) {\n            LOGGER.warn(\"Error while executing input entry: {}\", parsedExpression, ex);\n            throw new FlowableDmnExpressionException(\"error while executing input entry\", parsedExpression, ex);\n        }\n    }\n\n    public static Object executeOutputExpression(OutputClause outputClause, LiteralExpression outputEntry, ExpressionManager expressionManager, ELExecutionContext executionContext) {\n        if (outputClause == null) {\n            throw new IllegalArgumentException(\"output clause is required\");\n        }\n        if (outputEntry == null) {\n            throw new IllegalArgumentException(\"output entry is required\");\n        }\n        if (executionContext == null) {\n            throw new IllegalArgumentException(\"execution context is required\");\n        }\n        \n        String parsedExpression = ELOutputEntryExpressionPreParser.parse(outputEntry.getText());\n        \n        Expression expression = expressionManager.createExpression(parsedExpression);\n        RuleExpressionOutput outputExpression = new RuleExpressionOutput(expression);\n\n        try {\n            return outputExpression.getValue(executionContext.getStackVariables());\n        } catch (Exception ex) {\n            LOGGER.warn(\"Error while executing output entry: {}\", outputEntry.getText(), ex);\n            throw new FlowableDmnExpressionException(\"error while executing output entry\", outputEntry.getText(), ex);\n        }\n    }\n}","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExpressionExecutor.java#L50-L86","documentation":"Thrown by ELExpressionExecutor.executeOutputExpression when the outputEntry (LiteralExpression) argument is null. The output entry contains the literal expression whose value becomes the rule's output; without it no expression can be parsed and the executor rejects the call with an IllegalArgumentException.","triggerScenarios":"Passing null as the second argument to executeOutputExpression — e.g. rule rows missing the output cell, parsers that produce no LiteralExpression for an output entry, or direct calls to the executor with placeholder nulls.","commonSituations":"DMN XML where a rule's output entry element is absent; custom decision-table builders skipping empty output cells; programmatic rule generation that leaves output entries unset.","solutions":["Pass a valid LiteralExpression with its text set (even an empty or default value) instead of null.","Ensure every rule row has one output entry per output clause in the DMN model/XML.","When empty output cells are valid, substitute a LiteralExpression with empty/default text before evaluation.","Null-check output entries before the call and skip or log incomplete rules."],"exampleFix":"// before\nLiteralExpression outputEntry = rule.getOutputEntries().get(j); // may be null\nObject v = ELExpressionExecutor.executeOutputExpression(outputClause, outputEntry, em, ctx);\n// after\nif (outputEntry != null) {\n    Object v = ELExpressionExecutor.executeOutputExpression(outputClause, outputEntry, em, ctx);\n} else {\n    LiteralExpression empty = new LiteralExpression();\n    empty.setText(\"\");\n    Object v = ELExpressionExecutor.executeOutputExpression(outputClause, empty, em, ctx);\n}","handlingStrategy":"validation","validationCode":"if (outputEntry == null) { outputEntry = new LiteralExpression(); outputEntry.setText(\"\"); }","typeGuard":"boolean hasOutputEntry(LiteralExpression e) { return e != null; }","tryCatchPattern":"try {\n    ELExpressionExecutor.executeOutputExpression(clause, entry, em, ctx);\n} catch (IllegalArgumentException e) {\n    if (\"output entry is required\".equals(e.getMessage())) {\n        // rule row missing output entry: report row/column\n    } else { throw e; }\n}","preventionTips":["Ensure each rule row has one output entry per output clause","Validate decision-table shape before running rules","Substitute a default LiteralExpression for intentionally empty outputs","Null-check entries in custom rule generators"],"tags":["java","dmn","null-argument","expression-evaluation"],"backgroundTag":"null-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"}