flowable/flowable-engine · error · ActivitiIllegalArgumentException
Description is null
Error message
Description is null
What it means
TaskQuery.taskDescription(String) requires a non-null exact description value. A null would not define a usable equality filter, so the engine throws ActivitiIllegalArgumentException during query construction.
Solutions
- Skip the filter when description is null: guard with an if-check before calling
- Use taskDescriptionLike with a non-null pattern if partial matching is intended (still guard for null)
- Validate at the API layer that a description filter is only sent when present
Example fix
// before
query.taskDescription(task.getDescription()); // may be null
// after
if (task.getDescription() != null) {
query.taskDescription(task.getDescription());
} Defensive patterns
Strategy: type-guard
Validate before calling
if (description == null) { /* omit exact-description filter */ } Type guard
void addDescriptionFilter(TaskQuery query, String description) {
if (description != null) {
query.taskDescription(description);
}
} Try / catch
try {
query.taskDescription(description);
} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {
// description was null; rebuild without the filter
} Prevention
- Never pass entity fields that may be null directly into exact-match criteria
- Validate request DTOs so optional filters are absent rather than null
- Add integration tests for queries built from sparse data
When it happens
Trigger: Calling taskDescription(null), commonly when the description comes from a task variable, DTO field, or request parameter that was absent.
Common situations: Filtering tasks by a description copied from another entity that may lack one; deserialized JSON missing the description key; DB joins producing null descriptions.
Related errors
- None of the given process categories can be null
- Priority is null
- Task descriptionlike is null
- Task descriptionLikeIgnoreCase is null
- Task namelike is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/615eddd36b5d76ef.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java:260
@Override
public TaskQuery taskNameLikeIgnoreCase(String nameLikeIgnoreCase) {
if (nameLikeIgnoreCase == null) {
throw new ActivitiIllegalArgumentException("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 ActivitiIllegalArgumentException("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 ActivitiIllegalArgumentException("Task descriptionlike is null");
}
if (orActive) {
currentOrQueryObject.descriptionLike = descriptionLike;
} else {View on GitHub (pinned to d6d39ce1c6)