cancel
Showing results for 
Search instead for 
Did you mean: 

Candidate User Group, what's wrong?

giga_zhang
Champ in-the-making
Champ in-the-making
my bpmn:


<bpmn2:potentialOwner id="_NFb11qY0EeGaE-5WBXce0w">
        <bpmn2:resourceAssignmentExpression id="_NFb116Y0EeGaE-5WBXce0w">
          <bpmn2:formalExpression id="_NFb12KY0EeGaE-5WBXce0w">chenjia</bpmn2:formalExpression>
        </bpmn2:resourceAssignmentExpression>
      </bpmn2:potentialOwner>

when id start process,the data in task table is  Smiley Sad :
ID_   REV_   EXECUTION_ID_   PROC_INST_ID_   PROC_DEF_ID_   NAME_   PARENT_TASK_ID_   ESCRIPTION_   
TASK_DEF_KEY_   OWNER_   ASSIGNEE_   DELEGATION_   PRIORITY_   CREATE_TIME_   DUE_DATE_
907   1   905   905   com.baison.leave.v1:1:904   apply    NULL NULL
_ACC3172F-BC36-4701-BC8D-CB9D86DD8D13 NULL NULL NULL   50   30-5月 -12 05.29.36.514000 下午   
   
the data in identitylink is Smiley Sad  :
ID     REV_  GOURP_ID_ TYPE_      USER_ID_   TASK_ID
908   1   chenjia   candidate   NULL         907

what's wrong ? :?:
4 REPLIES 4

pedrog1
Champ in-the-making
Champ in-the-making
I don't fully understand your problem.

Can you please try to elaborate your question?
And if possible, try to better format the table data you posted so it will be easily read  Smiley Wink

giga_zhang
Champ in-the-making
Champ in-the-making
I don't fully understand your problem.

Can you please try to elaborate your question?
And if possible, try to better format the table data you posted so it will be easily read  Smiley Wink

From my BPMN file,it seems the task owner should be chenjia,

but after I called the startProcessInstanceByKey method of RuntimeService, the 'OWNER_' and 'ASSIGNEE_' in task table are NULL

I select the identitylink table also,'GOURP_ID_' is 'chenjia' and '' USER_ID_ is NULL

taskService.createTaskQuery().taskCandidateUser("chenjia").count() is 0
taskService.createTaskQuery().taskAssignee("chenjia").count() is 0
taskService.createTaskQuery().taskUnnassigned().count() is 1
taskService.createTaskQuery().taskCandidateGroup("chenjia").count() is 1

mathiasd
Champ in-the-making
Champ in-the-making
This is the normal behavior, potentialOwner sets the candidateGroup. If you want to assign directly the task to someone you can use the "activiti:assignee" attribute. To set the task candidateUser, you can use the humanPerformer attribute.

pedrog1
Champ in-the-making
Champ in-the-making
See user guide
http://activiti.org/userguide/index.html#bpmnUserTaskAssignment
If no specifics are given whether the given text string is a user or group, the engine defaults to group. So the following would be the same as when group(accountancy) was declared.

Regards