flowable/flowable-engine · error · ActivitiIllegalArgumentException

AssigneeLike is null

Error message

AssigneeLike is null

What it means

Thrown by TaskQueryImpl.taskAssigneeLike(String) when the assigneeLike argument is null. This setter performs a SQL LIKE match on the assignee column; a null pattern cannot be converted to a LIKE predicate, so the library raises ActivitiIllegalArgumentException at query construction time.

Solutions

  1. Pass a non-null pattern, e.g. taskAssigneeLike("%" + term + "%").
  2. Only call taskAssigneeLike when the search term is non-null/non-blank.
  3. Convert empty search input to a wildcard or drop the filter entirely.
  4. Normalize nulls to "" upstream and treat blank as 'no filter'.

Example fix

// before
String term = request.getAssigneeSearch(); // may be null
query.taskAssigneeLike("%" + term + "%");

// after
String term = request.getAssigneeSearch();
if (term != null && !term.trim().isEmpty()) {
    query.taskAssigneeLike("%" + term.trim() + "%");
}
Defensive patterns

Strategy: validation

Validate before calling

if (pattern != null && !pattern.trim().isEmpty()) {
    query.taskAssigneeLike("%" + pattern.trim() + "%");
}

Type guard

boolean hasSearchPattern(String s) { return s != null && !s.trim().isEmpty(); }

Try / catch

try {
    query.taskAssigneeLike(pattern);
} catch (ActivitiIllegalArgumentException e) {
    throw new BadRequestException("Assignee pattern invalid: " + e.getMessage());
}

Prevention

When it happens

Trigger: Calling taskQuery.taskAssigneeLike(null) or passing a null-derived pattern variable (e.g. search term that defaulted to null).

Common situations: A search box whose value is null instead of empty string; a generic filter mapper that forwards null fields straight into the query builder.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/e92da9e2a3010281. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java:352

    }

    @Override
    public TaskQueryImpl taskAssignee(String assignee) {
        if (assignee == null) {
            throw new ActivitiIllegalArgumentException("Assignee is null");
        }
        if (orActive) {
            currentOrQueryObject.assignee = assignee;
        } else {
            this.assignee = assignee;
        }
        return this;
    }

    @Override
    public TaskQueryImpl taskAssigneeLike(String assigneeLike) {
        if (assigneeLike == null) {
            throw new ActivitiIllegalArgumentException("AssigneeLike is null");
        }
        if (orActive) {
            currentOrQueryObject.assigneeLike = assignee;
        } else {
            this.assigneeLike = assigneeLike;
        }
        return this;
    }

    @Override
    public TaskQuery taskAssigneeLikeIgnoreCase(String assigneeLikeIgnoreCase) {
        if (assigneeLikeIgnoreCase == null) {
            throw new ActivitiIllegalArgumentException("assigneeLikeIgnoreCase is null");
        }
        if (orActive) {
            currentOrQueryObject.assigneeLikeIgnoreCase = assigneeLikeIgnoreCase.toLowerCase();
        } else {
            this.assigneeLikeIgnoreCase = assigneeLikeIgnoreCase.toLowerCase();

View on GitHub (pinned to d6d39ce1c6)