Hello dear community,
I know this subject has some open threads already. But couldn’t find the exact match for my use case.
I’m using Camunda CC v.7.12 full TOMCAT distribution.
I have a process application (SpringServletProcessApplication) that is being deployed into tomcat.
It works fine if I attach directly a task listener to a user task event (via delegate expression).
But, If I try to use a global event listener, as in the documentation, nothing happens.
The process is working but no logs fired in any user task event.
Could you please advise what is the necessary configuration/set up to make this work?
@ProcessApplication
public class CamundaBpmProcessApplication extends SpringServletProcessApplication {
private final static Logger LOGGER = Logger.getLogger(CamundaBpmProcessApplication.class.getName());
public TaskListener getTaskListener() {
return new TaskListener() {
public void notify(DelegateTask delegateTask) {
// handle all Task Events from Invoice Process
LOGGER.log(Level.WARNING, "Task listener Fired");
}
};
}
public ExecutionListener getExecutionListener() {
return new ExecutionListener() {
public void notify(DelegateExecution execution) throws Exception {
// handle all Execution Events from Invoice Process
LOGGER.log(Level.WARNING, "Execution listener Fired");
}
};
}
}
context set up:
public class AppContext{
private final static Logger LOGGER = Logger.getLogger(AppContext.class.getName());
@Bean
public ProcessEngineService processEngineService() {
return BpmPlatform.getProcessEngineService();
}
@Bean(destroyMethod = "")
public ProcessEngine processEngine() {
return BpmPlatform.getDefaultProcessEngine();
}
@Bean
public SpringServletProcessApplication processApplication() {
return new SpringServletProcessApplication();
}
@Bean
public RepositoryService repositoryService(ProcessEngine processEngine) {
return processEngine.getRepositoryService();
}
@Bean
public RuntimeService runtimeService(ProcessEngine processEngine) {
return processEngine.getRuntimeService();
}
@Bean
public TaskService taskService(ProcessEngine processEngine) {
return processEngine.getTaskService();
}
@Bean
public HistoryService historyService(ProcessEngine processEngine) {
return processEngine.getHistoryService();
}
@Bean
public ManagementService managementService(ProcessEngine processEngine) {
return processEngine.getManagementService();
}
}
Thanks in advance