{"record":{"id":"ba24af9e7edb6c8b","repo":"flowable/flowable-engine","slug":"transactionmanager-is-required-property-for-spring-ba24af","errorCode":null,"errorMessage":"transactionManager is required property for SpringProcessEngineConfiguration, use org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration otherwise","messagePattern":"transactionManager is required property for SpringProcessEngineConfiguration, use org\\.flowable\\.engine\\.impl\\.cfg\\.StandaloneProcessEngineConfiguration otherwise","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-spring/src/main/java/org/flowable/spring/SpringProcessEngineConfiguration.java","lineNumber":108,"sourceCode":"    protected EngineConfigurator createDefaultEventRegistryEngineConfigurator() {\n        return new SpringEventRegistryConfigurator();\n    }\n\n    public void setTransactionSynchronizationAdapterOrder(Integer transactionSynchronizationAdapterOrder) {\n        this.transactionSynchronizationAdapterOrder = transactionSynchronizationAdapterOrder;\n    }\n\n    @Override\n    public void initDefaultCommandConfig() {\n        if (defaultCommandConfig == null) {\n            defaultCommandConfig = new CommandConfig().setContextReusePossible(true);\n        }\n    }\n\n    @Override\n    public CommandInterceptor createTransactionInterceptor() {\n        if (transactionManager == null) {\n            throw new FlowableException(\"transactionManager is required property for SpringProcessEngineConfiguration, use \" + StandaloneProcessEngineConfiguration.class.getName() + \" otherwise\");\n        }\n\n        return new SpringTransactionInterceptor(transactionManager);\n    }\n\n    @Override\n    public void initTransactionContextFactory() {\n        if (transactionContextFactory == null && transactionManager != null) {\n            transactionContextFactory = new SpringTransactionContextFactory(transactionManager, transactionSynchronizationAdapterOrder);\n        }\n    }\n\n    @Override\n    public void initJpa() {\n        super.initJpa();\n        if (jpaEntityManagerFactory != null) {\n            sessionFactories.put(EntityManagerSession.class, new SpringEntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));\n        }","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-spring/src/main/java/org/flowable/spring/SpringProcessEngineConfiguration.java#L90-L126","documentation":"SpringProcessEngineConfiguration is the Flowable engine configuration for Spring-managed transactions; it delegates all transaction handling to a Spring PlatformTransactionManager. createTransactionInterceptor validates this: if no transactionManager property was set, the configuration is unusable and a FlowableException is thrown, telling you to use StandaloneProcessEngineConfiguration instead if you don't want Spring transactions.","triggerScenarios":"Building/obtaining a process engine from a SpringProcessEngineConfiguration where the transactionManager property was never set (missing <property name=\"transactionManager\"> in XML, or omitted in Java config), which surfaces when the engine initializes its command interceptor chain.","commonSituations":"Hand-written Spring XML missing the transactionManager wiring; copying a standalone engine config class into a Spring app; DataSource present but PlatformTransactionManager bean never defined; Spring Boot auto-config overridden by a custom configuration bean that forgot the property.","solutions":["Set the transactionManager property on the SpringProcessEngineConfiguration to a Spring PlatformTransactionManager bean (e.g. DataSourceTransactionManager or JtaTransactionManager).","If you truly run without Spring transactions, switch the configuration class to StandaloneProcessEngineConfiguration as the message suggests.","In Spring Boot, use the SpringProcessEngineConfiguration provided by flowable-spring-boot-starter auto-configuration rather than constructing your own."],"exampleFix":"// before\nSpringProcessEngineConfiguration cfg = new SpringProcessEngineConfiguration();\ncfg.setDataSource(dataSource);\n\n// after\ncfg.setTransactionManager(new DataSourceTransactionManager(dataSource));\n// or, if not using Spring transactions:\n// ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration()...","handlingStrategy":"validation","validationCode":"if (cfg instanceof SpringProcessEngineConfiguration && ((SpringProcessEngineConfiguration) cfg).getTransactionManager() == null) {\n    throw new IllegalStateException(\"Set transactionManager before building the engine\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always wire <property name=\"transactionManager\" ref=\"transactionManager\"/> when using SpringProcessEngineConfiguration","Define a PlatformTransactionManager bean alongside the DataSource","Use StandaloneProcessEngineConfiguration when Spring transaction management is not wanted"],"tags":["spring","configuration","transaction-manager","process-engine"],"backgroundTag":"missing-required-config-field","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}