{"record":{"id":"ead8cd3d0a39aa66","repo":"flowable/flowable-engine","slug":"event-type-cannot-be-null","errorCode":null,"errorMessage":"Event type cannot be null.","messagePattern":"Event type cannot be null\\.","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/event/FlowableEventSupport.java","lineNumber":93,"sourceCode":"            }\n        }\n    }\n\n    public void removeEventListener(FlowableEventListener listenerToRemove) {\n        eventListeners.remove(listenerToRemove);\n\n        for (List<FlowableEventListener> listeners : typedListeners.values()) {\n            listeners.remove(listenerToRemove);\n        }\n    }\n\n    public void dispatchEvent(FlowableEvent event) {\n        if (event == null) {\n            throw new FlowableIllegalArgumentException(\"Event cannot be null.\");\n        }\n\n        if (event.getType() == null) {\n            throw new FlowableIllegalArgumentException(\"Event type cannot be null.\");\n        }\n\n        // Call global listeners\n        if (!eventListeners.isEmpty()) {\n            for (FlowableEventListener listener : eventListeners) {\n                dispatchEvent(event, listener);\n            }\n        }\n\n        // Call typed listeners, if any\n        List<FlowableEventListener> typed = typedListeners.get(event.getType());\n        if (typed != null && !typed.isEmpty()) {\n            for (FlowableEventListener listener : typed) {\n                dispatchEvent(event, listener);\n            }\n        }\n    }\n","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/event/FlowableEventSupport.java#L75-L111","documentation":"Argument guard in FlowableEventSupport.dispatchEvent: the event object exists but its getType() returns null. The dispatcher routes events to listeners by type, so an event without a type cannot be delivered and is rejected.","triggerScenarios":"Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/event/FlowableEventSupport.java:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set a FlowableEventType on every custom event before dispatching","Reuse the engine's standard event types or well-formed custom type constants"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}