3

There is a way to pass the candidate users dynamically to Activiti workflow as described in .

How do I pass a list of candidate users to an activiti workflow task in alfresco?

When candidateUser/candidateGroup is set for a UserTask using a variable, when is the expression evaluated ? Is the task id -> user/group persisted in database for fast query of like, list all the tasks a particular use can claim ? What table is it stored in ?

Community
  • 1
  • 1

2 Answers2

2

When human tasks are created there are two distinct events that fire.

Create : When the task itself is created and most of the task metadata is associated with the task.

Assign : When the task assignment is evaluated and the task is assigned to either an assignee or candidateGroup.

As such, the candidateGroup expression is evaluated during the assign phase. This means we can easily manipulate the list of candidates based on a rule, database result or some other business logic prior to the task actually being assigned using a task listener that fires on the create phase.

Hope this helps, G

Greg Harley
  • 3,230
  • 1
  • 11
  • 14
1

Concerning the "What table is it stored in ?" part of your question:

Candidate start groups/users for a given task or process are stored in the ACT_IDENTITY_LINK table.

Philippe Sevestre
  • 974
  • 12
  • 18