flowable/flowable-engine · error · FlowableIllegalArgumentException

assigneeLikeIgnoreCase is null

Error message

assigneeLikeIgnoreCase is null

What it means

TaskQuery.taskAssigneeLikeIgnoreCase(String) throws FlowableIllegalArgumentException when the argument is null. The method lowercases the value for case-insensitive matching, which requires a non-null string; the null check happens before toLowerCase to avoid an NPE.

Solutions

  1. Apply the criterion only when the value is non-null.
  2. Use Optional.ofNullable(assigneePart).ifPresent(query::taskAssigneeLikeIgnoreCase) style guards.
  3. Normalize the filter DTO so absent values default to a non-null sentinel or are dropped before query building.
  4. Catch FlowableIllegalArgumentException at the API boundary and return 400.

Example fix

// before
query.taskAssigneeLikeIgnoreCase(filter.getAssignee());
// after
if (filter.getAssignee() != null) {
    query.taskAssigneeLikeIgnoreCase(filter.getAssignee());
}
Defensive patterns

Strategy: validation

Validate before calling

if (assigneeLikeIgnoreCase != null) {
    query.taskAssigneeLikeIgnoreCase(assigneeLikeIgnoreCase);
}

Type guard

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

Try / catch

try {
    query.taskAssigneeLikeIgnoreCase(value);
} catch (FlowableIllegalArgumentException e) {
    throw new BadRequestException("assigneeLikeIgnoreCase must not be null", e);
}

Prevention

When it happens

Trigger: Calling taskAssigneeLikeIgnoreCase(null), commonly from optional case-insensitive assignee search parameters.

Common situations: Search endpoints with optional assignee filters; JSON payloads omitting the field so it deserializes to null; shared filter builders that call every setter unconditionally.

Related errors


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

Appendix: source

Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java:456

    }

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

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

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

View on GitHub (pinned to d6d39ce1c6)