flowable/flowable-engine · error · FlowableIllegalArgumentException

keyLikeIgnoreCase is null

Error message

keyLikeIgnoreCase is null

What it means

ChannelDefinitionQuery.channelDefinitionKeyLikeIgnoreCase() throws FlowableIllegalArgumentException when the case-insensitive LIKE pattern is null. The builder validates the argument up front; a null pattern cannot form a valid case-insensitive LIKE filter, so the query construction fails immediately.

Solutions

  1. Pass a non-null pattern string (wildcards % and _ are honored by the underlying LIKE)
  2. Guard the call: only invoke channelDefinitionKeyLikeIgnoreCase when the term is non-null
  3. Omit the filter entirely when there is no search term instead of passing null
  4. Normalize an empty search input to a wildcard or drop the filter before building the query

Example fix

// before
query.channelDefinitionKeyLikeIgnoreCase(searchTerm); // searchTerm may be null
// after
if (searchTerm != null && !searchTerm.isEmpty()) {
    query.channelDefinitionKeyLikeIgnoreCase("%" + searchTerm.toLowerCase() + "%");
}
Defensive patterns

Strategy: validation

Validate before calling

if (keyLikeIgnoreCase == null || keyLikeIgnoreCase.isEmpty()) {
    throw new IllegalArgumentException("search term is required");
}
query.channelDefinitionKeyLikeIgnoreCase("%" + keyLikeIgnoreCase + "%");

Type guard

boolean hasSearchTerm(String term) {
    return term != null && !term.isBlank();
}

Try / catch

try {
    query.channelDefinitionKeyLikeIgnoreCase(term);
} catch (FlowableIllegalArgumentException e) {
    logger.warn("Invalid case-insensitive key pattern: {}", e.getMessage());
}

Prevention

When it happens

Trigger: Calling channelDefinitionQuery().channelDefinitionKeyLikeIgnoreCase(null), typically with a pattern read from nullable user input, a search box value, or configuration.

Common situations: Implementing case-insensitive channel search where the search term was never set; frameworks injecting null when the request parameter is absent.

Related errors


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

Appendix: source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/ChannelDefinitionQueryImpl.java:191

            throw new FlowableIllegalArgumentException("key is null");
        }
        this.key = key;
        return this;
    }

    @Override
    public ChannelDefinitionQueryImpl channelDefinitionKeyLike(String keyLike) {
        if (keyLike == null) {
            throw new FlowableIllegalArgumentException("keyLike is null");
        }
        this.keyLike = keyLike;
        return this;
    }
    
    @Override
    public ChannelDefinitionQuery channelDefinitionKeyLikeIgnoreCase(String keyLikeIgnoreCase) {
        if (keyLikeIgnoreCase == null) {
            throw new FlowableIllegalArgumentException("keyLikeIgnoreCase is null");
        }
        this.keyLikeIgnoreCase = keyLikeIgnoreCase;
        return this;
    }

    @Override
    public ChannelDefinitionQueryImpl channelVersion(Integer version) {
        checkVersion(version);
        this.version = version;
        return this;
    }

    @Override
    public ChannelDefinitionQueryImpl channelVersionGreaterThan(Integer channelVersion) {
        checkVersion(channelVersion);
        this.versionGt = channelVersion;
        return this;
    }

View on GitHub (pinned to d6d39ce1c6)