Answer the question
In order to leave comments, you need to log in
Why don't timer boundary events work for me in Alfresco's Activiti 6?
Hello. Our company uses Alfresco's Activiti 6, and we need to add timer boundary events to the bpm-scheme. I've tried everything, and I can't seem to get it to work. An example of my bpm-scheme:
If I put something after the timer, then the process goes along its usual route. If I do not put anything, it goes along the branch coming from the timer. At the same time, it doesn’t matter what time interval the timer has: the process goes along one or the other branch immediately.
To create objects to work with the Activity engine, I use Spring 5. Here is part of my configuration class:
@Bean
SpringProcessEngineConfiguration processEngineConfiguration(@Qualifier("dataSourceForActiviti") DataSource dataSourceForActiviti,
@Qualifier("transactionManagerForActiviti") PlatformTransactionManager transactionManagerForActiviti) {
SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();
processEngineConfiguration.setTransactionManager(transactionManagerForActiviti);
processEngineConfiguration.setDataSource(dataSourceForActiviti)
.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE)
.setAsyncExecutorActivate(true)
;
processEngineConfiguration.setDeploymentResources(new Resource[]{
new ClassPathResource("bpm/LicensingProcess.bpmn20.xml"),
new ClassPathResource("bpm/ReissuanceLicenseProcess.bpmn20.xml"),
new ClassPathResource("bpm/IssueOfDuplicateProcess.bpmn20.xml"),
new ClassPathResource("bpm/IssuanceOfCopyProcess.bpmn20.xml"),
new ClassPathResource("bpm/TerminationOfLicenseProcess.bpmn20.xml"),
new ClassPathResource("bpm/ExtractFromRegisterOfLicensesProcess.bpmn20.xml")
});
return processEngineConfiguration;
}
@Bean
ProcessEngineFactoryBean processEngineFactoryBean(SpringProcessEngineConfiguration processEngineConfiguration) {
ProcessEngineFactoryBean processEngineFactoryBean = new ProcessEngineFactoryBean();
processEngineFactoryBean.setProcessEngineConfiguration(processEngineConfiguration);
return processEngineFactoryBean;
}
@Bean
RepositoryService repositoryService(ProcessEngineFactoryBean processEngineFactoryBean) throws Exception {
return processEngineFactoryBean.getObject().getRepositoryService();
}
@Bean
RuntimeService runtimeService(ProcessEngineFactoryBean processEngineFactoryBean) throws Exception {
return processEngineFactoryBean.getObject().getRuntimeService();
}
@Bean
TaskService taskService(ProcessEngineFactoryBean processEngineFactoryBean) throws Exception {
return processEngineFactoryBean.getObject().getTaskService();
}
asyncExecutorActivate
set to true
. And I found a method setAsyncExecutorActivate
in ProcessEngineConfiguration
. But using this method does nothing. // Async Job Executor
final DefaultAsyncJobExecutor asyncExecutor = new DefaultAsyncJobExecutor();
asyncExecutor.setMaxPoolSize(50);
asyncExecutor.setQueueSize(100);
processEngineConfiguration.setAsyncExecutor(asyncExecutor);
asyncExecutor
after that it doesn’t anymore null
. StandaloneProcessEngineConfiguration
, did not use the ProcessEngineBeanFactoryBean
. And everything worked too. But only so far after the boundary timer there is no script task or service task. It does not work with them (the first one does not find the groove engine, the second one does not see the specified class (and I indicate the full name of the class, and it is definitely there)). If after the boundary timer there is a user task or a manual task, then everything works fine. Why it doesn’t work with script task and service task, I still don’t understand. It remains to try with classes SpringProcessEngineConfiguration
andProcessEngineBeanFactoryBean
, and with a container of spring beans.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question