flowable/flowable-engine · error · ActivitiIllegalArgumentException

assigneeLikeIgnoreCase is null

Error message

assigneeLikeIgnoreCase is null

What it means

Thrown by TaskQueryImpl.taskAssigneeLikeIgnoreCase(String) when the assigneeLikeIgnoreCase argument is null. This setter lower-cases the pattern for case-insensitive LIKE matching; calling toLowerCase() on null would NPE, so an explicit ActivitiIllegalArgumentException check precedes it.

Solutions

  1. Pass a non-null pattern (it will be lower-cased internally).
  2. Skip the filter when the term is null: if (term != null) query.taskAssigneeLikeIgnoreCase(term);
  3. Default the term to an empty/wildcard string when appropriate.
  4. Add bean validation (@NotBlank) on the DTO field feeding the query.

Example fix

// before
query.taskAssigneeLikeIgnoreCase(filter.getAssigneePattern());

// after
String pattern = filter.getAssigneePattern();
if (pattern != null) {
    query.taskAssigneeLikeIgnoreCase(pattern);
}
Defensive patterns

Strategy: validation

Validate before calling

if (pattern != null && !pattern.trim().isEmpty()) {
    query.taskAssigneeLikeIgnoreCase(pattern.trim());
}

Type guard

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

Try / catch

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

Prevention

When it happens

Trigger: Calling taskQuery.taskAssigneeLikeIgnoreCase(null) or supplying a null search term from an unset filter/request parameter.

Common situations: Case-insensitive search feature wired to an optional input that the client omitted; migration from taskAssigneeLike to its ignore-case variant without adjusting null handling.

Related errors


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

Appendix: source

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

    }

    @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();
        }
        return this;
    }

    @Override
    public TaskQuery taskAssigneeIds(List<String> assigneeIds) {
        if (assigneeIds == null) {
            throw new ActivitiIllegalArgumentException("Task assignee list is null");
        }
        if (assigneeIds.isEmpty()) {
            throw new ActivitiIllegalArgumentException("Task assignee list is empty");
        }
        for (String assignee : assigneeIds) {

View on GitHub (pinned to d6d39ce1c6)