flowable/flowable-engine · error · FlowableIllegalArgumentException
decisionKey is null
Error message
decisionKey is null
What it means
ExecuteDecisionCmd refuses to run a DMN decision when the decision key on the ExecuteDecisionContext is null. The engine cannot resolve a DmnDefinition without a key, so it fails fast with FlowableIllegalArgumentException instead of a confusing lookup error later. The key is normally set via DmnDecisionService.executeDecision with a decision key or by the calling activity behavior.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/ExecuteDecisionCmd.java:59
public ExecuteDecisionCmd(String decisionKey, String parentDeploymentId, Map<String, Object> variables) {
this(decisionKey, variables);
executeDecisionContext.setParentDeploymentId(parentDeploymentId);
}
public ExecuteDecisionCmd(String decisionKey, String parentDeploymentId, Map<String, Object> variables, String tenantId) {
this(decisionKey, parentDeploymentId, variables);
executeDecisionContext.setTenantId(tenantId);
}
public ExecuteDecisionCmd(ExecuteDecisionContext executeDecisionContext) {
super(executeDecisionContext);
}
@Override
public Void execute(CommandContext commandContext) {
if (executeDecisionContext.getDecisionKey() == null) {
throw new FlowableIllegalArgumentException("decisionKey is null");
}
DmnDefinition definition = resolveDefinition();
execute(commandContext, definition);
return null;
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Set the decision key explicitly: dmnEngine.getRuleServices().getDmnDecisionService().executeDecision("myDecisionKey", variables)
- If the key comes from a variable/property, check it is non-null before invoking the engine and fail with a clear application-level message
- Verify the ExecuteDecisionContext/ExecuteDecisionBuilder construction includes executeDecisionContext.setDecisionKey(...) or .decisionKey(...) before execute()
Example fix
// before
String key = config.getDecisionKey(); // may be null
decisionService.executeDecision(key, vars);
// after
String key = config.getDecisionKey();
if (key == null || key.isEmpty()) {
throw new IllegalStateException("DMN decision key not configured");
}
decisionService.executeDecision(key, vars); Defensive patterns
Strategy: validation
Validate before calling
if (decisionKey == null || decisionKey.isEmpty()) throw new IllegalArgumentException("decisionKey must be set before executing a decision"); Try / catch
try { decisionService.executeDecision(key, vars); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().contains("decisionKey is null")) { throw new ConfigurationException("DMN decision key not configured", e); } throw e; } Prevention
- Always populate the decision key in one central wrapper around the DMN engine
- Fail application startup when the configured decision key property is missing
- Log the decision key source (property, variable) so null origins are traceable
When it happens
Trigger: Calling DmnEngine/DmnRuleServices.executeDecision(...) or building an ExecuteDecisionContext (via ExecuteDecisionBuilder) without ever calling decisionKey(String) — e.g. key variable itself null, or the key comes from an unset process/flow variable.
Common situations: Spring/XML config where the decision key is injected from a property that is missing or empty-null; dynamic keys resolved from a process variable that was never set; refactor renaming the builder method so the key assignment was dropped.
Related errors
- decisionKey is null
- decisionKey is null
- The decision table id is mandatory, but '<decisionTableId>'
- deploymentId is null
- resourceName is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5dedc62ba484f6fc.
Report an issue: GitHub.