- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2019 05:58 AM
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
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2019 10:12 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2019 11:07 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2019 02:10 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2019 10:12 AM
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.