flowable/flowable-engine · error · ActivitiException

transactionManager is required property for…

Error message

transactionManager is required property for SpringProcessEngineConfiguration, use  otherwise

What it means

Thrown by SpringProcessEngineConfiguration.createTransactionInterceptor when no Spring PlatformTransactionManager has been configured. The Spring integration requires a transaction manager to join engine commands into Spring transactions; otherwise it suggests using the standalone configuration instead.

Solutions

  1. Wire a PlatformTransactionManager bean and inject it: cfg.setTransactionManager(transactionManager).
  2. In XML, add <property name="transactionManager" ref="transactionManager"/> to the engine configuration bean.
  3. If you do not need Spring-managed transactions, switch to StandaloneProcessEngineConfiguration as the message suggests.
  4. Catch ActivitiException at startup to fail fast with guidance.

Example fix

// before
SpringProcessEngineConfiguration cfg = new SpringProcessEngineConfiguration();
cfg.setDataSource(dataSource); // transactionManager missing
// after
cfg.setDataSource(dataSource);
cfg.setTransactionManager(transactionManager);
Defensive patterns

Strategy: validation

Validate before calling

SpringProcessEngineConfiguration cfg = ...;
if (cfg.getTransactionManager() == null) throw new IllegalStateException("SpringProcessEngineConfiguration requires a transactionManager");

Try / catch

try { cfg.buildProcessEngine(); } catch (ActivitiException e) { log.error("Engine bootstrap failed: {}", e.getMessage(), e); }

Prevention

When it happens

Trigger: Building a process engine from SpringProcessEngineConfiguration without calling setTransactionManager(...) (e.g. missing PlatformTransactionManager bean wiring in spring XML or Java config).

Common situations: Spring config that defines the engine but forgot the DataSourceTransactionManager/JpaTransactionManager bean; copying a standalone config into a Spring setup; refactoring that removed the transaction manager bean.

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/2aeafcdaafa6b46a. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable5-spring/src/main/java/org/activiti/spring/SpringProcessEngineConfiguration.java:84

        autoDeployResources(processEngine);
        return processEngine;
    }

    public void setTransactionSynchronizationAdapterOrder(Integer transactionSynchronizationAdapterOrder) {
        this.transactionSynchronizationAdapterOrder = transactionSynchronizationAdapterOrder;
    }

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

    @Override
    protected CommandInterceptor createTransactionInterceptor() {
        if (transactionManager == null) {
            throw new ActivitiException("transactionManager is required property for SpringProcessEngineConfiguration, use " + StandaloneProcessEngineConfiguration.class.getName() + " otherwise");
        }

        return new SpringTransactionInterceptor(transactionManager);
    }

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

    @Override
    protected void initJpa() {
        super.initJpa();
        if (jpaEntityManagerFactory != null) {
            sessionFactories.put(EntityManagerSession.class, new SpringEntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
        }

View on GitHub (pinned to d6d39ce1c6)