flowable / flowable/flowable-engine
Participant IdentityLinks on the process instance are not created when changing task assignee with TaskService.saveTask(Task task)
- Vorherrschende Sprache
- Java
- Sterne
- 9.5k
- Forks
- 2.9k
- Ø Merge
- 7 Std. 8 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
**Describe the bug**
When I use the TaskService to set the assignee on a task using the method `TaskService.setAssignee(String taskId, String userId)` then in addition to changing the assignee on the task, an `IdentityLink` is also created on the process instance with the `userId` being a `PARTICIPANT`.
However, when I change the assignee on a task by updating the `TaskEntity` and using the method `TaskService.saveTask(Task task)` then the `PARTICIPANT` `IdentityLink` is not created on the process instance.
**Expected behavior**
I would expect these two different methods to update the assignee on a task to be consistent with adding an `IdentityLink` for the user as a `PARTICIPANT` on the process instance. I currently need to have a special handling for `saveTask(...)` using an eventlistener to add the identitylink manually.
**Code**
See:
https://flowable.com/open-source/docs/javadocs/org/flowable/engine/TaskService.html#saveTask-org.flowable.task.api.Task-
and
https://flowable.com/open-source/docs/javadocs/org/flowable/engine/TaskService.html#setAssignee-java.lang.String-java.lang.String-
**Additional context**
This was using Flowable-6.5.0
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit den im issue referenzierten Einstiegspunkten TaskService.saveTask(Task task) und TaskService.setAssignee(String taskId, String userId) und verfolge anschließend, wie jeder davon die Aufgabenzuweisungen und die IdentityLinks der Prozessinstanz aktualisiert. Vergleiche ihr Verhalten anhand einer fokussierten Reproduktion auf Basis von Flowable 6.5.0. Als erledigt gilt die Aufgabe, wenn beide Pfade konsistent den PARTICIPANT-IdentityLink des Benutzers erstellen und ein Regressionstest die Abweichung abdeckt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100