I am just creating a query to find out if a task for a given process is active and / or claimed.
GET …/task?processInstanceId=44f20433-4826-11ea-bc58-74e54374d2e3&active=true
The problem is that setting active to true or false brings the same result.
I need to know which task is active and if there is a task active I need to know if it is claimed and by whom.
Can anyone help?
With active I mean that the task has the process token and is ready to claim .
in Camunda docs: The typical use case is to query all “active” tasks for a user for a given date.
Active Only include active tasks. Value may only be true , as false is the default behavior.
If you query for tasks the way you have then you’ll only find tasks in which there is a token waiting to be completed - the result never return completed tasks.
active parameter when set to true, is used to return tasks that are not suspended.
But as I understood, your need is different… You need to retrieve the set of running tasks which have been claimed and another set of running tasks which are still unclaimed.
The above get request without the active parameter would retrieve all running tasks for the passed process instance Id.
If you need to retrieve only claimed tasks then pass the parameter assigned with a true value.
And if you need to retrieve only unclaimed tasks then pass the parameter unassigned with a true value.