flowable/flowable-engine · error · IllegalStateException
Event registry has not been initialized
Error message
Event registry has not been initialized
What it means
The EventRegistryServicesAutoConfiguration exposes the already-initialized event registry engine from the static EventRegistryEngines registry as a Spring bean. If no event registry engine has been initialized when the bean method runs, it throws this IllegalStateException. The injected ProcessEngine is expected to have bootstrapped the event registry engine.
Solutions
- Ensure the ProcessEngine auto-configuration runs and includes the event registry configurator
- Add/verify flowable-event-registry-spring-configurator in the engine configuration
- Let auto-configuration build a standalone EventRegistryEngineConfiguration bean instead of using the already-initialized bean
- Check for earlier engine-init failures in logs that left EventRegistryEngines uninitialized
Example fix
// before: process engine built without event registry ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault(); // after: register the configurator config.addConfigurator(new EventRegistryEngineConfigurator());
Defensive patterns
Strategy: validation
Validate before calling
if (!EventRegistryEngines.isInitialized()) { throw new IllegalStateException("Initialize the event registry engine before requesting the bean"); } Type guard
boolean eventRegistryAvailable = EventRegistryEngines.isInitialized();
Try / catch
try { return EventRegistryEngines.getDefaultEventRegistryEngine(); } catch (IllegalStateException e) { /* build EventRegistryEngineConfiguration locally */ } Prevention
- Register EventRegistryEngineConfigurator in the engine config
- Keep event-registry dependencies aligned with the engine version
- Do not disable process-engine auto-configuration while using event-registry beans
- Check startup logs for bootstrap failures
When it happens
Trigger: Auto-configuration selects AlreadyInitializedEventRegistryConfiguration and eventRegistryEngine(ProcessEngine) runs while EventRegistryEngines.isInitialized() is false — no engine bootstrap initialized an EventRegistryEngine beforehand.
Common situations: Event registry starter present but process engine excluded or failing; manual engine configuration bypassing auto-configuration; missing event-registry dependency in a multi-engine setup.
Related errors
- DMN engine has not been initialized
- Idm engine has not been initialized
- A channel key detection value is required for inbound…
- A channel key detection value is required for the channel…
- A resource name is mandatory
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/512f0351762eb6e2.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/eventregistry/EventRegistryServicesAutoConfiguration.java:72
/**
* If a process engine is present that means that the EventRegistryEngine was created as part of it.
* Therefore extract it from the EventRegistryEngines.
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(type = {
"org.flowable.eventregistry.impl.EventRegistryEngine",
"org.flowable.app.engine.AppEngine"
})
@ConditionalOnBean(type = {
"org.flowable.engine.ProcessEngine"
})
static class AlreadyInitializedEventRegistryConfiguration {
@Bean
public EventRegistryEngine eventRegistryEngine(@SuppressWarnings("unused") ProcessEngine processEngine) {
// The process engine needs to be injected, as otherwise it won't be initialized, which means that the EventRegistryEngine is not initialized yet
if (!EventRegistryEngines.isInitialized()) {
throw new IllegalStateException("Event registry has not been initialized");
}
return EventRegistryEngines.getDefaultEventRegistryEngine();
}
}
/**
* If an app engine is present that means that the EventRegistryEngine was created as part of the app engine.
* Therefore extract it from the EventRegistryEngines.
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(type = {
"org.flowable.eventregistry.impl.EventRegistryEngine"
})
@ConditionalOnBean(type = {
"org.flowable.app.engine.AppEngine"
})
static class AlreadyInitializedAppEngineConfiguration {
View on GitHub (pinned to d6d39ce1c6)