Hi Joram, have the same issue.
I want use activiti on spring, without spring-boot.
But if i use activiti-spring:5.21.0 version, the @EnableActiviti annotation is missing like WalterJS said.
If i use activiti-spring:5.15, the class AbstractActivitiConfigurer is missing.
Today in 2016, which is the better way to initialize activiti in Java Configuration without xml.
————————————–
i try to use some like this…
@Bean
public DataSource inMemoryDataSource() {
BasicDataSource basicDataSource = new BasicDataSource();
basicDataSource.setUsername("sa");
basicDataSource.setUrl("jdbc:h2:mem:activiti");
basicDataSource.setDefaultAutoCommit(false);
basicDataSource.setDriverClassName(org.h2.Driver.class.getName());
basicDataSource.setPassword("");
return basicDataSource;
}
@Bean
public AbstractActivitiConfigurer abstractActivitiConfigurer() {
//public AbstractActivitiConfigurer abstractActivitiConfigurer(final EntityManagerFactory entityManagerFactoryBean, final PlatformTransactionManager jpaTransactionManager) {
return new AbstractActivitiConfigurer() {
@Override
public void postProcessSpringProcessEngineConfiguration(SpringProcessEngineConfiguration engine) {
engine.setDatabaseType("h2");
engine.setDataSource(inMemoryDataSource());
engine.setRepositoryService(repositoryService());
engine.setTaskService(taskService());
engine.setManagementService(managementService());
engine.setRuntimeService(runtimeService());
engine.setHistoryService(historyService());
Resource[] processResources = new Resource[1] ;
Resource underwritingQueueProcess = new ClassPathResource("processes/cl.bpmn20.xml");
processResources[0]=underwritingQueueProcess;
engine.setDeploymentResources(processResources);
engine.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
}
};
}
@Bean
public RepositoryServiceImpl repositoryService(){
RepositoryServiceImpl repositoryService = new RepositoryServiceImpl();
return repositoryService;
}
@Bean
public TaskServiceImpl taskService(){
TaskServiceImpl taskService = new TaskServiceImpl();
return taskService;
}
@Bean
public ManagementServiceImpl managementService(){
ManagementServiceImpl managementService = new ManagementServiceImpl();
return managementService;
}
@Bean
public RuntimeServiceImpl runtimeService(){
RuntimeServiceImpl runtimeService = new RuntimeServiceImpl();
return runtimeService;
}
@Bean
public HistoryServiceImpl historyService(){
HistoryServiceImpl historyService = new HistoryServiceImpl();
return historyService;
}