flowable/flowable-engine · error · FlowableIllegalArgumentException

resourceNameLike is null

Error message

resourceNameLike is null

What it means

EventDefinitionQueryImpl.eventDefinitionResourceNameLike sets a LIKE-pattern filter on the event definition resource name. It throws FlowableIllegalArgumentException when resourceNameLike is null, since a null pattern is an invalid filter value.

Source

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

    @Override
    public EventDefinitionQueryImpl latestVersion() {
        this.latest = true;
        return this;
    }

    @Override
    public EventDefinitionQueryImpl eventDefinitionResourceName(String resourceName) {
        if (resourceName == null) {
            throw new FlowableIllegalArgumentException("resourceName is null");
        }
        this.resourceName = resourceName;
        return this;
    }

    @Override
    public EventDefinitionQueryImpl eventDefinitionResourceNameLike(String resourceNameLike) {
        if (resourceNameLike == null) {
            throw new FlowableIllegalArgumentException("resourceNameLike is null");
        }
        this.resourceNameLike = resourceNameLike;
        return this;
    }

    @Override
    public EventDefinitionQueryImpl tenantId(String tenantId) {
        if (tenantId == null) {
            throw new FlowableIllegalArgumentException("form tenantId is null");
        }
        this.tenantId = tenantId;
        return this;
    }

    @Override
    public EventDefinitionQueryImpl tenantIdLike(String tenantIdLike) {
        if (tenantIdLike == null) {
            throw new FlowableIllegalArgumentException("form tenantId is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass a non-null pattern, using % wildcards as needed (e.g. "%my.event")
  2. Skip the filter call when no pattern is available instead of passing null
  3. Build the pattern with a default value like "%" if you intend a catch-all

Example fix

// before
query.eventDefinitionResourceNameLike(null);
// after
if (pattern != null) {
    query.eventDefinitionResourceNameLike(pattern);
}
Defensive patterns

Strategy: validation

Validate before calling

if (pattern == null || pattern.isEmpty()) { throw new IllegalArgumentException("pattern required for eventDefinitionResourceNameLike()"); }

Type guard

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

Try / catch

try { query.eventDefinitionResourceNameLike(pattern); } catch (FlowableIllegalArgumentException e) { log.warn("pattern null, skipping filter"); }

Prevention

When it happens

Trigger: Calling eventDefinitionResourceNameLike(null), e.g. when a wildcard pattern is built dynamically from user input or an optional configuration entry that is absent.

Common situations: Pattern construction from config placeholders left unset, search UI passing through empty/null filter terms, copy-paste from exact-match call sites.

Related errors


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