flowable / flowable/flowable-engine

Participant IdentityLinks on the process instance are not created when changing task assignee with TaskService.saveTask(Task task)

Aperta
#2,571 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
9.5k
Fork
2.9k
Merge medio
7h 8m
PR unite (30g)
2

Descrizione

**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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia dai punti di ingresso TaskService.saveTask(Task task) e TaskService.setAssignee(String taskId, String userId) citati nell’issue, quindi traccia il modo in cui ciascuno aggiorna gli assegnatari dell’attività e gli IdentityLinks dell’istanza di processo. Confronta il loro comportamento usando una riproduzione mirata basata su Flowable 6.5.0. Il lavoro è completato quando entrambi i percorsi creano in modo coerente l’IdentityLink PARTICIPANT dell’utente, con un test di regressione che copra la discrepanza.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.