I am migrating from Activiti 5 to Flowable 6 and encountering an issue when initializing RuntimeService
. Despite having all necessary libraries imported and Flowable 5 compatibility enabled, I receive the following error:
*Error:
Failed to instantiate [org.flowable.engine.RuntimeService]: Factory method 'runtimeService' threw exception with message: Unsupported process engine configuration.
Additional Details:
- Dependencies: The
flowable5-compatibility
and other Flowable libraries are correctly added to thepom.xml
. - Configuration: Flowable 5 compatibility is enabled in the
SpringProcessEngineConfiguration
. - Database: I am using pre-existing Activiti 5 tables and have some ongoing processes.
Spring Configuration:
Here is the relevant configuration I am using:
@Configuration
public class FlowableConfiguration {
//... other beans and configuration
@Bean
public DefaultFlowable5CompatibilityHandler flowable5CompatibilityHandler() {
return new DefaultFlowable5CompatibilityHandler();
}
@Bean
public SpringProcessEngineConfiguration springProcessEngineConfiguration(
DataSource dataSource,
PlatformTransactionManager transactionManager,
DefaultAsyncJobExecutor asyncJobExecutor,
DefaultFlowable5CompatibilityHandler flowable5CompatibilityHandler) throws IOException {
SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setDataSource(dataSource);
config.setTransactionManager(transactionManager);
config.setDatabaseSchemaUpdate(SpringProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
config.setFlowable5CompatibilityEnabled(true);
config.setFlowable5CompatibilityHandler(flowable5CompatibilityHandler);
return config;
}
@Bean
public RuntimeService runtimeService(ProcessEngineFactoryBean processEngine) throws Exception {
return processEngine.getObject().getRuntimeService();
}
}
Any suggestions on how to resolve this issue? Are there additional steps I should take to ensure full compatibility and proper functioning of Flowable services?
Any help or guidance would be greatly appreciated. Thanks in advance!