flowable/flowable-engine · error · FlowableException
no org.flowable.idm.engine.IdmEngine defined in the applicat
Error message
no org.flowable.idm.engine.IdmEngine defined in the application context ${resource} What it means
FlowableException thrown by SpringIdmConfigurationHelper.buildIdmEngine when the Spring XML application context loaded from the given URL defines no bean of type org.flowable.idm.engine.IdmEngine. The helper requires the context to actually instantiate an IdmEngine bean, which it then returns.
Source
Thrown at modules/flowable-idm-spring/src/main/java/org/flowable/idm/spring/SpringIdmConfigurationHelper.java:40
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;
import org.springframework.core.io.UrlResource;
/**
* @author Tom Baeyens
*/
public class SpringIdmConfigurationHelper {
private static final Logger LOGGER = LoggerFactory.getLogger(SpringIdmConfigurationHelper.class);
public static IdmEngine buildIdmEngine(URL resource) {
LOGGER.debug("==== BUILDING SPRING APPLICATION CONTEXT AND IDM ENGINE =========================================");
ApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource));
Map<String, IdmEngine> beansOfType = applicationContext.getBeansOfType(IdmEngine.class);
if ((beansOfType == null) || beansOfType.isEmpty()) {
throw new FlowableException("no " + IdmEngine.class.getName() + " defined in the application context " + resource);
}
IdmEngine idmEngine = beansOfType.values().iterator().next();
LOGGER.debug("==== SPRING IDM ENGINE CREATED ==================================================================");
return idmEngine;
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Add an IdmEngine bean to the Spring XML context, e.g. a bean created via SpringIdmEngineConfiguration / IdmEngineFactoryBean
- Verify the URL/resource points at the intended application context file
- Check the bean's class actually implements org.flowable.idm.engine.IdmEngine (not just IdmEngineConfiguration)
- If no XML context is needed, build the engine programmatically with new StandaloneIdmEngineConfiguration().buildEngine() instead
Example fix
// before (context.xml has no IdmEngine bean) IdmEngine e = SpringIdmConfigurationHelper.buildIdmEngine(url); // after: add to context.xml <bean id="idmEngine" class="org.flowable.idm.engine.impl.IdmEngineFactoryBean"> <property name="idmEngineConfiguration" ref="idmEngineConfiguration"/> </bean>
Defensive patterns
Strategy: validation
Validate before calling
// verify the XML context defines an IdmEngine before bootstrapping
ApplicationContext ctx = new GenericXmlApplicationContext(new UrlResource(resource));
if (ctx.getBeansOfType(IdmEngine.class).isEmpty()) {
throw new IllegalStateException(resource + " does not declare an IdmEngine bean");
} Prevention
- Keep a dedicated idm spring XML containing the IdmEngine bean definition
- Point buildIdmEngine at the correct resource URL
- Prefer programmatic StandaloneIdmEngineConfiguration when no Spring context is required
When it happens
Trigger: buildIdmEngine(url) called with an XML context that lacks an <bean class="...IdmEngine"/> (or flowable idm engine definition), or the bean is of a different engine type (e.g. only a ProcessEngine bean).
Common situations: Reusing a process-engine spring XML for the idm engine bootstrap; forgetting the idmEngine bean after refactoring context files; bean defined but lazily not matching the IdmEngine type; wrong resource URL loading an unrelated XML.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- no org.flowable.app.engine.AppEngine defined in the applicat
- transactionManager is required property for SpringAppEngineC
- transactionManager is required property for SpringCmmnEngine
- Expected dmnEngine configuration to be of type SpringDmnEngi
- transactionManager is required property for SpringDmnEngineC
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5b19505345d50f5c.
Report an issue: GitHub.