cancel
Showing results for 
Search instead for 
Did you mean: 

TimerBoundaryEvent - AutoComplete task when timer expires

sredrouthu
Champ in-the-making
Champ in-the-making

Hi,

For a TimerBoundaryEvent, when cancelActivity is "false" and "activiti:endDate" is specified, can the original process be ended? I still see the task is assigned to the respective user. 

If there is a repeating job along with the end date, TimerBoundaryEvent is not creating other jobs when it reach the end date. Along with this, our requirement is to end the original process when the timer expires.

Thanks in advance.

1 ACCEPTED ANSWER

gdharley
Elite Collaborator
Elite Collaborator

Ok thanks for the details.
So if I understand correctly.

After the Boundary Event Timer fires the 20th time you want to cancel the attached task.
If this is what you need, then you could add a counter to the boundary event either as a script task or execution listener. After you hit the last timer, throw a signal to cancel the original task.

See simple example below:


Obviously you can streamline this by throwing the signal inside the timer event boundary listener and checking the count there, but the basic approach is the same.

View answer in original post

11 REPLIES 11

gdharley
Elite Collaborator
Elite Collaborator

If your goal is simply to close all open tasks after the timer boundary event fires, then have the flow do it's necessary cleanup work then end with a "Terminate End Event" rather than a none end event. This will close all open jobs and tasks.

Perhaps I am missing something, if you could post your process with a description of your desired goals, it may help.

Thanks,

Greg

‌

sredrouthu
Champ in-the-making
Champ in-the-making

Greg,

Thanks for your reply.

TimeCycle R20/PT2S will fire for every 2 seconds and 20 times (cancelActivity is set to false). When ever the timer fires, we have a service class that do some job. After the timer gets expired, we have to end the current process / task (not all the open tasks or jobs).

Thanks

Hi,

"If there is a repeating job along with the end date, TimerBoundaryEvent is not creating other jobs when it reach the end date"

could you provide a unit test for this scenario? (or at least the bpmn20.xml file of the process) it will help for reproducing the issue.

Thanks.

gdharley
Elite Collaborator
Elite Collaborator

Ok thanks for the details.
So if I understand correctly.

After the Boundary Event Timer fires the 20th time you want to cancel the attached task.
If this is what you need, then you could add a counter to the boundary event either as a script task or execution listener. After you hit the last timer, throw a signal to cancel the original task.

See simple example below:


Obviously you can streamline this by throwing the signal inside the timer event boundary listener and checking the count there, but the basic approach is the same.

sredrouthu
Champ in-the-making
Champ in-the-making

Signal throw and catch worked! Thanks for your help!

gdharley
Elite Collaborator
Elite Collaborator

Excellent. If you could mark the answer as correct I would appreciate it.

sredrouthu
Champ in-the-making
Champ in-the-making

"If there is a repeating job along with the end date, TimerBoundaryEvent is not creating other jobs when it reach the end date (after the timer expires)" which is expected and is working as the same and we don't have any issue with this. 

After the timer expires, User Task is still open. Need help on ending the current process.

what about such a construction, is it solving your needs?

How can we cancel a user task in Script Task?

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.