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

Assignee

Tijs Rademakers

Reporter

Tom Cooke

Labels

None

Components

Fix versions

Affects versions

Priority

Medium
Configure