flowable/flowable-engine · error · FlowableIllegalArgumentException
Description is null
Error message
Description is null
What it means
TaskQueryImpl.taskDescription() rejects a null description with FlowableIllegalArgumentException. Description is an exact-match filter on the task's description column; a null argument cannot express a meaningful equality predicate, so the library fails fast at query-build time instead of producing a broken query.
Solutions
- Check for null before adding the criterion and skip the filter when absent.
- Coerce blank input to "" if an exact empty-description match is intended.
- Make the DTO field default to "" so binding never yields null.
- Wrap query construction in try-catch on FlowableIllegalArgumentException and surface a validation error.
Example fix
// before
query.taskDescription(criteria.getDescription());
// after
if (criteria.getDescription() != null) {
query.taskDescription(criteria.getDescription());
} Defensive patterns
Strategy: validation
Validate before calling
if (description != null) {
query.taskDescription(description);
} Type guard
boolean isPresent(String s) { return s != null; } Try / catch
try {
query.taskDescription(description);
} catch (FlowableIllegalArgumentException e) {
throw new BadRequestException("description filter must not be null", e);
} Prevention
- Treat null as 'no filter' in your own filter DTOs and skip the setter.
- Distinguish 'no filter' (skip) from 'match empty string' (pass "").
- Default DTO string fields to "" where an exact empty match is meaningful.
- Add unit tests covering optional-filter combinations.
When it happens
Trigger: Calling taskQuery.taskDescription(null) directly, or via dynamic query builders that forward an unset/unbound description field.
Common situations: Search forms where the description box was left blank and the raw value was forwarded; deserialized DTOs missing the description property; code that assumed an empty string would be passed instead of null.
Related errors
- Candidate user is null
- Involved groups are null
- Involved user is null
- Max Priority is null
- Min Priority is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c549d3e8a162f51e.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java:351
@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;
} 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 {View on GitHub (pinned to d6d39ce1c6)