{"record":{"id":"703af08f828e22ad","repo":"flowable/flowable-engine","slug":"transactionmanager-is-required-property-for-spring-703af0","errorCode":null,"errorMessage":"transactionManager is required property for SpringCmmnEngineConfiguration, use \" + CmmnEngineConfiguration.class.getName() + \" otherwise","messagePattern":"transactionManager is required property for SpringCmmnEngineConfiguration, use \" \\+ CmmnEngineConfiguration\\.class\\.getName\\(\\) \\+ \" otherwise","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/SpringCmmnEngineConfiguration.java","lineNumber":104,"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 SpringCmmnEngineConfiguration, use \" + CmmnEngineConfiguration.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    protected void autoDeployResources(CmmnEngine cmmnEngine) {\n        if (deploymentResources != null && deploymentResources.length > 0) {\n            final AutoDeploymentStrategy<CmmnEngine> strategy = getAutoDeploymentStrategy(deploymentMode);\n            strategy.deployResources(deploymentName, deploymentResources, cmmnEngine);\n        }\n    }","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/SpringCmmnEngineConfiguration.java#L86-L122","documentation":"SpringCmmnEngineConfiguration requires a Spring PlatformTransactionManager to build its transaction interceptor; without one it cannot participate in Spring-managed transactions. The engine throws this FlowableException during createTransactionInterceptor to fail fast instead of running commands without proper transaction handling. Use the non-Spring CmmnEngineConfiguration if you don't need Spring transaction management.","triggerScenarios":"Calling createTransactionInterceptor() (directly or via engine initialization) on a SpringCmmnEngineConfiguration whose transactionManager property was never set, e.g. when creating the configuration programmatically without calling setTransactionManager, or when the Spring bean of type PlatformTransactionManager was not injected.","commonSituations":"Building the CMMN engine manually in a Spring Boot app without @Autowired-ing the PlatformTransactionManager; a misnamed or missing DataSourceTransactionManager/ JpaTransactionManager bean; copying XML/Java config from the non-Spring engine docs; upgrading Flowable and constructing the configuration in code instead of relying on auto-configuration.","solutions":["Set the transaction manager on the configuration: cmmnEngineConfiguration.setTransactionManager(platformTransactionManager) before engine build/init.","Inject the Spring-managed PlatformTransactionManager bean (e.g. DataSourceTransactionManager or JpaTransactionManager) into your configuration class.","If you do not use Spring transaction management, switch to org.flowable.cmmn.engine.CmmnEngineConfiguration instead of the Spring subclass.","If using Spring Boot, ensure flowable-spring-boot-starter auto-configuration is on the classpath so the transaction manager is wired automatically."],"exampleFix":"// before\nSpringCmmnEngineConfiguration cfg = new SpringCmmnEngineConfiguration();\ncfg.setDataSource(dataSource);\nCmmnEngine engine = cfg.buildCmmnEngine();\n// after\nSpringCmmnEngineConfiguration cfg = new SpringCmmnEngineConfiguration();\ncfg.setDataSource(dataSource);\ncfg.setTransactionManager(new DataSourceTransactionManager(dataSource));\nCmmnEngine engine = cfg.buildCmmnEngine();","handlingStrategy":"validation","validationCode":"if (cfg.getTransactionManager() == null) {\n    cfg.setTransactionManager(applicationContext.getBean(PlatformTransactionManager.class));\n}","typeGuard":"boolean hasTxManager(SpringCmmnEngineConfiguration cfg) { return cfg.getTransactionManager() != null; }","tryCatchPattern":"try {\n    cmmnEngine = cfg.buildCmmnEngine();\n} catch (FlowableException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"transactionManager is required\")) {\n        throw new IllegalStateException(\"Configure a PlatformTransactionManager for SpringCmmnEngineConfiguration\", e);\n    }\n    throw e;\n}","preventionTips":["Always inject the Spring PlatformTransactionManager bean when using the Spring engine configuration subclass.","Prefer Spring Boot starters/auto-configuration over manual configuration construction.","Add a startup-time assertion that transactionManager is set before building the engine.","Use the non-Spring CmmnEngineConfiguration when Spring transaction management is not needed."],"tags":["spring","configuration","transactions","flowable"],"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-14T05:17:10.506Z"}