Update timer with a past time makes user task listener can't be triggered

20%20AM
Hi,
I created a BPMN file just like above, and I have a listener which will be triggered when the user task started. I started a process instance with a future date, so this instance will stay on the timer until the timer expired. Then I update the timer to a past time, which means it goes to the user task now. I thought the listener will be triggered and do its stuff, but it didn’t. It worked fine when the newly updated time is still a future time.

Can someone tell me why this happened?

Hi @Mangojam

how did you change the timer to a past time?

When camunda arrives at the timer event it will create a job with a due date in the job table with the current configuration. If you do not modify the process instance the timer will not be reevaluated just because you update e.g. the expression of the timer event. You would have to either change the job due date or modify your process instance to reevaluate your timer.

Best
Felix

Thanks for your reply. I use the method I found in this post, changing the job due date(Update Timer using the Java API). I tried several times, at first the task listener never get hit, but today, all of a sudden, the listener can work now. However, when I set the timer from a future date to a past time, it took 10s - 1min for the task listener to be hit. If I set the time to like 10s after present time, it worked very quickly. Do you see what might cause it?