flowable/flowable-engine · error · IllegalArgumentException
execution context is required
Error message
execution context is required
What it means
Thrown by ELExpressionExecutor.executeInputExpression (and identically by executeOutputExpression) when the ELExecutionContext argument is null. The execution context supplies the stack variables and hit-policy state needed to evaluate expressions, so a null context makes evaluation impossible and the executor throws IllegalArgumentException up front.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/ELExpressionExecutor.java:43
/**
* @author Yvo Swillens
*/
public class ELExpressionExecutor {
private static final Logger LOGGER = LoggerFactory.getLogger(ELExpressionExecutor.class);
public static Boolean executeInputExpression(InputClause inputClause, UnaryTests inputEntry, ExpressionManager expressionManager, ELExecutionContext executionContext) {
if (inputClause == null) {
throw new IllegalArgumentException("input clause is required");
}
if (inputClause.getInputExpression() == null) {
throw new IllegalArgumentException("input expression is required");
}
if (inputEntry == null) {
throw new IllegalArgumentException("input entry is required");
}
if (executionContext == null) {
throw new IllegalArgumentException("execution context is required");
}
String inputExpression = inputClause.getInputExpression().getText();
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);
}
}View on GitHub (pinned to d6d39ce1c6)
Solutions
- Create and pass an ELExecutionContext populated with the decision's input variables before calling the executor.
- If invoking outside the engine, replicate the context setup the engine performs (stack variables, execution info) rather than passing null.
- Refactor to run the evaluation through the DMN engine (DmnDecisionTableManager/RuleEngineExecutor) so the context is constructed for you.
- Assert non-null arguments at the call site with Objects.requireNonNull to fail with a clearer stack trace.
Example fix
// before Boolean hit = ELExpressionExecutor.executeInputExpression(clause, inputEntry, expressionManager, null); // after ELExecutionContext ctx = new ELExecutionContext(); ctx.setStackVariables(variables); Boolean hit = ELExpressionExecutor.executeInputExpression(clause, inputEntry, expressionManager, ctx);
Defensive patterns
Strategy: validation
Validate before calling
Objects.requireNonNull(executionContext, "ELExecutionContext must be built before expression evaluation");
Try / catch
try {
ELExpressionExecutor.executeInputExpression(clause, entry, em, ctx);
} catch (IllegalArgumentException e) {
if ("execution context is required".equals(e.getMessage())) {
// context was never created: initialize engine-side evaluation flow
} else { throw e; }
} Prevention
- Never call ELExpressionExecutor directly without building an ELExecutionContext
- Prefer the public DMN engine API which constructs the context for you
- Reuse one context instance across input and output evaluation
- Add requireNonNull asserts in test helpers that exercise the executor
When it happens
Trigger: Passing null as the ELExecutionContext argument to executeInputExpression/executeOutputExpression — e.g. calling the executor outside a decision-table evaluation flow where the context would normally be created by the engine.
Common situations: Unit-testing the executor without building an ELExecutionContext; custom integrations invoking ELExpressionExecutor directly after loading a DMN model, forgetting to construct the context with the input variables.
Related errors
- input expression is required
- input entry is required
- output clause is required
- output entry is required
- <exception message from evaluation failure>
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/8199ea02ceda82c0.
Report an issue: GitHub.