cancel
Showing results for 
Search instead for 
Did you mean: 

Find tasks that were created for a candidate group from ID of task claimed by one user

mnj111
Champ in-the-making
Champ in-the-making
Hi all,

Is there a way to find which tasks that were created for a certain candidate group from one of the tasks that was claimed ?

- User belongs to candidate group "devs" that has 3 other candidates
- User claims the task
- Task has ID 123
- Find other tasks with the help of ID 123 that were generated and were open before user claimed the task 123

Thanks in advance.
3 REPLIES 3

hari
Star Contributor
Star Contributor
Hi,

You can get the process instance Id from the task ID. Use that process instance ID to get all the tasks which are open.

trademak
Star Contributor
Star Contributor
Hi,

When a task is claimed it has an assignee, and that's the value you can search on currently. To query based on the candidate group you would need a custom native task query right now. But it would be good to also allow you to search on candidate group when a task is already claimed. Could you create a JIRA issue for this?

Best regards,

mnj111
Champ in-the-making
Champ in-the-making
Thank you for your prompt responses. What I am actually try to do is when user claims a task, I want to be able to figure out which other tasks exists/remains open from that pool, and close them. My expectation was that when one user claims a task from a pool, other tasks are deleted or completed, most probably completed because deletion will throw me an exception. Now, another issue is if I manually close the tasks, it will go a step further in my process and generate another user task. So, that doesn't help. I tried using "deleteUserIdentityLink" to remove any association with the task at hand, I am not sure if this is the right approach.
I will try to create a JIRA ticket soon, we need unit tests along with it right ?