Describe the bug
The DefaultIdentityLinkIterceptor.handleCompleteTask method creates a new PARTICIPANT IdentityLink on the ProcessInstance the tasks belongs to every time a task completes.
Expected behavior
There should be a check if such an IdentityLink already exists before creating it. This is done in some of the other methods in the class by calling the addUserIdentityLinkToParent which does such a check.
Noticed that we had a lot of duplicates in the IdentityLink-tables for processes with a lot of tasks.
Describe the bug The DefaultIdentityLinkIterceptor.handleCompleteTask method creates a new PARTICIPANT IdentityLink on the ProcessInstance the tasks belongs to every time a task completes.
Expected behavior There should be a check if such an IdentityLink already exists before creating it. This is done in some of the other methods in the class by calling the addUserIdentityLinkToParent which does such a check.
Noticed that we had a lot of duplicates in the IdentityLink-tables for processes with a lot of tasks.
Code
Additional context This is present on the main branch.