Flowable transaction rollback

image

In above workflow, if value of X is 50, then last user of parallel Task1 will not be able to complete the task and get following error: “No outgoing sequence flow of the exclusive gateway ‘idGateway’ could be selected for continuing the process…”

  • Now suppose Task1 is assigned to three user - "User1", "User2", "User3".
  • And “User1” completes the task.
  • I have a requirement, where, I need to complete all the remaining users in one go. So, I call TaskService.complete(taskId) for "User2" and than for "User3". This operation should complete tasks for all the remaining users or for none.
  • Now, when value of X is 50 and none of the condition is satisfied, I won’t be able to mark the last user “User3” as complete. In that case I have requirement where I should rollback all the previous tasks which were committed in this transaction, that is rollback for “User2” in this case.

Is it possible with flowable to rollback "User2" transaction? If yes, what type of configuration I need to do?

@khushboo

Why doesn’t your BPMN process model have an end event?

events

See:

Ref: Compensating Transaction pattern

I missed to add end events. My workflow was a big one, so created and pasted a sample one for explanation here. Added end events. Thanks for pointing.