{"record":{"id":"1df0fdba261c21f6","repo":"flowable/flowable-engine","slug":"could-not-find-eventhandler-for-event-of-type-e","errorCode":null,"errorMessage":"Could not find eventhandler for event of type '${eventType}' for ${eventSubscriptionEntity}","messagePattern":"Could not find eventhandler for event of type '(.+?)' for (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/EventSubscriptionUtil.java","lineNumber":79,"sourceCode":"                }\n                \n            } else {\n                execution.setVariables(payloadMap);\n            }\n        }\n    }\n\n    protected static void processEventSync(EventSubscriptionEntity eventSubscriptionEntity, Object payload) {\n        // A compensate event needs to be deleted before the handlers are called\n        ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration();\n        if (eventSubscriptionEntity instanceof CompensateEventSubscriptionEntity) {\n            processEngineConfiguration.getEventSubscriptionServiceConfiguration().getEventSubscriptionService().deleteEventSubscription(eventSubscriptionEntity);\n            CountingEntityUtil.handleDeleteEventSubscriptionEntityCount(eventSubscriptionEntity);\n        }\n\n        EventHandler eventHandler = processEngineConfiguration.getEventHandler(eventSubscriptionEntity.getEventType());\n        if (eventHandler == null) {\n            throw new FlowableException(\"Could not find eventhandler for event of type '\" + eventSubscriptionEntity.getEventType() + \"' for \" + eventSubscriptionEntity);\n        }\n        eventHandler.handleEvent(eventSubscriptionEntity, payload, CommandContextUtil.getCommandContext());\n    }\n\n    protected static void scheduleEventAsync(EventSubscriptionEntity eventSubscriptionEntity, Object payload) {\n        CommandContext commandContext = CommandContextUtil.getCommandContext();\n        JobService jobService = CommandContextUtil.getJobService(commandContext);\n        JobEntity message = jobService.createJob();\n        message.setJobType(JobEntity.JOB_TYPE_MESSAGE);\n        message.setJobHandlerType(ProcessEventJobHandler.TYPE);\n        message.setElementId(eventSubscriptionEntity.getActivityId());\n        message.setJobHandlerConfiguration(eventSubscriptionEntity.getId());\n        message.setTenantId(eventSubscriptionEntity.getTenantId());\n        \n        String executionId = eventSubscriptionEntity.getExecutionId();\n        \n        if (StringUtils.isNotEmpty(executionId)) {\n            ExecutionEntity execution = CommandContextUtil.getExecutionEntityManager(commandContext).findById(executionId);","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/EventSubscriptionUtil.java#L61-L97","documentation":"Flowable's event subscription processing looks up an EventHandler implementation registered on the ProcessEngineConfiguration for the event subscription's event type (e.g. message, signal, compensation). If no handler is registered for that event type, processEventSync throws this FlowableException rather than silently dropping the event. This indicates either a corrupted/unknown event subscription entity or a missing event-handler registration.","triggerScenarios":"An EventSubscriptionEntity is delivered synchronously via eventReceived -> processEventSync, and processEngineConfiguration.getEventHandler(eventType) returns null because no EventHandler was registered for that subscription's getEventType().","commonSituations":"Custom event types registered in one engine node but not another; process definitions migrated from another BPMN engine that created subscription types this engine does not know; custom event subscription handling code that inserts subscriptions without registering handlers; classpath differences between cluster nodes.","solutions":["Register an EventHandler for the event type via ProcessEngineConfiguration's event handler registry (custom event handlers must be registered on every engine instance).","Check for stale/orphaned rows in the event subscription tables (ACT_RU_EVENT_SUBSCR) with unknown event types and delete or correct them.","Verify all cluster nodes run identical engine versions and configuration so handler registrations match.","Confirm the event type string on the subscription matches the type a handler was registered under (case/typo check)."],"exampleFix":"// before: custom event thrown without handler\nruntimeService.dispatchEvent(myCustomEvent);\n\n// after: register handler first\nprocessEngineConfiguration.setPostBpmnParseHandlers(...);\nprocessEngineConfiguration.addEventHandler(\"myCustomType\", new MyCustomEventHandler());","handlingStrategy":"validation","validationCode":"// ensure a handler exists before dispatching\nif (processEngineConfiguration.getEventHandler(eventType) == null) {\n    throw new IllegalStateException(\"No EventHandler registered for type \" + eventType);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Register all custom EventHandlers in a shared configuration module used by every engine instance","Audit ACT_RU_EVENT_SUBSCR for unknown event types after migrations","Keep engine versions and configs identical across cluster nodes"],"tags":["event-subscription","missing-handler","configuration"],"backgroundTag":"missing-dependency","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}