Boundary timer with fixed number of repeats fires all events at once when attached to nested activity

Description

If a repeating boundary timer with a fixed number of repeats is attached to a subprocess or task that is within a subprocess, the timer will wait the correct amount of time before firing, but will then fire all the repeats at once.

This appears to be happening because the function checkBoundaryEventsDefinitions in TimerEntity.java only processes top-level activities; if a nested activity is passed in then the activity is never found and calculateMaxIterationsValue is never called so the wrong number of iterations is returned (1) which causes DurationHelper.getDateAfterRepeat to return the current time instead of the correct time for the next iteration.

The attached process should send me an email every 15 seconds up to a total of 3 emails and then exit after a minute, but all the emails are sent after the initial 15 second interval.

Environment

None

Activity

Show:
Tom Cooke
June 6, 2016, 8:23 AM

Excellent, thanks very much!

Tijs Rademakers
June 2, 2016, 11:44 AM

Fixed

Tom Cooke
November 16, 2015, 12:11 PM

Hi Joram,

Thanks for looking at this. I've confirmed this is still an issue on 5.19. It's slightly different in that on 5.19 the timers fire 10 seconds apart regardless of the interval whereas they used to fire much closer together on 5.18, so the problem is a bit more like the previous issue with unbounded timers () before that was fixed in 5.19.

I've modified my test process to use a one minute interval (and to have the process exit after 5 minutes have passed) and verified that they are still 10 seconds apart after the first instance of the timer fires at the right time, so this is not just an issue with the relatively short interval used in the test case.

As I mentioned in the original ticket I still think this is a problem with TimerEntity.checkBoundaryEventsDefinitions only looking at top-level activities.

Thanks,

Tom

Joram Barrez
November 11, 2015, 8:58 PM

Hi Tom, This sounds like something we fixed in 5.19. Could you it a spin on 5.19?

Fixed

Assignee

Tijs Rademakers

Reporter

Tom Cooke

Labels

None

Components

Fix versions

Affects versions

Priority

Medium