flowable/flowable-engine · error · ActivitiIllegalArgumentException

event name is null

Error message

event name is null

What it means

ExecutionQueryImpl.eventSubscription (backing messageEventSubscriptionName/signalEventSubscriptionName) throws ActivitiIllegalArgumentException("event name is null") when the subscription eventName is null (and a sibling message when eventType is null). Event-subscription queries require a concrete event name to match against registered message/signal subscriptions.

Solutions

  1. Pass a non-null event name matching the deployed subscription
  2. Verify the event name constant/config value actually resolves at runtime
  3. Only add the event-subscription criterion when an event name is known

Example fix

// before
Execution e = runtimeService.createExecutionQuery()
    .messageEventSubscriptionName(msgName).singleResult();
// after
if (msgName == null) {
    throw new IllegalArgumentException("message name required for subscription query");
}
Execution e = runtimeService.createExecutionQuery()
    .messageEventSubscriptionName(msgName).singleResult();
Defensive patterns

Strategy: validation

Validate before calling

if (eventName != null) { query.messageEventSubscriptionName(eventName); }

Type guard

boolean hasEventName = eventName != null && !eventName.isEmpty();

Try / catch

try { q.messageEventSubscriptionName(name); } catch (ActivitiIllegalArgumentException e) { throw new IllegalStateException("event name unresolved", e); }

Prevention

When it happens

Trigger: Calling query.messageEventSubscriptionName(name) (or signalEventSubscriptionName / eventSubscription directly) with a null event name, e.g. an event constant that failed to resolve.

Common situations: Awaiting a message/signal whose name is read from process configuration or an event payload that is absent; refactors renaming event constants leaving null references; dynamic correlation by event name in integration code.

Related errors


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

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ExecutionQueryImpl.java:250

    @Override
    public ExecutionQuery signalEventSubscription(String signalName) {
        return eventSubscription("signal", signalName);
    }

    @Override
    public ExecutionQuery signalEventSubscriptionName(String signalName) {
        return eventSubscription("signal", signalName);
    }

    @Override
    public ExecutionQuery messageEventSubscriptionName(String messageName) {
        return eventSubscription("message", messageName);
    }

    public ExecutionQuery eventSubscription(String eventType, String eventName) {
        if (eventName == null) {
            throw new ActivitiIllegalArgumentException("event name is null");
        }
        if (eventType == null) {
            throw new ActivitiIllegalArgumentException("event type is null");
        }
        if (eventSubscriptions == null) {
            eventSubscriptions = new ArrayList<>();
        }
        eventSubscriptions.add(new EventSubscriptionQueryValue(eventName, eventType));
        return this;
    }

    @Override
    public ExecutionQuery processVariableValueEquals(String variableName, Object variableValue) {
        return variableValueEquals(variableName, variableValue, false);
    }

    @Override
    public ExecutionQuery processVariableValueEquals(Object variableValue) {

View on GitHub (pinned to d6d39ce1c6)