cancel
Showing results for 
Search instead for 
Did you mean: 

how can get 'execution' in activiti:candidateUsers expression

accipiter
Champ in-the-making
Champ in-the-making
<userTask id="usertask1" name="usertask1" activiti:assignee="${countersignAssignee}"        activiti:candidateUsers="${activitiEmpService.listOrgEmp(activitiEmpService.getComCode(execution.id),'10')}"                </userTask>

in this case, i need to calculate the candidateUsers by company code(localComCode) stored in local variables in execution.
i have tried
activiti:candidateUsers="${activitiEmpService.listOrgEmp(localComCode,'10')}"             
and the result is it simply use the first variable named 'localComCode' and doesn't consider if it is the one in this execution.

so i tried another way
activiti:candidateUsers="${activitiEmpService.listOrgEmp(activitiEmpService.getComCode(execution.id),'10')}"    
i m trying to get that local variable by myself, but i cant pass the 'execution' to my java class. the result is 'execution' is not defined.

could you tell me the way to solve the problem?
3 REPLIES 3

warper
Star Contributor
Star Contributor
Hi accipiter!
Have you tried execution.getVariableLocal("localComCode")?

accipiter
Champ in-the-making
Champ in-the-making
that is what i an trying to do. but i cant get execution in my java class.

accipiter
Champ in-the-making
Champ in-the-making
if what you means if the 'localComCode' has been stored correctly, and the answer is yes.
i can get them in the java class where i stored them, and i can see them stored correctly in the database - table ACT_RU_VARIABLE and ACT_HI_VARINST, each was stored with its own execution_id_