{"record":{"id":"a8b29e0ed5568898","repo":"flowable/flowable-engine","slug":"output-clause-is-required","errorCode":null,"errorMessage":"output clause is required","messagePattern":"output 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":65,"sourceCode":"        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 {\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);","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExpressionExecutor.java#L47-L83","documentation":"Thrown by ELExpressionExecutor.executeOutputExpression when the OutputClause argument is null. The output clause describes the output expression of a decision-table column; without it the executor cannot proceed, so it fails fast with an IllegalArgumentException before evaluating the output entry.","triggerScenarios":"Passing null as the first argument to executeOutputExpression — e.g. programmatically built decision tables, converters, or parsers that skip the <output> clause / omit its <outputEntry> definition and hand a null clause to the executor.","commonSituations":"Custom DMN model transformations that construct output rows but not output clauses; incomplete DMN XML missing <output> elements; test harnesses calling the executor directly with stubbed arguments.","solutions":["Ensure a fully populated OutputClause (with its output expression/definition set) is passed to executeOutputExpression.","Fix the DMN XML or model so every output column has a complete <output> clause.","Check custom converters/parsers that they map output clauses into the Flowable DMN model instead of leaving them null.","Guard the clause for null at your call site and surface a model-validation error instead of invoking the executor."],"exampleFix":"// before\nObject result = ELExpressionExecutor.executeOutputExpression(null, outputEntry, em, ctx);\n// after\nif (outputClause != null && outputClause.getOutputValues() != null) {\n    Object result = ELExpressionExecutor.executeOutputExpression(outputClause, outputEntry, em, ctx);\n}","handlingStrategy":"validation","validationCode":"if (outputClause == null) { throw new IllegalStateException(\"decision table has no output clause for this column\"); }","typeGuard":"boolean hasOutputClause(OutputClause c) { return c != null; }","tryCatchPattern":"try {\n    ELExpressionExecutor.executeOutputExpression(clause, entry, em, ctx);\n} catch (IllegalArgumentException e) {\n    if (\"output clause is required\".equals(e.getMessage())) {\n        // output clause missing in model: fix DMN XML or converter\n    } else { throw e; }\n}","preventionTips":["Ensure every output column has a complete <output> clause in the DMN model","Validate the model after conversion/import before evaluation","Null-check output clauses in custom table builders","Fail at model-validation time rather than at evaluation time"],"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"}