Hi,
I have an existing Spring Boot that uses JPA and has multiple datasources. I want to plug in Flowable and give it a try with the existing code.
I’m using the following
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-process</artifactId>
</dependency>
When starting the application I now see the following error
Parameter 0 of method jpaProcessEngineConfigurer in org.flowable.spring.boot.FlowableJpaAutoConfiguration required a single bean, but 2 were found:
- IDEA_EntityManagerFactory: defined by method 'entityManagerFactory' in class path resource [.../DatabaseIDEAConfig.class]
- auditEntityManagerFactory: defined by method 'entityManagerFactory' in class path resource [.../DatabaseAuditConfig.class]
Which is an understandable error, but I don’t what to use an EntityManagerFactory just yet, I just want the quick H2 DB in memory.
I have also then created the following Config Class.
@Configuration
@AutoConfigureAfter(ProcessEngineAutoConfiguration.class)
public class BPMNConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
@Override
public void configure(SpringProcessEngineConfiguration configuration) {
configuration
.setJdbcUrl("jdbc:h2:mem:flowable;DB_CLOSE_DELAY=-1")
.setJdbcUsername("sa")
.setJdbcPassword("")
.setJdbcDriver("org.h2.Driver")
.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
}
But it appears the Spring Boot support still requires an EntityManager.
How can I stop the ProcessEngine requiring an EntityManager and just use a JDBC url?