Current user/assignee in Camunda 8 Tasklist claimTask mutation

What is the purpose if the assignee parameter of the claimTask mutation in the Camunda 8 Tasklist graphql API?

The mutation is documented with : “Claim a task with taskId to currently logged in user.” If that is true, then why is there a parameter for the assignee.

Best regards!

Hey hey @swiffler! Welcome to the Camunda Forum :slight_smile:
The mutation claimTask is used by an individual user who can ‘claim’ a task, indicating that they are picking the task from the pool to avoid multiple people working on the same task.

Of course the parameter of an assignee needs to be passed accordingly. You can set the assignee to another user as well if you are using graphQL.

Reading recommendation about the Human Task Management:

Hopefully this was helpful for you!

Hi @swiffler - the wording in the docs is a bit misleading, I will create a quick PR to improve this.

What is meant is that you have to provide the currently logged-in user by the assignee argument. Since you’re calling a stateless API, you’re normally not authenticated as a user but via an API key, so technically there is no logged-in user known, so it needs to be provided.

Using the tasklist web application does that correctly in the background.
That design also gives you the flexibility to do your own user handling as the assignee can be any string that does not even have to be known to Camunda.

Hope that helps?

PR: Improve wording to avoid misunderstandings by berndruecker · Pull Request #974 · camunda/camunda-platform-docs · GitHub

Yes, sir. Thank you!
I think this could also be related to this documentation entry about a query of the same API.

Hontesly speaking this surprised me - I quickly double checked and we have an open issue to remove currentUser from the API (&docs): As part of this, that query will also be removed. Sorry for the confusion it did cause!