For me, the problem only ceased to exist after i injected the entity manager into the jpaEntityManagerFactory property, but maybe that is just because i am configuring the spring boot way in code (everything else is pretty standard spring boot default setup - transaction management should be set up in boot by default, if i read the documentation correctly, but it did not work for me in version 5.20.0).
<java>
@Bean
SpringProcessEngineConfiguration processEngineConfiguration(
EntityManagerFactory entityManagerFactory,
Environment env, DataSource dataSource,
PlatformTransactionManager transactionManager, CustomGroupManagerFactory groupManagerFactory, CustomUserManagerFactory userManagerFactory) {
SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setTransactionManager(transactionManager);
config.setDataSource(dataSource);
config.setDatabaseSchemaUpdate("true");
config.setJobExecutorActivate(false);
//enable transaction integration
config.setJpaEntityManagerFactory(entityManagerFactory);
config.setJpaHandleTransaction(true);
//config.setTransactionsExternallyManaged(true);
config.setDeploymentResources(new Resource[] {new ClassPathResource("/processes/myprocess.bpmn20.xml")});
config.setCustomSessionFactories(Arrays.asList(userManagerFactory, groupManagerFactory));
if(Arrays.asList(env.getActiveProfiles()).contains("development") && devMailServerActive){
config.setMailServerPort(devMailServerPort);
}
else if(mailServerPort>0){
config.setMailServerPort(mailServerPort);
}
return config;
}
</java>