flowable/flowable-engine · error · FlowableIllegalArgumentException
key is null
Error message
key is null
What it means
DmnDeploymentQueryImpl.decisionKey(String) throws FlowableIllegalArgumentException when the key parameter is null. The decision key is a mandatory non-null criterion for filtering deployments by the key of decisions they contain; Flowable validates this at the builder call to avoid generating an invalid query.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java:148
throw new FlowableIllegalArgumentException("parentDeploymentId is null");
}
this.parentDeploymentId = parentDeploymentId;
return this;
}
@Override
public DmnDeploymentQueryImpl parentDeploymentIdLike(String parentDeploymentIdLike) {
if (parentDeploymentIdLike == null) {
throw new FlowableIllegalArgumentException("parentDeploymentIdLike is null");
}
this.parentDeploymentIdLike = parentDeploymentIdLike;
return this;
}
@Override
public DmnDeploymentQueryImpl decisionKey(String key) {
if (key == null) {
throw new FlowableIllegalArgumentException("key is null");
}
this.decisionKey = key;
return this;
}
@Override
public DmnDeploymentQueryImpl decisionKeyLike(String keyLike) {
if (keyLike == null) {
throw new FlowableIllegalArgumentException("keyLike is null");
}
this.decisionKeyLike = keyLike;
return this;
}
// sorting ////////////////////////////////////////////////////////
@Override
public DmnDeploymentQuery orderByDeploymentId() {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Supply the actual decision key string used in the deployed DMN model
- Only call decisionKey(...) when the key is known and non-null; otherwise omit the filter
- Verify the source of the key (config, model, service) returns a value; add an explicit null check with a meaningful error
Example fix
// before
query.decisionKey(dmnModel.getDecisionKey()); // may be null
// after
String key = dmnModel.getDecisionKey();
if (key != null) {
query.decisionKey(key);
} Defensive patterns
Strategy: validation
Validate before calling
if (decisionKey == null || decisionKey.isEmpty()) { throw new IllegalArgumentException("decisionKey required for deployment query"); } Type guard
boolean hasDecisionKey(String key) { return key != null && !key.isBlank(); } Try / catch
try { query.decisionKey(key); } catch (FlowableIllegalArgumentException e) { throw new IllegalStateException("Decision key missing in configuration", e); } Prevention
- Source decision keys from the deployed DMN model rather than hand-maintained config
- Fail fast at startup if required decision keys are missing from configuration
When it happens
Trigger: Calling dmnRepositoryService.createDeploymentQuery().decisionKey(null), typically when the key is looked up from configuration, a decision-table reference, or an upstream service response that returned null.
Common situations: Wiring a DMN decision key from application config that is missing; resolving a decision key from a model or BPMN expression that evaluated to null; renaming decision tables and using a stale lookup that no longer matches.
Related errors
- parentDeploymentId is null
- parentDeploymentIdLike is null
- keyLike is null
- decisionDefinitionId is null
- deploymentId is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/39b80d1fa78a553b.
Report an issue: GitHub.