User task, Timer Boundary Event And Spring

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

User task, Timer Boundary Event And Spring

Jump to solution

 We are having a problem with a boundary timer event not firing. We realize the typical issue for this is <property name="jobExecutorActivate" value="true"/> has not been set to true. That is not the issue here. But after 

setting jobExecutorActivate and AsyncExecutorActivate true the application is not getting up, also it does 

not give any specific error. Please find below configuration for more details

 

@Configuration
@EnableTransactionManagement
@EnableWebMvc
@ComponentScan(basePackages = "com.########.platform")
@PropertySource(value = { "classpath:activiti.properties" })
public class ActivitiConfiguration {
 
@Autowired
private DataSource dataSource;
 
@Autowired
@Qualifier("transactionManager")
private PlatformTransactionManager transactionManager;
 
@Value("${activiti.databasetype}")
private String dbType;
 
@Value("${activiti.history}")
private String history;
 
@Value("${activiti.schemaUpdate}")
private String schemaUpdate;
 
@Value("${activiti.transactionsExternallyManaged}")
private boolean transactionsExternallyManaged;
 
@Bean(name = "processEngine")
@DependsOn({ "processEngineFactoryBean" })
public ProcessEngine getProcessEngine() throws Exception {
final ProcessEngine processEngine = this.getProcessEngineFactoryBean().getObject();
return processEngine;
}
 
@Bean(name = "processEngineFactoryBean")
public ProcessEngineFactoryBean getProcessEngineFactoryBean() {
final ProcessEngineFactoryBean processEngine = new ProcessEngineFactoryBean();
processEngine.setProcessEngineConfiguration(this.getConfiguration());
return processEngine;
}
 
@Bean
@DependsOn({ "dataSource", "transactionManager" })
public SpringProcessEngineConfiguration getConfiguration() {
final SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setAsyncExecutorActivate(true);
config.setJobExecutorActivate(true);
config.setDataSource(this.dataSource);
config.setTransactionManager(this.transactionManager);
config.setDatabaseSchemaUpdate(this.schemaUpdate);
config.setHistory(this.history);
config.setTransactionsExternallyManaged(this.transactionsExternallyManaged);
config.setDatabaseType(this.dbType);
return config;
}
}
 
When process does not use Timer Boundary event than it works smoothly. We have seen relative problem descriptions on forum, but provided tips don't helped much. One more thing we are using external quartz scheduler in our application.
Is external quartz scheduler conflict with timer Boundary event scheduler? Can anyone please help to solve this.
Thanks.
1 Solution

Accepted Solutions
Highlighted
Member II

Re: User task, Timer Boundary Event And Spring

Jump to solution

Hi,

The problem with the asyncExecutor configuration. We have configured it as follows and it worked Smiley Happy

@Bean
@DependsOn({ "dataSource", "transactionManager" })
public SpringProcessEngineConfiguration getConfiguration() {
final SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setAsyncExecutorActivate(true);
config.setJobExecutorActivate(true);
config.setDataSource(this.dataSource);
config.setTransactionManager(this.transactionManager);
config.setDatabaseSchemaUpdate(this.schemaUpdate);
config.setHistory(this.history);
config.setTransactionsExternallyManaged(this.transactionsExternallyManaged);
config.setDatabaseType(this.dbType);

// Async Job Executor
final DefaultAsyncJobExecutor asyncExecutor = new DefaultAsyncJobExecutor();
asyncExecutor.setMaxPoolSize(50);
asyncExecutor.setQueueSize(100);
config.setAsyncExecutor(asyncExecutor);
return config;
}

thanks Ciju for your inputs.

View solution in original post

3 Replies
Highlighted
Senior Member II

Re: User task, Timer Boundary Event And Spring

Jump to solution

Hi,

It could be the external quartz schedule causing this issue. The best way to verify this is to write a simple unit test. I'm not aware of any issues with the boundary timer event not firing. Which version of activiti are you using?

Ciju

Highlighted
Member II

Re: User task, Timer Boundary Event And Spring

Jump to solution

Hi,

The problem with the asyncExecutor configuration. We have configured it as follows and it worked Smiley Happy

@Bean
@DependsOn({ "dataSource", "transactionManager" })
public SpringProcessEngineConfiguration getConfiguration() {
final SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setAsyncExecutorActivate(true);
config.setJobExecutorActivate(true);
config.setDataSource(this.dataSource);
config.setTransactionManager(this.transactionManager);
config.setDatabaseSchemaUpdate(this.schemaUpdate);
config.setHistory(this.history);
config.setTransactionsExternallyManaged(this.transactionsExternallyManaged);
config.setDatabaseType(this.dbType);

// Async Job Executor
final DefaultAsyncJobExecutor asyncExecutor = new DefaultAsyncJobExecutor();
asyncExecutor.setMaxPoolSize(50);
asyncExecutor.setQueueSize(100);
config.setAsyncExecutor(asyncExecutor);
return config;
}

thanks Ciju for your inputs.

View solution in original post

Highlighted
Senior Member II

Re: User task, Timer Boundary Event And Spring

Jump to solution

Great, thanks for posting the answer!

CIju