flowable/flowable-engine · error · FlowableIllegalArgumentException
Task nameLikeIgnoreCase is null
Error message
Task nameLikeIgnoreCase is null
What it means
Flowable throws this FlowableIllegalArgumentException when TaskQuery.taskNameLikeIgnoreCase() is called with a null argument. The query API requires every filter criterion to be a non-null value; null is not a valid filter and would produce an ambiguous SQL condition. The message names the specific parameter so the caller knows which criterion was invalid.
Solutions
- Pass a non-null string, e.g. an empty-check first: if (namePart != null) query.taskNameLikeIgnoreCase(namePart);
- Only add the nameLikeIgnoreCase criterion when the user actually supplied a value (conditional query building).
- Default the input to a non-null value such as "" if a match-all behavior is acceptable.
- Catch FlowableIllegalArgumentException at the API boundary and return a 400 to the client.
Example fix
// before
query.taskNameLikeIgnoreCase(request.getNameFilter()); // NPE-ish throw when null
// after
if (request.getNameFilter() != null) {
query.taskNameLikeIgnoreCase(request.getNameFilter());
} Defensive patterns
Strategy: validation
Validate before calling
if (nameLikeIgnoreCase != null) {
query.taskNameLikeIgnoreCase(nameLikeIgnoreCase);
} Type guard
boolean hasText(String s) { return s != null && !s.trim().isEmpty(); } Try / catch
try {
query.taskNameLikeIgnoreCase(value);
} catch (FlowableIllegalArgumentException e) {
throw new BadRequestException("Invalid nameLikeIgnoreCase filter", e);
} Prevention
- Always build Flowable queries conditionally, adding each criterion only when its input is non-null.
- Centralize query building in one helper that performs null filtering for all criteria.
- Validate/normalize request DTOs at the controller layer before touching the query API.
- Remember IgnoreIgnoreCase variants lowercase the input, so they need a real string, not null.
When it happens
Trigger: Calling taskQuery.taskNameLikeIgnoreCase(null), e.g. when the value comes from an uninitialized variable, an absent request parameter, or a map lookup that returned null.
Common situations: REST controllers passing through optional query parameters without defaulting them; bean-property binding that leaves the filter field null; refactors where a previously set literal was replaced by a possibly-null config value.
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/76bfd1a097ea5904.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java:337
@Override
public TaskQueryImpl taskNameLike(String nameLike) {
if (nameLike == null) {
throw new FlowableIllegalArgumentException("Task namelike is null");
}
if (orActive) {
currentOrQueryObject.nameLike = nameLike;
} else {
this.nameLike = nameLike;
}
return this;
}
@Override
public TaskQuery taskNameLikeIgnoreCase(String nameLikeIgnoreCase) {
if (nameLikeIgnoreCase == null) {
throw new FlowableIllegalArgumentException("Task nameLikeIgnoreCase is null");
}
if (orActive) {
currentOrQueryObject.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();
} else {
this.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();
}
return this;
}
@Override
public TaskQueryImpl taskDescription(String description) {
if (description == null) {
throw new FlowableIllegalArgumentException("Description is null");
}
if (orActive) {
currentOrQueryObject.description = description;View on GitHub (pinned to d6d39ce1c6)