Hi,
I’m little curious to understand behavior of candidate users/grpup, because I created a simple UserTask with Candidate User (john, mary).
I’m unable to start/instantiate process with success and even an entry in ACT_RU_TASK table, but assignee column is null.
but unable to see the same task in taskslist application.
Thanks,
Suhas
task.assignee is used to indicate that a user is actually working on the task, see claim()/unclaim()
What you are looking for is the ACT_RU_IDENTITYLINK table … here all candidateGroups/Users for a task are stored.
Normal task-assignment works like:
- configure a list of possible users or groups (candidates) on the task, either static in the model or dynmically during task creation (see TaskListener)
- user queries list of potential tasks that he can work on
- user decides to work on a task (claims it), now task.assignee is set to his name
- task is no longer displayed for other candidates
- user either completes or cancels task … in which case the task is “unclaimed” and available for all candidates again
3 Likes
Hi @jangalinski,
Thanks a lot for the detailed explanation.
I think once candidate user login into tasklist app, I was expecting claim/unclaim option. May be because task query filter is ‘assignee’. Looks like limitation in tasklist app because it might be using Task ReST API’s to query tasks. This ReST API implementation will make AND of assignee, candidateUser query parameter.
If I call http://localhost:8080/engine-rest/task?candidateUser=john&assignee=john I see 0 tasks.
I tried adding john to filter authorization, then user is able to view task in ALL TASK.
Thanks,
Suhas
Hi,
One question about candidate users.
I assign two (or more) candidate users to a task. How does this work in the execution? Will the task be available in the tasklists of both candidate users and it’s up to them how claims it first?
I made an example but I don’t see the task to any of the candidate users.
Thanks!
Hi @kontrag,
If the task is already assigned (or claimed), you need to query with includeAssignedTasks() to see the task in the list.
Hope this helps,
Ingo
Hi @Ingo_Richtsmeier,
My question is not how to query the Tasklist.
It’s the following example: In the modeler, I write in the “Candidate Users” field of a User Task the names of two users.
When the process instance in runtime reaches that User Task, are the task both visible in the “Group Tasks” inbox of both users? How can I candidate user work on it? The example I made doesn’t make the task visible to the candidate users.
Thanks!
Hi @kontrag,
I created a process with this user task:
<bpmn:userTask id="Task_0k3eep8" name="Do something" camunda:candidateUsers="john, peter">
<bpmn:incoming>SequenceFlow1</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_03jr3oc</bpmn:outgoing>
</bpmn:userTask>
When I query the engine in a JUnit test:
Task task = taskService().createTaskQuery().taskCandidateUser("peter").singleResult();
assertThat(task).hasName("Do something");
the test is green.
In the distro I added a new filter to the tasklist with criteria CandidateUser is peter and I see the task there. The same works for john.
Hope this helps,
Ingo
1 Like
Hi,
In camunda 7.7, I set BusinessGroup as candidate group through a variable ${group1}. It happens that once a user belonging to BusinessGroup for example, user1, claimed the task, and logout from tasklist, another user (user2) belonging to the same group is still able to see that same task, of course, indicating the task belongs to user1. I want the task to disappear from user2 tasklist once user1 claimed it.
Please your help.
@David_Ray you need to create a new “Filter” in the task list that does not show tasks that are currently claimed.
https://docs.camunda.org/manual/7.7/webapps/tasklist/filters/