flowable/flowable-engine · error · ActivitiIllegalArgumentException

Task descriptionLikeIgnoreCase is null

Error message

Task descriptionLikeIgnoreCase is null

What it means

TaskQuery.taskDescriptionLikeIgnoreCase(String) rejects null. The pattern is lowercased and stored for case-insensitive matching, but a null argument fails the initial check with ActivitiIllegalArgumentException.

Solutions

  1. Guard with if (pattern != null) before calling
  2. Use Optional to apply the filter only when present
  3. Normalize absent optional filters to a sentinel-free builder path (simply don't call the method)

Example fix

// before
query.taskDescriptionLikeIgnoreCase(request.getDescriptionLike()); // may be null
// after
String pattern = request.getDescriptionLike();
if (pattern != null) {
    query.taskDescriptionLikeIgnoreCase(pattern);
}
Defensive patterns

Strategy: type-guard

Validate before calling

if (descriptionLikeIgnoreCase == null) { /* skip filter */ }

Type guard

void addDescriptionLikeIgnoreCase(TaskQuery query, String pattern) {
    if (pattern != null && !pattern.isEmpty()) {
        query.taskDescriptionLikeIgnoreCase(pattern);
    }
}

Try / catch

try {
    query.taskDescriptionLikeIgnoreCase(pattern);
} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {
    // pattern was null: omit the filter or reject request
}

Prevention

When it happens

Trigger: Calling taskDescriptionLikeIgnoreCase(null), e.g. an optional case-insensitive description filter left unset.

Common situations: Search forms with ignore-case toggles where the pattern was never entered; refactor from taskDescriptionLike to the IgnoreCase variant without adding null guards.

Related errors


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

Appendix: source

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

    }

    @Override
    public TaskQuery taskDescriptionLike(String descriptionLike) {
        if (descriptionLike == null) {
            throw new ActivitiIllegalArgumentException("Task descriptionlike is null");
        }
        if (orActive) {
            currentOrQueryObject.descriptionLike = descriptionLike;
        } else {
            this.descriptionLike = descriptionLike;
        }
        return this;
    }

    @Override
    public TaskQuery taskDescriptionLikeIgnoreCase(String descriptionLikeIgnoreCase) {
        if (descriptionLikeIgnoreCase == null) {
            throw new ActivitiIllegalArgumentException("Task descriptionLikeIgnoreCase is null");
        }
        if (orActive) {
            currentOrQueryObject.descriptionLikeIgnoreCase = descriptionLikeIgnoreCase.toLowerCase();
        } else {
            this.descriptionLikeIgnoreCase = descriptionLikeIgnoreCase.toLowerCase();
        }
        return this;
    }

    @Override
    public TaskQuery taskPriority(Integer priority) {
        if (priority == null) {
            throw new ActivitiIllegalArgumentException("Priority is null");
        }
        if (orActive) {
            currentOrQueryObject.priority = priority;
        } else {
            this.priority = priority;

View on GitHub (pinned to d6d39ce1c6)