flowable/flowable-engine · error · IllegalArgumentException

output clause is required

Error message

output clause is required

What it means

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.

Source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExpressionExecutor.java:65

        executionContext.checkExecutionContext(inputExpression);
        
        // pre parse expression
        String parsedExpression = ELInputEntryExpressionPreParser.parse(inputEntry.getText(), inputExpression, inputClause.getInputExpression().getTypeRef());

        Expression expression = expressionManager.createExpression(parsedExpression);
        RuleExpressionCondition condition = new RuleExpressionCondition(expression);
        
        try {
            return condition.evaluate(executionContext.getStackVariables(), executionContext);
        } catch (Exception ex) {
            LOGGER.warn("Error while executing input entry: {}", parsedExpression, ex);
            throw new FlowableDmnExpressionException("error while executing input entry", parsedExpression, ex);
        }
    }

    public static Object executeOutputExpression(OutputClause outputClause, LiteralExpression outputEntry, ExpressionManager expressionManager, ELExecutionContext executionContext) {
        if (outputClause == null) {
            throw new IllegalArgumentException("output clause is required");
        }
        if (outputEntry == null) {
            throw new IllegalArgumentException("output entry is required");
        }
        if (executionContext == null) {
            throw new IllegalArgumentException("execution context is required");
        }
        
        String parsedExpression = ELOutputEntryExpressionPreParser.parse(outputEntry.getText());
        
        Expression expression = expressionManager.createExpression(parsedExpression);
        RuleExpressionOutput outputExpression = new RuleExpressionOutput(expression);

        try {
            return outputExpression.getValue(executionContext.getStackVariables());
        } catch (Exception ex) {
            LOGGER.warn("Error while executing output entry: {}", outputEntry.getText(), ex);
            throw new FlowableDmnExpressionException("error while executing output entry", outputEntry.getText(), ex);

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Ensure a fully populated OutputClause (with its output expression/definition set) is passed to executeOutputExpression.
  2. Fix the DMN XML or model so every output column has a complete <output> clause.
  3. Check custom converters/parsers that they map output clauses into the Flowable DMN model instead of leaving them null.
  4. Guard the clause for null at your call site and surface a model-validation error instead of invoking the executor.

Example fix

// before
Object result = ELExpressionExecutor.executeOutputExpression(null, outputEntry, em, ctx);
// after
if (outputClause != null && outputClause.getOutputValues() != null) {
    Object result = ELExpressionExecutor.executeOutputExpression(outputClause, outputEntry, em, ctx);
}
Defensive patterns

Strategy: validation

Validate before calling

if (outputClause == null) { throw new IllegalStateException("decision table has no output clause for this column"); }

Type guard

boolean hasOutputClause(OutputClause c) { return c != null; }

Try / catch

try {
    ELExpressionExecutor.executeOutputExpression(clause, entry, em, ctx);
} catch (IllegalArgumentException e) {
    if ("output clause is required".equals(e.getMessage())) {
        // output clause missing in model: fix DMN XML or converter
    } else { throw e; }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/a8b29e0ed5568898. Report an issue: GitHub.