{"record":{"id":"b8b920643ba6eed0","repo":"flowable/flowable-engine","slug":"event-name-is-null-b8b920","errorCode":null,"errorMessage":"event name is null","messagePattern":"event name is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ExecutionQueryImpl.java","lineNumber":250,"sourceCode":"\n    @Override\n    public ExecutionQuery signalEventSubscription(String signalName) {\n        return eventSubscription(\"signal\", signalName);\n    }\n\n    @Override\n    public ExecutionQuery signalEventSubscriptionName(String signalName) {\n        return eventSubscription(\"signal\", signalName);\n    }\n\n    @Override\n    public ExecutionQuery messageEventSubscriptionName(String messageName) {\n        return eventSubscription(\"message\", messageName);\n    }\n\n    public ExecutionQuery eventSubscription(String eventType, String eventName) {\n        if (eventName == null) {\n            throw new ActivitiIllegalArgumentException(\"event name is null\");\n        }\n        if (eventType == null) {\n            throw new ActivitiIllegalArgumentException(\"event type is null\");\n        }\n        if (eventSubscriptions == null) {\n            eventSubscriptions = new ArrayList<>();\n        }\n        eventSubscriptions.add(new EventSubscriptionQueryValue(eventName, eventType));\n        return this;\n    }\n\n    @Override\n    public ExecutionQuery processVariableValueEquals(String variableName, Object variableValue) {\n        return variableValueEquals(variableName, variableValue, false);\n    }\n\n    @Override\n    public ExecutionQuery processVariableValueEquals(Object variableValue) {","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ExecutionQueryImpl.java#L232-L268","documentation":"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.","triggerScenarios":"Calling query.messageEventSubscriptionName(name) (or signalEventSubscriptionName / eventSubscription directly) with a null event name, e.g. an event constant that failed to resolve.","commonSituations":"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.","solutions":["Pass a non-null event name matching the deployed subscription","Verify the event name constant/config value actually resolves at runtime","Only add the event-subscription criterion when an event name is known"],"exampleFix":"// before\nExecution e = runtimeService.createExecutionQuery()\n    .messageEventSubscriptionName(msgName).singleResult();\n// after\nif (msgName == null) {\n    throw new IllegalArgumentException(\"message name required for subscription query\");\n}\nExecution e = runtimeService.createExecutionQuery()\n    .messageEventSubscriptionName(msgName).singleResult();","handlingStrategy":"validation","validationCode":"if (eventName != null) { query.messageEventSubscriptionName(eventName); }","typeGuard":"boolean hasEventName = eventName != null && !eventName.isEmpty();","tryCatchPattern":"try { q.messageEventSubscriptionName(name); } catch (ActivitiIllegalArgumentException e) { throw new IllegalStateException(\"event name unresolved\", e); }","preventionTips":["Define event names as constants so they cannot be null","Validate event configuration at process deployment/startup","Check that payload-driven event names are present before correlation"],"tags":["java","activiti","event-subscription","null-check"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}