cancel
Showing results for 
Search instead for 
Did you mean: 

candidateGroup not showing tasks

uwehale
Champ in-the-making
Champ in-the-making
I'm new to activiti.  Running 5.14 explorer and rest. Using the KIS BPM modeler to design the worklfow.

I'm having a problem with user tasks not showing up for logged in user belonging to a group.

On a user task, I edit the assignments attribute, which brings up the popup.  I select the candidateGroups type and enter systemgroup as the expression.

If I export the mode, the task is defined like this.
<userTask id="test" name="test" activiti:candidateGroups="systemgroup"></userTask>

I'm using a user 'system' logged into explorer.  That user is part of the systemgroup which is of type 'assignment'.

When I create the process instance, the task never shows up in the task list.

If I use the assignee type instead of candidateGroups, the task will show up.
<userTask id="test" name="test" activiti:assignee="system"></userTask>

Does the candidateGroups require a different expression than assignee?  Is there something else I need to configure to get this to work?

Thanks,
Uwe


2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Uwe.

You can have a look on the following test
org.activiti.examples.bpmn.usertask.taskcandidate.TaskCandidateTest#testSingleCandidateGroup in the activiti sources.


    // Task should not yet be assigned to kermit
    List<Task> tasks = taskService
      .createTaskQuery()
      .taskAssignee(KERMIT)
      .list();
    assertTrue(tasks.isEmpty());

    // The task should be visible in the candidate task list
    tasks = taskService.createTaskQuery().taskCandidateUser(KERMIT).list();
    assertEquals(1, tasks.size());
    Task task = tasks.get(0);
    assertEquals("Pay out expenses", task.getName());

Task should be visible in the candidate task list.

Regards
Martin

hemamalini
Champ in-the-making
Champ in-the-making
Thank you very much. It worked