{"record":{"id":"dcb715aca77faf7c","repo":"Activiti/Activiti","slug":"could-not-find-eventhandler-for-event-of-type-e","errorCode":null,"errorMessage":"Could not find eventhandler for event of type '${eventSubscriptionEntity.getEventType()}'.","messagePattern":"Could not find eventhandler for event of type '(.+?)'\\.","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"activiti-core/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/EventSubscriptionEntityManagerImpl.java","lineNumber":347,"sourceCode":"    public void eventReceived(EventSubscriptionEntity eventSubscriptionEntity, Object payload, boolean processASync) {\n        if (processASync) {\n            scheduleEventAsync(eventSubscriptionEntity, payload);\n        } else {\n            processEventSync(eventSubscriptionEntity, payload);\n        }\n    }\n\n    protected void processEventSync(EventSubscriptionEntity eventSubscriptionEntity, Object payload) {\n        // A compensate event needs to be deleted before the handlers are called\n        if (eventSubscriptionEntity instanceof CompensateEventSubscriptionEntity) {\n            delete(eventSubscriptionEntity);\n        }\n\n        EventHandler eventHandler = getProcessEngineConfiguration().getEventHandler(\n            eventSubscriptionEntity.getEventType()\n        );\n        if (eventHandler == null) {\n            throw new ActivitiException(\n                \"Could not find eventhandler for event of type '\" + eventSubscriptionEntity.getEventType() + \"'.\"\n            );\n        }\n        eventHandler.handleEvent(eventSubscriptionEntity, payload, getCommandContext());\n    }\n\n    protected void scheduleEventAsync(EventSubscriptionEntity eventSubscriptionEntity, Object payload) {\n        JobEntity message = getJobEntityManager().create();\n        message.setJobType(JobEntity.JOB_TYPE_MESSAGE);\n        message.setJobHandlerType(ProcessEventJobHandler.TYPE);\n        message.setJobHandlerConfiguration(eventSubscriptionEntity.getId());\n        message.setTenantId(eventSubscriptionEntity.getTenantId());\n\n        // TODO: support payload\n        // if(payload != null) {\n        // message.setEventPayload(payload);\n        // }\n","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/Activiti/Activiti/blob/56435b1a97deeafdc09dd40074b056c89fba5a8a/activiti-core/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/EventSubscriptionEntityManagerImpl.java#L329-L365","documentation":"Activiti throws this ActivitiException when an event subscription fires but no EventHandler is registered in the ProcessEngineConfiguration for that event's type. processEventSync looks up the handler from the eventHandlers map and aborts when it is null. It means the engine encountered an event type (e.g. a custom signal/message event or signal created at runtime) that has no handler wired.","triggerScenarios":"eventReceived/processEventSync processing an EventSubscriptionEntity whose getEventType() is not present in processEngineConfiguration.getEventHandlers() — e.g. custom event types, signals dispatched via runtimeService.signalEventReceived with an unknown type, or handlers removed from config.","commonSituations":"Custom event subscriptions added programmatically without registering a matching EventHandlerFactory in config; upgrade to a newer Activiti where a built-in handler class was renamed/removed; typo in event type string when creating the subscription.","solutions":["Register an EventHandler for the type in ProcessEngineConfiguration (setEventHandlers / addEventHandler / custom EventHandlerFactory covering the event type).","Log eventSubscriptionEntity.getEventType() at the failure point and confirm what type is actually flowing through.","If it is a standard signal/message, do not create EventSubscriptionEntity rows manually — use runtimeService APIs so the engine wires the right handlers.","After an upgrade, review activiti event handler configuration against the new version's handler classes."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Object handler = ProcessEngines.getDefaultProcessEngine()\n    .getProcessEngineConfiguration().getEventHandlers().get(eventType);\nif (handler == null) throw new IllegalStateException(\"No EventHandler registered for \" + eventType);","typeGuard":null,"tryCatchPattern":"try {\n    runtimeService.signalEventReceived(signalName, payload);\n} catch (org.activiti.engine.ActivitiException e) {\n    if (e.getMessage().startsWith(\"Could not find eventhandler\")) {\n        log.error(\"Missing EventHandler for signal {}\", signalName, e);\n    }\n    throw e;\n}","preventionTips":["Register custom EventHandlerFactories in ProcessEngineConfiguration at boot","Create subscriptions via runtimeService APIs, not direct entity manipulation","Re-check event handler config when upgrading Activiti versions"],"tags":["event-handling","configuration","event-subscription"],"backgroundTag":"missing-config-key","analyzedSha":"56435b1a97deeafdc09dd40074b056c89fba5a8a","analyzedAt":"2026-09-09T21:00:06.703Z","contentChangedAt":"2026-09-09T21:00:06.703Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}