flowable/flowable-engine · error · FlowableIllegalArgumentException
keyLike is null
Error message
keyLike is null
What it means
DmnDeploymentQueryImpl.decisionKeyLike(String) throws FlowableIllegalArgumentException when the like-pattern argument is null. The value is inserted into a SQL LIKE clause, so Flowable requires a non-null string pattern and fails fast at the builder call.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java:157
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() {
return orderBy(DeploymentQueryProperty.DEPLOYMENT_ID);
}
@Override
public DmnDeploymentQuery orderByDeploymentTime() {
return orderBy(DeploymentQueryProperty.DEPLOY_TIME);
}
@OverrideView on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass a non-null LIKE pattern such as "prefix%" or "%suffix%"
- Skip the decisionKeyLike(...) call when no filter is intended
- Normalize empty user input to null-and-skip semantics before building the query
Example fix
// before
String pattern = searchForm.getDecisionKeyPattern();
query.decisionKeyLike(pattern);
// after
String pattern = searchForm.getDecisionKeyPattern();
if (pattern != null && !pattern.isEmpty()) {
query.decisionKeyLike(pattern);
} Defensive patterns
Strategy: validation
Validate before calling
if (decisionKeyLike == null || decisionKeyLike.isEmpty()) { throw new IllegalArgumentException("decisionKeyLike pattern required"); } Type guard
boolean isUsablePattern(String p) { return p != null && !p.isEmpty(); } Try / catch
try { query.decisionKeyLike(pattern); } catch (FlowableIllegalArgumentException e) { log.debug("decisionKeyLike not applied: {}", e.getMessage()); } Prevention
- Treat empty search inputs as 'omit filter', not as null passed to the builder
- Centralize pattern-building logic in one helper that guarantees non-null output or skips the filter
When it happens
Trigger: Calling dmnRepositoryService.createDeploymentQuery().decisionKeyLike(null), commonly when the pattern is composed from optional user filter input that was never populated.
Common situations: Wildcard search screens where the user did not enter a decision-key filter; dynamically assembled patterns where an intermediate variable was null; porting queries from process-engine code that allowed null like-criteria.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/44e6533479df02c7.
Report an issue: GitHub.