{"record":{"id":"91501977ac3a75af","repo":"flowable/flowable-engine","slug":"idm-engine-has-not-been-initialized","errorCode":null,"errorMessage":"Idm engine has not been initialized","messagePattern":"Idm engine has not been initialized","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/idm/IdmEngineServicesAutoConfiguration.java","lineNumber":70,"sourceCode":"    /**\n     * If a process engine is present that means that the IdmEngine was created as part of it.\n     * Therefore extract it from the IdmEngines.\n     */\n    @Configuration(proxyBeanMethods = false)\n    @ConditionalOnMissingBean(type = {\n        \"org.flowable.idm.engine.IdmEngine\",\n        \"org.flowable.app.engine.AppEngine\"\n    })\n    @ConditionalOnBean(type = {\n        \"org.flowable.engine.ProcessEngine\"\n    })\n    static class AlreadyInitializedEngineConfiguration {\n\n        @Bean\n        public IdmEngine idmEngine(@SuppressWarnings(\"unused\") ProcessEngine processEngine) {\n            // The process engine needs to be injected, as otherwise it won't be initialized, which means that the IdmEngine is not initialized yet\n            if (!IdmEngines.isInitialized()) {\n                throw new IllegalStateException(\"Idm engine has not been initialized\");\n            }\n            return IdmEngines.getDefaultIdmEngine();\n        }\n    }\n    \n    /**\n     * If an app engine is present that means that the IdmEngine was created as part of it.\n     * Therefore extract it from the IdmEngines.\n     */\n    @Configuration(proxyBeanMethods = false)\n    @ConditionalOnMissingBean(type = {\n        \"org.flowable.idm.engine.IdmEngine\",\n    })\n    @ConditionalOnBean(type = {\n        \"org.flowable.app.engine.AppEngine\"\n    })\n    static class AlreadyInitializedAppEngineConfiguration {\n","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/idm/IdmEngineServicesAutoConfiguration.java#L52-L88","documentation":"IdmEngineServicesAutoConfiguration exposes the already-initialized IDM (identity) engine from the static IdmEngines registry as a bean. If the registry is not initialized when the bean method runs, it throws this IllegalStateException. The injected ProcessEngine normally bootstraps the IDM engine.","triggerScenarios":"Auto-configuration selects AlreadyInitializedEngineConfiguration and idmEngine(ProcessEngine) runs while IdmEngines.isInitialized() is false — no process/IDM engine bootstrap ran beforehand.","commonSituations":"Process engine auto-configuration disabled or failing while IDM beans are still requested; custom engine setup that skips the IDM configurator; dependency conflicts removing flowable-idm-engine.","solutions":["Ensure a ProcessEngine is auto-configured (it initializes the IDM engine by default)","Add the IDM engine configurator explicitly if building engines manually","Let auto-configuration create a standalone IdmEngineConfiguration bean rather than the already-initialized bean","Check startup logs for prior engine initialization failures"],"exampleFix":"// before: manual process engine without IDM\nnew ProcessEngineConfiguration();\n// after\nconfig.addConfigurator(new IdmEngineConfigurator());","handlingStrategy":"validation","validationCode":"if (!IdmEngines.isInitialized()) { throw new IllegalStateException(\"Initialize the IDM engine (via ProcessEngine) first\"); }","typeGuard":"boolean idmAvailable = IdmEngines.isInitialized();","tryCatchPattern":"try { return IdmEngines.getDefaultIdmEngine(); } catch (IllegalStateException e) { /* fallback: build IdmEngineConfiguration */ }","preventionTips":["Keep the process engine auto-configuration enabled (it initializes IDM)","Register IdmEngineConfigurator in manual setups","Keep flowable-idm-engine on the classpath","Check logs for earlier init failures"],"tags":["spring-boot","idm","engine-initialization"],"backgroundTag":"module-init-failed","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"}