flowable/flowable-engine · error · FlowableIllegalArgumentException

Task namelike is null

Error message

Task namelike is null

What it means

Thrown by TaskQuery.taskNameLike(String) when the nameLike argument is null. Flowable validates that a wildcard pattern is actually supplied before storing it on the query, throwing FlowableIllegalArgumentException at build time; a null pattern would otherwise produce an undefined SQL LIKE condition.

Solutions

  1. Check for null before calling; skip the taskNameLike filter entirely when the pattern is absent
  2. Normalize input upstream (empty string -> skip filter, or handle as explicit business rule)
  3. For 'no filter' semantics, branch around the call instead of passing null

Example fix

// before
query.taskNameLike(pattern); // pattern may be null
// after
if (pattern != null && !pattern.isEmpty()) {
    query.taskNameLike(pattern);
}
Defensive patterns

Strategy: validation

Validate before calling

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

Try / catch

try {
    query.taskNameLike(pattern);
} catch (FlowableIllegalArgumentException e) {
    // pattern was null; run query without the LIKE filter
}

Prevention

When it happens

Trigger: Calling taskQuery.taskNameLike(null), typically when the pattern variable comes from an optional request parameter or config value that is absent.

Common situations: Passing a search box value straight through without a null check; a lookup that returns null when no pattern was configured; overloads/refactors where the caller assumed null means 'no filter'.

Related errors


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

Appendix: source

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

        final int nameListSize = nameList.size();
        final Collection<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 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();

View on GitHub (pinned to d6d39ce1c6)