cancel
Showing results for 
Search instead for 
Did you mean: 

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

ProgentysDev
Champ in-the-making
Champ in-the-making

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

2 REPLIES 2

amod-gadre
Champ in-the-making
Champ in-the-making

I am looking for an answer to same query. 

openpj
Elite Collaborator
Elite Collaborator

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