Not able to run global taskListener

Hi,

I am trying to send mail on every user task creation so for that I using process Application event Listener and I have written code for that below

@ProcessApplication
public class CamundaworkflowApplication extends ServletProcessApplication {

public TaskListener geTaskListener() {
	
return new TaskListener() {
	
	@Override
	public void notify(
			DelegateTask delegateTask
			) 
	{
		// TODO Auto-generated method stub
		System.out.println("testing.... email 1");

		String l_assignee = delegateTask.getAssignee();
		String l_taskId = delegateTask.getId();

}
};

but this method geTaskListener() it self is not getting called

please give me any solution.

Hi @abhi1o3,

have a look into this example: https://github.com/camunda/camunda-bpm-examples/tree/master/process-engine-plugin/bpmn-parse-listener-on-user-task

Just replace the logging line with sending an email.

Hope this helps, Ingo

I have written global ExecutionListener() and its working fine but same with TaskListener its not working I have followed below link

https://docs.camunda.org/manual/7.5/user-guide/process-applications/process-application-event-listeners/

Hi @abhi1o3,

you did a typo: rename your method to the expected name getTaskListener().

Hope this helps, Ingo