How to repeat a failed service task using intermediate timer catching event's time cycle config?

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

How to repeat a failed service task using intermediate timer catching event's time cycle config?

I have a service task. When it fails, I'm setting a boolean process variable "taskFailed" to true. An exclusive gateway after this task should end the flow if taskFailed is false or re-direct flow to a intermediate time event when taskFailed is true.

Using this intermediate timer catching event, after 1 min, I wanna redirect flow back to service task so that I could retry it. I also want to retry it for 5 times, waiting for a min each time before retry. So in the intermediate timeer catching event, I could set lifecycle to R5/PT1M.

Now after retrying for 5 times, if the task still fails, I want to end process. Now how do I tell intermediate time event to end process after 5th recurring time? How should I re-direct this intermediate timer event to an end event after time cycle finishes?image.png

2 Replies
amod-gadre
Customer

Re: How to repeat a failed service task using intermediate timer catching event's time cycle config?

I am looking for an answer to same query. 

openpj
Moderator
Moderator

Re: How to repeat a failed service task using intermediate timer catching event's time cycle config?

I suggest to redesign your process using a BPMN error event attached to your Service task and then use a ScriptTask or another ServiceTask to manage the counter.

Something similar to the following: 

Look at the following documentation:

https://www.activiti.org/userguide/6.latest/#serviceTaskBpmnErrors

 

Hope this helps Smiley Wink