flowable/flowable-engine · error · ActivitiIllegalArgumentException
Task descriptionLikeIgnoreCase is null
Error message
Task descriptionLikeIgnoreCase is null
What it means
TaskQuery.taskDescriptionLikeIgnoreCase(String) rejects null. The pattern is lowercased and stored for case-insensitive matching, but a null argument fails the initial check with ActivitiIllegalArgumentException.
Solutions
- Guard with if (pattern != null) before calling
- Use Optional to apply the filter only when present
- Normalize absent optional filters to a sentinel-free builder path (simply don't call the method)
Example fix
// before
query.taskDescriptionLikeIgnoreCase(request.getDescriptionLike()); // may be null
// after
String pattern = request.getDescriptionLike();
if (pattern != null) {
query.taskDescriptionLikeIgnoreCase(pattern);
} Defensive patterns
Strategy: type-guard
Validate before calling
if (descriptionLikeIgnoreCase == null) { /* skip filter */ } Type guard
void addDescriptionLikeIgnoreCase(TaskQuery query, String pattern) {
if (pattern != null && !pattern.isEmpty()) {
query.taskDescriptionLikeIgnoreCase(pattern);
}
} Try / catch
try {
query.taskDescriptionLikeIgnoreCase(pattern);
} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {
// pattern was null: omit the filter or reject request
} Prevention
- Guard all IgnoreCase variants the same way as their base methods
- Validate optional search parameters before mapping to the engine query
- Avoid Optional.orElse(null) patterns feeding query builders
When it happens
Trigger: Calling taskDescriptionLikeIgnoreCase(null), e.g. an optional case-insensitive description filter left unset.
Common situations: Search forms with ignore-case toggles where the pattern was never entered; refactor from taskDescriptionLike to the IgnoreCase variant without adding null guards.
Related errors
- Description is null
- None of the given process categories can be null
- Priority is null
- Task descriptionlike is null
- Task namelike is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/2669e5e75569b039.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java:287
}
@Override
public TaskQuery taskDescriptionLike(String descriptionLike) {
if (descriptionLike == null) {
throw new ActivitiIllegalArgumentException("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 ActivitiIllegalArgumentException("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 ActivitiIllegalArgumentException("Priority is null");
}
if (orActive) {
currentOrQueryObject.priority = priority;
} else {
this.priority = priority;View on GitHub (pinned to d6d39ce1c6)