flowable / flowable/flowable-engine

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

Open
#2,571 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
7h 8m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.