cancel
Showing results for 
Search instead for 
Did you mean: 

Task with Repeat Timer e.g. 'R/T02-07/P1D' creates new job every entry

leggebroten
Champ in-the-making
Champ in-the-making
Find attached a simplified model regarding the issue.

** Behavior **
Every time we loop back to the timer task a new row is added to the ACT_RU_JOB table.  The prior timer due-date row is not removed but appears to be executed anyway because RETRIES_ is reduced to 0 and there is a value for EXCEPTION_STACK_ID.

This "old row causes exception" behavior seems consistent within unit tests as well.  To unit test my model I have a ManagementService query for timers.  Calling executeJob for any Job but the most recent entry causes an exception.

** Model **
We are using a repeat timer "<timeCycle>R/T02-07/P1D</timeCycle>" to have instances check external business state while server load is low (regardless of when the instance actually started).  Depending on state, each instance may either; transition to one of two UserTasks, or circle back around to the "daily timer"

** Questions **
1) It seems the every-growing ACT_RU_JOB table with its evidence of exceptions will incur a performance penalty for large numbers of long-running instances.  Am I doing something wrong with the timer spec?
2) Should I use something different to achieve the run "once-a-day-at-0200" behavior?  (I've avoided using a BoundaryTimer because the designer keeps hosing the model).
3 REPLIES 3

leggebroten
Champ in-the-making
Champ in-the-making
** More Behavior **

Deleting the instance does NOT REMOVE the timer instances from ACT_RU_JOB.

** Questions **
3) I deleted the instance via the ActivitiExplorer.  Am I doing something wrong?

trademak
Star Contributor
Star Contributor
When you create a unit test like described in my other post, we'll validate this as well.
Timers should always be removed when a process instance is deleted.

Best regards,

leggebroten
Champ in-the-making
Champ in-the-making
Test case and jira ticket submitted.
http://jira.codehaus.org/browse/ACT-1949