flowable/flowable-engine · error · FlowableException

transactionManager is required property for SpringIdmEngineC

Error message

transactionManager is required property for SpringIdmEngineConfiguration, use org.flowable.idm.engine.impl.StandaloneIdmEngineConfiguration otherwise

What it means

FlowableException thrown by SpringIdmEngineConfiguration.createTransactionInterceptor when transactionManager is null. Spring-managed idm engines must run inside Spring transactions; without a PlatformTransactionManager the engine cannot build its transaction interceptor. The message advises using StandaloneIdmEngineConfiguration for non-Spring usage.

Source

Thrown at modules/flowable-idm-spring/src/main/java/org/flowable/idm/spring/SpringIdmEngineConfiguration.java:68

        IdmEngine idmEngine = super.buildEngine();
        IdmEngines.setInitialized(true);
        return idmEngine;
    }
    public void setTransactionSynchronizationAdapterOrder(Integer transactionSynchronizationAdapterOrder) {
        this.transactionSynchronizationAdapterOrder = transactionSynchronizationAdapterOrder;
    }

    @Override
    public void initDefaultCommandConfig() {
        if (defaultCommandConfig == null) {
            defaultCommandConfig = new CommandConfig().setContextReusePossible(true);
        }
    }

    @Override
    public CommandInterceptor createTransactionInterceptor() {
        if (transactionManager == null) {
            throw new FlowableException("transactionManager is required property for SpringIdmEngineConfiguration, use " + StandaloneIdmEngineConfiguration.class.getName() + " otherwise");
        }

        return new SpringTransactionInterceptor(transactionManager);
    }

    @Override
    public void initTransactionContextFactory() {
        if (transactionContextFactory == null && transactionManager != null) {
            transactionContextFactory = new SpringTransactionContextFactory(transactionManager, transactionSynchronizationAdapterOrder);
        }
    }

    @Override
    public IdmEngineConfiguration setDataSource(DataSource dataSource) {
        if (dataSource instanceof TransactionAwareDataSourceProxy) {
            return (IdmEngineConfiguration) super.setDataSource(dataSource);
        } else {
            // Wrap datasource in Transaction-aware proxy

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Set a transaction manager: springIdmEngineConfiguration.setTransactionManager(platformTransactionManager)
  2. Use SpringIdmEngineConfigurator against a SpringEngineConfiguration so the transaction manager is wired automatically
  3. If you don't need Spring transactions, switch to org.flowable.idm.engine.impl.StandaloneIdmEngineConfiguration
  4. Ensure the Spring context defines a transaction manager bean (e.g. DataSourceTransactionManager)

Example fix

// before
SpringIdmEngineConfiguration cfg = new SpringIdmEngineConfiguration();
cfg.setDataSource(dataSource);
IdmEngine e = cfg.buildEngine(); // throws: no transactionManager
// after
cfg.setTransactionManager(new DataSourceTransactionManager(dataSource));
Defensive patterns

Strategy: validation

Validate before calling

// Java guard before building the engine
if (springIdmCfg.getTransactionManager() == null) {
  springIdmCfg.setTransactionManager(new DataSourceTransactionManager(dataSource));
}

Prevention

When it happens

Trigger: Building an idm engine from a SpringIdmEngineConfiguration that never had setTransactionManager(...) called — e.g. constructing it manually instead of through SpringIdmEngineConfigurator, or the Spring transaction manager bean was missing from the application context.

Common situations: Manual SpringIdmEngineConfiguration instantiation in tests; Spring context lacking a PlatformTransactionManager (no @EnableTransactionManagement / DataSourceTransactionManager bean); using a non-Spring datasource setup with the Spring configuration class.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/0f7a1afae51075f0. Report an issue: GitHub.