flowable/flowable-engine · error · FlowableIllegalArgumentException

Task nameLikeIgnoreCase is null

Error message

Task nameLikeIgnoreCase is null

What it means

Flowable throws this FlowableIllegalArgumentException when TaskQuery.taskNameLikeIgnoreCase() is called with a null argument. The query API requires every filter criterion to be a non-null value; null is not a valid filter and would produce an ambiguous SQL condition. The message names the specific parameter so the caller knows which criterion was invalid.

Solutions

  1. Pass a non-null string, e.g. an empty-check first: if (namePart != null) query.taskNameLikeIgnoreCase(namePart);
  2. Only add the nameLikeIgnoreCase criterion when the user actually supplied a value (conditional query building).
  3. Default the input to a non-null value such as "" if a match-all behavior is acceptable.
  4. Catch FlowableIllegalArgumentException at the API boundary and return a 400 to the client.

Example fix

// before
query.taskNameLikeIgnoreCase(request.getNameFilter()); // NPE-ish throw when null
// after
if (request.getNameFilter() != null) {
    query.taskNameLikeIgnoreCase(request.getNameFilter());
}
Defensive patterns

Strategy: validation

Validate before calling

if (nameLikeIgnoreCase != null) {
    query.taskNameLikeIgnoreCase(nameLikeIgnoreCase);
}

Type guard

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

Try / catch

try {
    query.taskNameLikeIgnoreCase(value);
} catch (FlowableIllegalArgumentException e) {
    throw new BadRequestException("Invalid nameLikeIgnoreCase filter", e);
}

Prevention

When it happens

Trigger: Calling taskQuery.taskNameLikeIgnoreCase(null), e.g. when the value comes from an uninitialized variable, an absent request parameter, or a map lookup that returned null.

Common situations: REST controllers passing through optional query parameters without defaulting them; bean-property binding that leaves the filter field null; refactors where a previously set literal was replaced by a possibly-null config value.

Related errors


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

Appendix: source

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

    @Override
    public TaskQueryImpl taskNameLike(String nameLike) {
        if (nameLike == null) {
            throw new FlowableIllegalArgumentException("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 FlowableIllegalArgumentException("Task nameLikeIgnoreCase is null");
        }

        if (orActive) {
            currentOrQueryObject.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();
        } else {
            this.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();
        }
        return this;
    }

    @Override
    public TaskQueryImpl taskDescription(String description) {
        if (description == null) {
            throw new FlowableIllegalArgumentException("Description is null");
        }

        if (orActive) {
            currentOrQueryObject.description = description;

View on GitHub (pinned to d6d39ce1c6)