cancel
Showing results for 
Search instead for 
Did you mean: 

Firing a listener when a task's due date passes

nmandya
Champ in-the-making
Champ in-the-making
Hello,
  I am using Activiti 5.17. I have a bunch of user tasks that have a due date sent on them. Is there some way to setup Activiti so that a listener is invoked when the due date of the task has passed and the task has still not been completed? Thanks.

Nagaraj
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Nagaraj,

due date is just an task's attribute. If you want to handle event use timer boundary event instead.

Regards
Martin

nmandya
Champ in-the-making
Champ in-the-making
Hi Martin,
  How can I use a timer boundary event which will fire at a task's due date? My flow is like this - a user task has a due date (which is based on a data received from a form and varies from instance to instance). When the due date of a task is reached, I need to send out email notifications and execute some Java code. If I use a timer boundary event, the time at which the event fires will be hard-coded. As far as I know, the timer event configuration does not allow a process variable to be used to specify the time at which it is to fire. Or am I missing something?

Nagaraj

nmandya
Champ in-the-making
Champ in-the-making
Hi Martin,
  Please ignore my previous response. I see that I can specify a timerDuration with a process variable containing the duration definition. I compute the different between the current time and the due date of the task, convert into a 8601 duration format and set that as a process variable. I then attached this timer to the task and it works as expected. Thanks for the guidance.

Nagaraj