flowable/flowable-engine · error · FlowableIllegalArgumentException
keyLike is null
Error message
keyLike is null
What it means
DecisionQueryImpl.decisionKeyLike(String) throws FlowableIllegalArgumentException when keyLike is null. LIKE-based filters require a pattern string; null cannot be turned into a SQL LIKE condition, so the builder rejects it at call time instead of producing a broken query.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DecisionQueryImpl.java:169
throw new FlowableIllegalArgumentException("parentDeploymentId is null");
}
this.parentDeploymentId = parentDeploymentId;
return this;
}
@Override
public DecisionQueryImpl decisionKey(String key) {
if (key == null) {
throw new FlowableIllegalArgumentException("key is null");
}
this.key = key;
return this;
}
@Override
public DecisionQueryImpl decisionKeyLike(String keyLike) {
if (keyLike == null) {
throw new FlowableIllegalArgumentException("keyLike is null");
}
this.keyLike = keyLike;
return this;
}
@Override
public DecisionQueryImpl decisionResourceName(String resourceName) {
if (resourceName == null) {
throw new FlowableIllegalArgumentException("resourceName is null");
}
this.resourceName = resourceName;
return this;
}
@Override
public DecisionQueryImpl decisionResourceNameLike(String resourceNameLike) {
if (resourceNameLike == null) {
throw new FlowableIllegalArgumentException("resourceNameLike is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Only call decisionKeyLike when the pattern is non-null; omit the filter otherwise.
- Default the pattern to a non-null value such as "%" if you truly want all keys.
- Trim/normalize user input before passing it, and treat empty string as 'no filter'.
Example fix
// before
query.decisionKeyLike(searchPattern);
// after
if (searchPattern != null && !searchPattern.isEmpty()) {
query.decisionKeyLike(searchPattern);
} Defensive patterns
Strategy: validation
Validate before calling
if (keyLike != null && !keyLike.isEmpty()) {
query.decisionKeyLike(keyLike);
} Type guard
boolean hasPattern(String p) { return p != null && !p.isEmpty(); } Try / catch
try {
query.decisionKeyLike(keyLike);
} catch (FlowableIllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().contains("keyLike")) {
keyLike = "%"; // fall back to match-all pattern
query.decisionKeyLike(keyLike);
} else { throw e; }
} Prevention
- Normalize empty user input to null and skip the filter
- Default wildcard patterns to "%" rather than null
- Unit-test query builders with null optional parameters
When it happens
Trigger: Calling decisionKeyLike(null) — typically a variable holding a user-supplied pattern (e.g. 'order-%') that was never populated, or code forwarding an optional parameter unconditionally.
Common situations: Search screens where the user left the 'key contains' field blank and the code passes null instead of skipping the filter; typo between a config property name and the variable read into it.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/e06444031ea4152c.
Report an issue: GitHub.