flowable/flowable-engine · error · FlowableIllegalArgumentException
Task descriptionlike is null
Error message
Task descriptionlike is null
What it means
TaskQuery.taskDescriptionLike() throws FlowableIllegalArgumentException when the like-pattern argument is null. Like filters require a pattern string (may contain % wildcards); null is rejected immediately so the generated SQL stays valid. Note the message uses the internal lowercase spelling 'descriptionlike'.
Solutions
- Guard the call: only invoke taskDescriptionLike when the pattern is non-null.
- Build the pattern defensively: String p = input == null ? null : "%" + input + "%"; and skip if p == null.
- Default the input to "%" to match all descriptions if that behavior is desired.
- Catch FlowableIllegalArgumentException and return a client-side validation error.
Example fix
// before
query.taskDescriptionLike("%" + input + "%"); // throws when input is null
// after
if (input != null) {
query.taskDescriptionLike("%" + input + "%");
} Defensive patterns
Strategy: validation
Validate before calling
if (descriptionLike != null) {
query.taskDescriptionLike(descriptionLike);
} Type guard
boolean isLikePattern(String s) { return s != null && !s.isEmpty(); } Try / catch
try {
query.taskDescriptionLike(pattern);
} catch (FlowableIllegalArgumentException e) {
throw new BadRequestException("descriptionLike pattern required", e);
} Prevention
- Build LIKE patterns with null-safe helpers (StringUtils.defaultString, etc.).
- Escape user-supplied % and _ before concatenating patterns.
- Skip like-criteria when the base input is null instead of constructing "%null%".
- Validate optional search parameters before query construction.
When it happens
Trigger: Calling taskDescriptionLike(null), typically when the pattern is built from user input or a concatenated wildcard string whose base value was null.
Common situations: Building patterns like "%" + userInput + "%" where userInput is null; optional search fields forwarded unchecked; API clients omitting the descriptionLike query parameter.
Related errors
- Candidate user is null
- Description is null
- Involved groups are null
- Involved user is null
- Max Priority is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/a7fdd868fff10cf1.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java:365
@Override
public TaskQueryImpl taskDescription(String description) {
if (description == null) {
throw new FlowableIllegalArgumentException("Description is null");
}
if (orActive) {
currentOrQueryObject.description = description;
} else {
this.description = description;
}
return this;
}
@Override
public TaskQuery taskDescriptionLike(String descriptionLike) {
if (descriptionLike == null) {
throw new FlowableIllegalArgumentException("Task descriptionlike is null");
}
if (orActive) {
currentOrQueryObject.descriptionLike = descriptionLike;
} else {
this.descriptionLike = descriptionLike;
}
return this;
}
@Override
public TaskQuery taskDescriptionLikeIgnoreCase(String descriptionLikeIgnoreCase) {
if (descriptionLikeIgnoreCase == null) {
throw new FlowableIllegalArgumentException("Task descriptionLikeIgnoreCase is null");
}
if (orActive) {
currentOrQueryObject.descriptionLikeIgnoreCase = descriptionLikeIgnoreCase.toLowerCase();
} else {
this.descriptionLikeIgnoreCase = descriptionLikeIgnoreCase.toLowerCase();View on GitHub (pinned to d6d39ce1c6)