Use of TimerBoundaryEvent after a user task

cancel
Showing results for 
Search instead for 
Did you mean: 
ash6892
Member II

Use of TimerBoundaryEvent after a user task

Jump to solution

Hi,

I'm executing a user task, say "CC Selects Doctor". So CC has 10 mins to select a doctor, and if they don't select a doctor within 10 mins, system task should be fired and a doctor should be selected automatically through the system task. 
But a CC can select the doctor on the 2nd minute also, in shot, they can select the doctor at any point of time within those 10 mins. So If CC has selected the doctor in, say 3rd min, I don't want system to wait for remaining 7 mins and perform some another task. And want to stop that task which was supposed to be executed after 10 mins, so that the system task is not executed after 10 mins even when CC has selected a doctor within those 10 mins.

So which Timer Event will be suitable here in this scenario. 
Help is appreciated.

 

Thanks 

1 Solution

Accepted Solutions
mouldi
Active Member

Re: Use of TimerBoundaryEvent after a user task

Jump to solution

Hi ash,

If the cancel activity is set to false, the original workflow won't be interrupted, so it depends on your workflow, whether you want to complete your current route or change it to the new one after the Timer,
I see that you want to interrupt your workflow if the user doesn't select a doctor within 10 min, so in this case you can keep the cancel activity true and do whatever you want after the TimerBoundaryEvent.

For the second part, you can create an "End"  Listener in your TimerBoundaryEvent config where you can pass a Bean as a Delgate Expression. That same bean should implement the interface "ExecutionListener" which includes a method called "notify", which will be called automatically when timer triggered.    

 

View solution in original post

3 Replies
mouldi
Active Member

Re: Use of TimerBoundaryEvent after a user task

Jump to solution

Hi ash,

Yes you can achieve this by adding a TimerBoundaryEvent to your user task.
Just make sure that you have the "cancel activity" set to false so you don't interrupt your workflow.
If the user selected a doctor within the 10 minutes, you have to complete the current task, to advance in your workflow without hitting that particular SystemTask.

 

Just a trick : You can use an ExecutionListener with your TimerBoundaryEvent to avoid the SystemTask linked to the timer.

ash6892
Member II

Re: Use of TimerBoundaryEvent after a user task

Jump to solution

Hey moudi, thank you for your response and the suggestion.
I have two queries now. 
1) suppose user doesn't select doctor within 10 mins, the timer task will be executed. But if the cancel activity is set to false, after 10 mins also the user will be able to select the doctor because that activity is still not cancelled. I don't want this to happen.
What i want is, if the system task is executed through the timer boundary event, the user should not be able to select the doctor now. 
Any trick for this? How to achieve this? 

2) How ExecutionListener will help in avoiding system task? Can you please elaborate more on this? 

Thanks in advance. 

mouldi
Active Member

Re: Use of TimerBoundaryEvent after a user task

Jump to solution

Hi ash,

If the cancel activity is set to false, the original workflow won't be interrupted, so it depends on your workflow, whether you want to complete your current route or change it to the new one after the Timer,
I see that you want to interrupt your workflow if the user doesn't select a doctor within 10 min, so in this case you can keep the cancel activity true and do whatever you want after the TimerBoundaryEvent.

For the second part, you can create an "End"  Listener in your TimerBoundaryEvent config where you can pass a Bean as a Delgate Expression. That same bean should implement the interface "ExecutionListener" which includes a method called "notify", which will be called automatically when timer triggered.