flowable/flowable-engine · error · FlowableIllegalArgumentException
Task descriptionLikeIgnoreCase is null
Error message
Task descriptionLikeIgnoreCase is null
What it means
TaskQuery.taskDescriptionLikeIgnoreCase() throws FlowableIllegalArgumentException when the argument is null. Besides being non-null, the value is lowercased by the method itself to enable case-insensitive matching, so it must be a real string before the call.
Solutions
- Skip the criterion when the value is null (conditional query building).
- Provide a default non-null pattern value at the DTO/controller layer.
- Use Optional.ofNullable(desc).ifPresent(query::taskDescriptionLikeIgnoreCase) style guards.
- Catch FlowableIllegalArgumentException at the boundary and return 400.
Example fix
// before
query.taskDescriptionLikeIgnoreCase(filter);
// after
if (filter != null) {
query.taskDescriptionLikeIgnoreCase(filter);
} Defensive patterns
Strategy: validation
Validate before calling
if (descriptionLikeIgnoreCase != null) {
query.taskDescriptionLikeIgnoreCase(descriptionLikeIgnoreCase);
} Type guard
boolean hasText(String s) { return s != null && !s.trim().isEmpty(); } Try / catch
try {
query.taskDescriptionLikeIgnoreCase(value);
} catch (FlowableIllegalArgumentException e) {
throw new BadRequestException("descriptionLikeIgnoreCase must not be null", e);
} Prevention
- Guard all IgnoreIgnoreCase criteria: they require non-null values for toLowerCase().
- Normalize optional filters to absent (skip) rather than null (throw).
- Keep filter-building code in one place so null checks are never forgotten.
- Cover optional-filter paths with tests that pass null explicitly.
When it happens
Trigger: Calling taskDescriptionLikeIgnoreCase(null); passing an optional filter from a search request where the parameter was absent.
Common situations: Case-insensitive search endpoints with optional description filters; upstream services sending JSON objects without the field, deserialized to null.
Related errors
- assigneeLikeIgnoreCase is null
- assigneeLikeIgnoreCase is null
- Assignee is null
- Assignee is null
- AssigneeLike is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/e70da16ec05baf70.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java:378
}
@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();
}
return this;
}
@Override
public TaskQuery taskPriority(Integer priority) {
if (priority == null) {
throw new FlowableIllegalArgumentException("Priority is null");
}
if (orActive) {
currentOrQueryObject.priority = priority;
} else {
this.priority = priority;View on GitHub (pinned to d6d39ce1c6)