You are viewing limited content. For full access, please sign in.

Question

Question

Timer Catch Event with a variable running in a loop

asked on June 13, 2019

I  have used Timer Catch Event several times but this is the first time I am using the Wait condition based on a variable. It started sending email notifications at midnight and it was running in  a loop. It was send about 10 emails per minute and had to cancel the instance to stop the notifications.

Attaching the test scenario in  a document with screenshots.

0 0

Answer

SELECTED ANSWER
replied on June 25, 2019

You need to do something like the process below. If you wrap the timer boundary event back into the same user task, it will interrupt the existing user task, create a new user task, but the new user task will already be passed the timer, so it will loop again and again. After the timer event hits 1 day before the due date, you need the process to go to a different user task (with all the same settings) but with no timer. 

0 0

Replies

replied on June 13, 2019

In your screenshot, you show the user task configuration and configured the DUE DATE for the user task. You should click the timer boundary event itself and show the configuration for that. That should be set to interrupt the existing user task and then wrap back around. 

0 0
replied on June 20, 2019

I have the Timer Catch event configured as shown in Page 2 of the earlier attached document.

0 0
replied on June 20, 2019

The design is technically working as intended. The instance waits on the user task until 1 day before due_date, at which point the timer event is triggered and the initial user task is interrupted. At that point, the path wraps back around to the user task with the same timer configuration. It detects that it needs to wait for 1 day before due_date (which is already here), then fires again, and again, and again...

One solution would be to set the timer to remind the user after x days and only repeat every x days. That way, when the new user task was assigned, it would wait another x days before reminding again. The problem in the current design is that the reminder condition is still being met (1 day before due_date).

Another solution would be to make an identical user task and have the timer boundary event go into that one. The only difference would be, the new user task wouldn't have the timer boundary on it, so it wouldn't keep sending emails. At 1 day before due_date, the initial user task would be interrupted, the new user task would be triggered, and the user would get another reminder email (which you could even customize different to say you only have 1 day left). 

0 0
replied on June 25, 2019

I appreciate your help. But I still could not resolve the issue.

We have reminders in our processes as you have mentioned in your first solution and it works.

But if the due date is based on what the user is going to submit on the form, I would like to use the due date variable.

I removed the due date based on a variable from the user task, but used it only in the Timer Catch event, still it is running in a loop.

So I'm wondering in which scenario does the 'Based on a Variable' work for the Timer Catch event.

0 0
SELECTED ANSWER
replied on June 25, 2019

You need to do something like the process below. If you wrap the timer boundary event back into the same user task, it will interrupt the existing user task, create a new user task, but the new user task will already be passed the timer, so it will loop again and again. After the timer event hits 1 day before the due date, you need the process to go to a different user task (with all the same settings) but with no timer. 

0 0
replied on June 25, 2019

Thank you, will try that.

0 0
replied on June 25, 2019

It works well!

So does that mean that if you use a due date based on a variable you cannot wrap back the timer event to the same user task?

But if we use the Wait condition as Until/For you can wrap it back to the same user task without any issue?

0 0
replied on June 25, 2019

Effectively yes. It's not about the due date, it's about the timer boundary event (but you are using the due date in your timer boundary event, so they are the same in your case). 

If you set the timer boundary event for a specific date and time, whether it's before/after a variable or just a set time you choose, you cannot wrap the timer back around to the same user task. This is because the new user task you would be creating is already "over due" since it's past that time you set. This is also a problem for the Wait until case. If you wait until Jan 1 to throw the timer and then wrap back around, it will still be passed Jan 1 and it will throw again and again. 

If you set the timer to wait for a specific amount of time, that will work. The first user task will be interrupted after 2 days (for example), the process will wrap back around and create a new user task that also has to wait for 2 days. 

0 0
replied on July 9, 2019

Can the timer catch event based on a variable be sent at a different time besides midnight? 

0 0
replied on July 9, 2019

If you use the time option for the variable and set a time other than midnight, then the timer will be based on that time.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.