flowable/flowable-engine · error · ActivitiIllegalArgumentException

Provided event name is null

Error message

Provided event name is null

What it means

Thrown by EventSubscriptionQueryImpl.eventName when a null event name is supplied as a query criterion. Activiti validates each query criterion setter argument immediately so invalid queries fail at construction, keeping the later executeQuery path free of null-filter edge cases. It indicates the caller passed a null filter value that the API does not accept.

Solutions

  1. Guard the event name with a null check and only call eventName when non-null
  2. Provide a concrete event name; if filtering by name is optional, omit the setter call
  3. Correct the source of the name (config property, process variable) so it is populated before querying
  4. If both name and id may be absent, decide the filtering strategy explicitly instead of passing null

Example fix

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

Strategy: validation

Validate before calling

if (eventName == null) { throw new IllegalArgumentException("eventName must be non-null before querying"); }
query.eventName(eventName);

Type guard

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

Try / catch

try {
    query.eventName(name);
} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {
    // name was null: supply a value or drop the criterion
}

Prevention

When it happens

Trigger: Calling runtimeService.createEventSubscriptionQuery().eventName(null), typically when the event name comes from a variable, message ref, or process variable that is null.

Common situations: Message/signal name read from configuration or a process variable that was never set; passing a result of a getEventName() on an entity that lacks a name; template-generated query code where the name parameter is optional but unconditionally passed.

Related errors


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

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/EventSubscriptionQueryImpl.java:57

    public EventSubscriptionQueryImpl(CommandContext commandContext) {
        super(commandContext);
    }

    public EventSubscriptionQueryImpl(CommandExecutor commandExecutor) {
        super(commandExecutor);
    }

    public EventSubscriptionQueryImpl eventSubscriptionId(String id) {
        if (eventSubscriptionId == null) {
            throw new ActivitiIllegalArgumentException("Provided event subscription id is null");
        }
        this.eventSubscriptionId = id;
        return this;
    }

    public EventSubscriptionQueryImpl eventName(String eventName) {
        if (eventName == null) {
            throw new ActivitiIllegalArgumentException("Provided event name is null");
        }
        this.eventName = eventName;
        return this;
    }

    public EventSubscriptionQueryImpl executionId(String executionId) {
        if (executionId == null) {
            throw new ActivitiIllegalArgumentException("Provided execution id is null");
        }
        this.executionId = executionId;
        return this;
    }

    public EventSubscriptionQueryImpl processInstanceId(String processInstanceId) {
        if (processInstanceId == null) {
            throw new ActivitiIllegalArgumentException("Provided process instance id is null");
        }
        this.processInstanceId = processInstanceId;

View on GitHub (pinned to d6d39ce1c6)