flowable/flowable-engine · error · ActivitiIllegalArgumentException
Task namelike is null
Error message
Task namelike is null
What it means
Fluent-setter validation in flowable5 TaskQueryImpl.taskNameLike: a null LIKE pattern was passed to the task-name filter and rejected as caller error.
Solutions
- Guard the call: only invoke taskNameLike when the value is non-null
- Use a null-safe default such as a wildcard only when a pattern is genuinely provided
- Let the query builder be conditional: if (pattern != null) query.taskNameLike(pattern);
Example fix
// before
String nameLike = params.get("nameLike");
query.taskNameLike(nameLike);
// after
String nameLike = params.get("nameLike");
if (nameLike != null) {
query.taskNameLike(nameLike);
} Defensive patterns
Strategy: type-guard
Validate before calling
Objects.requireNonNull(nameLike, "taskNameLike pattern must not be null"); // or skip the call entirely
Type guard
void addNameLikeFilter(TaskQuery query, String nameLike) {
if (nameLike != null) {
query.taskNameLike(nameLike);
}
} Try / catch
try {
query.taskNameLike(pattern);
} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {
// pattern was null: apply no name filter or return 400
} Prevention
- Treat all optional query criteria as nullable and guard each call
- Convert empty/absent inputs to 'no filter' at the API boundary
- Prefer Optional over null for optional search fields
When it happens
Trigger: Calling taskNameLike(null), typically when the value comes from a variable/optional field that was never initialized.
Common situations: Binding a search-form field straight into taskNameLike without checking presence; a Map/DTO lookup that returns null for an absent key; Optional handled with orElse(null).
Related errors
- Description is null
- None of the given process categories can be null
- Priority is null
- Task descriptionlike is null
- Task descriptionLikeIgnoreCase is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/75c6eafeb9d4336a.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java:232
final int nameListSize = nameList.size();
final List<String> caseIgnoredNameList = new ArrayList<>(nameListSize);
for (String name : nameList) {
caseIgnoredNameList.add(name.toLowerCase());
}
if (orActive) {
this.currentOrQueryObject.nameListIgnoreCase = caseIgnoredNameList;
} else {
this.nameListIgnoreCase = caseIgnoredNameList;
}
return this;
}
@Override
public TaskQueryImpl taskNameLike(String nameLike) {
if (nameLike == null) {
throw new ActivitiIllegalArgumentException("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 ActivitiIllegalArgumentException("Task nameLikeIgnoreCase is null");
}
if (orActive) {
currentOrQueryObject.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();View on GitHub (pinned to d6d39ce1c6)