cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger listener on start and end of each activity

nixikanius
Champ in-the-making
Champ in-the-making
I need to add verbose logging for process instance to see the route of them in logs. I think the best way to do this will be global listeners which will be trigger on start and end of all activities in process and write info of start/end of activity in log.

Is there any way to do this in Activiti? Or may be there is any another way to solve my issue?
3 REPLIES 3

trademak
Star Contributor
Star Contributor
You can add an execution and task listener to do this. This is explained here:

http://activiti.org/userguide/index.html#_hooking_into_process_parsing

Another way would be to listener on a more low level for events in the Activiti Engine, like explained here:

http://activiti.org/userguide/index.html#eventDispatcherConfiguration

Best regards,

nixikanius
Champ in-the-making
Champ in-the-making
Is there any way to declare global listeners in process definition? Put them in process engine configuration, I think, is not good way if I want listeners only in one process types.

martin_grofcik
Confirmed Champ
Confirmed Champ