flowable/flowable-engine · error · FlowableIllegalArgumentException

AssigneeLike is null

Error message

AssigneeLike is null

What it means

TaskQueryImpl.taskAssigneeLike(String) throws FlowableIllegalArgumentException when assigneeLike is null. It is a LIKE-pattern filter on assignee; null patterns are rejected at build time rather than producing invalid SQL.

Solutions

  1. Only add the assigneeLike criterion when the pattern is non-null.
  2. Build the pattern defensively and skip when the base value is missing.
  3. Default to "%" if match-all assignees is the intended behavior.
  4. Catch FlowableIllegalArgumentException and return a validation error.

Example fix

// before
query.taskAssigneeLike("%" + userPart + "%");
// after
if (userPart != null) {
    query.taskAssigneeLike("%" + userPart + "%");
}
Defensive patterns

Strategy: validation

Validate before calling

if (assigneeLike != null) {
    query.taskAssigneeLike(assigneeLike);
}

Type guard

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

Try / catch

try {
    query.taskAssigneeLike(pattern);
} catch (FlowableIllegalArgumentException e) {
    throw new BadRequestException("assigneeLike pattern must not be null", e);
}

Prevention

When it happens

Trigger: Calling taskAssigneeLike(null), usually when the pattern is derived from optional user input or concatenated wildcard strings built from a null base value.

Common situations: Assignee search boxes with optional input; building "%domain\\" style patterns from a null tenant/user variable; client payloads missing the assigneeLike field.

Related errors


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

Appendix: source

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

    }

    @Override
    public TaskQueryImpl taskAssignee(String assignee) {
        if (assignee == null) {
            throw new FlowableIllegalArgumentException("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 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();

View on GitHub (pinned to d6d39ce1c6)