How can I get the actual assignee of a user task in Camunda 8? I guess in Camunda 7 you could use a task listener for the problem, but how can I solve it in Camunda 8? I need the userId of the actual user a task was completed by for documentation purposes and in the rest of my process to assign further tasks to the same user. Any help would be appreciated!
you can use the Rest API to get the details.
assignee string
The username/id of who is assigned to the task.
taskState string
Possible values: [CREATED
, COMPLETED
, CANCELED
, FAILED
]
The state of the task.
Camunda7 doesn’t need a listener either. I don’t quite understand why we need to use a listener to record the completion person. Isn’t there an API? Why don’t we use API methods
Thank you guys for the hint about the API, that will probably help as a workaround. I would have preferred a solution without the need to use code.
My usecase is something like this:
A candidate from a candidate group takes Task1. Then, somewhere in the future, Task2 needs to be executed by the same actual user.
If I understand your suggestions correctly, the solution now would be something like this: (unfortunately I can only upload one image):
Add a service task after Task1 that uses the API to read the assignee of Task1 and then provide it as a variable to the engine and use the variable as assignee for task2? If so, how would I get the taskId of Task1 of the current instance to query the API?
Maybe I should add that I use a managed version of Camunda 8. I only have access to Modeller, Tasklist and Operate and can probably get access to the API but I can not add code additions except for task workers.
@sts - this is a very interesting use case, and a great bit of feedback. I will share this feedback with the product team!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.