cancel
Showing results for 
Search instead for 
Did you mean: 

Every user tasks need to be rollback

uping
Champ in-the-making
Champ in-the-making
I am a beginner of Activiti.
I have a complicated process with more than 10 user tasks. As request from customer, every user tasks maybe failed and need to be rollback/rejected to last state. How do I handle this case? It's too complicated if I add a gateway for every user task, and it makes my BPMN diagram mess. Is there any simple way for this requirement?
4 REPLIES 4

meyerd
Champ on-the-rise
Champ on-the-rise
As request from customer, every user tasks maybe failed and need to be rollback/rejected to last state

What does that mean, exactly? What means the userTask fails?

If you have some custom escalation logic you want to apply to every userTask (i.e. a timer boundary event http://activiti.org/userguide/index.html#bpmnTimerBoundaryEvent), you could model it in a subprocess. You can then pass the parameters like "assignee" and escalation timers to the subprocess.

uping
Champ in-the-making
Champ in-the-making
As request from customer, every user tasks maybe failed and need to be rollback/rejected to last state

What does that mean, exactly? What means the userTask fails?

That means in every user task form, we need provide "Reject" option so they can rollback. I have read the link you provide, it doesn't solve my problem but thanks.

trademak
Star Contributor
Star Contributor
Hi,

What you could do is use an exclusive gateway and based on the outcome of the user task you can go back to a previous element.
That's not really a rollback, but you can still go back in the process definition.

Best regards,

huan_ling
Champ in-the-making
Champ in-the-making
My solution to this problem is : 
you save the the actions into a database as a record.
When you need to revert the workflow to a specific stage, just restart the workflow and use the action records to do the tasks until the workflow goes to the point which you want to revert to.