flowable/flowable-engine · critical · IllegalStateException
CMMN engine has not been initialized
Error message
CMMN engine has not been initialized
What it means
In CmmnEngineServicesAutoConfiguration.AlreadyInitializedEngineConfiguration, the cmmnEngine @Bean only re-exposes the already-created default CMMN engine; it assumes the injected ProcessEngine initialization created it. If CmmnEngines.isInitialized() is false, no CMMN engine was built, and Flowable throws IllegalStateException 'CMMN engine has not been initialized'. This fails fast rather than returning a null engine.
Source
Thrown at modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/cmmn/CmmnEngineServicesAutoConfiguration.java:75
/**
* If a process engine is present and no app engine that means that the CmmnEngine was created as part of the process engine.
* Therefore extract it from the CmmnEngines.
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(type = {
"org.flowable.cmmn.engine.CmmnEngine",
"org.flowable.app.engine.AppEngine"
})
@ConditionalOnBean(type = {
"org.flowable.engine.ProcessEngine"
})
static class AlreadyInitializedEngineConfiguration {
@Bean
public CmmnEngine cmmnEngine(@SuppressWarnings("unused") ProcessEngine processEngine) {
// The process engine needs to be injected, as otherwise it won't be initialized, which means that the CmmnEngine is not initialized yet
if (!CmmnEngines.isInitialized()) {
throw new IllegalStateException("CMMN engine has not been initialized");
}
return CmmnEngines.getDefaultCmmnEngine();
}
}
/**
* If an app engine is present that means that the CmmnEngine was created as part of the app engine.
* Therefore extract it from the CmmnEngines.
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(type = {
"org.flowable.cmmn.engine.CmmnEngine"
})
@ConditionalOnBean(type = {
"org.flowable.app.engine.AppEngine"
})
static class AlreadyInitializedAppEngineConfiguration {
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Add/verify flowable-spring-boot-starter-cmmn (or flowable-cmmn-engine) dependency so the CMMN engine actually initializes
- Do not exclude CmmnEngineAutoConfiguration; ensure the process engine configuration includes the CMMN engine
- Inspect startup logs for an earlier CMMN engine creation failure (datasource/schema issues)
- Enable flowable.cmmn.enabled=true and confirm CmmnEngine beans are defined
Example fix
// before (pom.xml) - process engine only <dependency>flowable-spring-boot-starter-process</dependency> // after <dependency>flowable-spring-boot-starter-process</dependency> <dependency>flowable-spring-boot-starter-cmmn</dependency>
Defensive patterns
Strategy: try-catch
Validate before calling
if (!CmmnEngines.isInitialized()) {
throw new IllegalStateException("CMMN engine missing: add flowable-spring-boot-starter-cmmn and keep auto-configuration enabled");
} Try / catch
try {
CmmnEngine engine = CmmnEngines.getDefaultCmmnEngine();
} catch (IllegalStateException e) {
logger.error("CMMN engine not initialized: check cmmn starter dependency and earlier init failures", e);
throw e;
} Prevention
- Include flowable-spring-boot-starter-cmmn whenever CMMN services are used
- Never exclude CmmnEngineAutoConfiguration while depending on CMMN services
- Monitor startup logs for DB/schema failures that abort engine initialization
When it happens
Trigger: Spring context where CmmnEngineServicesAutoConfiguration is activated but the CMMN engine was never initialized — e.g. process engine created without CMMN engine support, or cmmn engine auto-configuration/factory bean excluded or failed earlier.
Common situations: Classpath includes CMMN services auto-configuration but flowable-cmmn-engine/starter is missing or misconfigured; custom configuration builds ProcessEngine without cmmnEngineConfiguration; earlier CMMN init failure (DB schema) silently aborting; excluding CmmnEngineAutoConfiguration while keeping services auto-config.
Related errors
- BPMN engine has not been initialized
- Form engine is not initialized
- Setting variable is not supported for read only delegate exe
- The default CMMN parse handlers should only support one type
- problem retrieving flowable.cmmn.cfg.xml resources on the cl
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5432dce942e924a0.
Report an issue: GitHub.