userTaskProcess.bpmn (10.6 KB)
What we are trying to find out is -> if there is a way to uniquely identify the ID/Activity Instance ID of the execution which has registered a compensation Event which in turn will create Compensation executions.
What we are trying to do is that during the main service/user task execution tag the records in my Database that got updated by this task with it’s unique ID that engine generates. If the corresponding compensation event happens, we want to find out what was the corresponding execution task’s ID so that we can find exactly those records in our database and revert them
Use Case details:
- Attached Bpmn process has one Compensation Task(Delete Simple Task) corresponding to a Service Task(Simple Task) and another Compensation Task (Delete User Task) corresponding to User Task(User Input Task) respectively.
- When any error occurs after the User Input Task, both Compensation Task(Delete User Task and Delete Simple Task) gets called in the sequence it got registered
- In any of the Compensation task we wanted to get the Execution Id or Activity Instance Id of the corresponding Task for which the Boundary Event was registered.
Reason : Each of these Task has a specific operation which we wanted to bind using the execution Id or Activity Instance Id so that during the compensation we can make use of this ID to revert the changes exactly done corresponding to this Activity Instance Id