How to retrieve tasks filtered by custom process variable via Tasklist API (GraphQL or REST)

Hello Camunda Team!

Not sure if my topic suits this category but I didn’t find any category related to Tasklist.

Is it possible using Tasklist API (currently we use GraphQL implementation but will move to REST calls) to retrieve all tasks filtered by specific process variable?
I’m asking because we need to get tasks only for the specific user in our custom tasklist implementation but UserID is our custom process variable so we can not use assignee param as our UserId is not in Camunda itself.

Thank you in advance for your suggestions!

Hello @mhais!

Thanks for reaching out about this. We in fact have a feature aimed for 8.3.0 release about filtering tasks by process variables (also by task variables in a more dynamic way).

One suggestion would be to use the “candidateUsers” field - this field should be used to filter what users are candidates to assign/complete the tasks and it accepts a list of strings, so you could send your own id to it and later filter using it using the search method.

Here, the link to the search query (as you are using GraphQL) - tasks | Camunda Platform 8 Docs

And here the candidateUser that you could use to filter your tasks by a custom userId:

To create a task with a candidateUser, in your process you would have to assign properly your process variable containing your custom Id to the candidateUsers field - for that you need to use the Assignment properties:

image

I hope that this helps!

Thank you very much for your answer and waiting for Camunda 8.3 release.

Hello @marcosgvieira

Do you know if it is possible to see what you as a Camunda team planning to put into next release?

Some kind of feature lists or etc. available for public view?

I’ve found this Releases · camunda/camunda-platform · GitHub so should but here I can see release note but not plan.

Thank you!

@mhais you can check our public RoadMap here (it’s filtered by tasklist component on the link below):
Public RoadMap

Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.