Extending TaskList API

Hi there,

I am exploring the tasklist GraphQL API of Camunda 8 and I am able to query the data that I need for most of the scenarios. I think for some of the use cases the out of the box schema may not be sufficient.

References:
Schema reference from the documentation here Schema Documentation | Camunda Platform 8
Schema: https://docs.camunda.io/assets/files/tasklist-24f4acf1bf3799b067e9e7921749c6b8.graphqls

Question:
I need to get the list of tasks which are of a specific process definition id. Since the processDefinitionId is not in “input TaskQuery {}”, I am unable to filter the tasks based on the processDefinitionId. What is the recommended way to customize for this kind of usecases ?

Thanks,
Srihari.

1 Like

Hi there,

Can someone throw some light on this topic ?

Thanks,
Srihari.

Hi @hari_kiran ,
you’re right, it’s not possible currently to filter by process. The only thing that comes into my mind is to filter by taskDefinitionId, which is the id of the task node from the diagram.
Otherwise this sounds like a valid feature request, I will pass this info to PM.

Best regards,
Svetlana

1 Like

Hi @hari_kiran,

Thanks for your question.

Would you mind elaborating a bit about your use case to help us with prioritization of this feature request? Is there anything else missing from your perspective in Tasklist API?

Have a nice day,
Aleksander

Hi @aleksander-dytko
In my view, we should be able to filter the tasks based on

a. Process Definition (this helps in listing all the tasks related to a specific process)
b. Creation Dates (between 2 dates, or after a certain date, or before a certain dates)
c. Process Instance Id (to fetch all the active tasks of a specific process instance)
d. DueDate (I should be able to filter tasks based on duedate)
e. I should be able to list the tasks which are assigned to a group but not claimed yet.
f. I should be able to list all the tasks for which there is no assignee or candidate group. (This could happen because of bad modelling where developer could have missed adding either of them)

Also, the object “Task” doesnt have the process instance id/key. Which I believe is a good to have. Also, I believe the Due Date should be included in the task object.

These are all I could think of as of now.

Regards,
Srihari.

@hari_kiran thanks for your thoughts about filters! I will move this issue into our backlog and update you once we have further information.

Do you have a timeline until when you need these capabilities?
Just to mention - if you’re a Camunda customer, you can also raise a Feature Request in Jira.