I have following user task defined:
< userTask id=“Task1” name=“Task1”>
OR
< userTask id=“Fileupload” name=“Upload File” flowable:assignee="${UF}">
< /userTask>
Although these task have assignee type of assignment defined, I am able to do claim/unclaim (via API) operations on such tasks.
Question - Is it fine to call claim/unclaim API on a task in which assignee attribute is defined?
Or it is a bug, or designed in a way that even though I haven’t added candidateUsers or candidateGroups attribute, it considers these attributes are there?
Does not look like you are setting candidate group or a candidate user. Try to populate one of those fields in the task and then that task should be eligible to claim.
if any task already has an assignee then claiming it will result into an exception. so No you can not claim a task which has flowable:assigness=“user” defined. you have two options, add candidate group/user then claim it or just add any type of connection using identityLink. I hope this covers your question.
Not a bug. Just means that user can be claim the task and thence be the assignee. By setting the Candidate Group and/or Candidate User you essential narrow who can claim the task.
This task could be assigned to group. I am maintaining this assigned to group information outside flowable. Question1 - Is there any way to skip setting the variable(flowable:assignee="${UF}") values and task gets initiated without setting the variable value(something like task getting initiated in unclaimed state)?
Assuming I need to set some assignee for “${UF}” to initiate this task, currently I am trying to set some dummy value (say GROUP_SOMEID). And when I get the call for someone trying to claim the task, I am using TaskService#setAssignee(String, String) API to set the actual user.
Here I have two Options-
Option1 - Use setAssignee API itself.
Option2 - Since I have set GROUP_SOMEID, so I cannot claim it directly. So, first TaskService#unclaim the task and then TaskService#claim it again.
Question2 - Which one is better option - Option1 or Option2.
Candidate Groups or Candidate users will control what users will be eligible to claim task.
If user is part of Candidate group or user, then use the api claim method to claim that task for that user. When the task is claimed then the user will become the assignee.