cancel
Showing results for 
Search instead for 
Did you mean: 

How Get reassign and involved People history for task?

shaparak-smmira
Champ in-the-making
Champ in-the-making
hi to all

I want to get  reassign and involved People history for task,like that in actiivti-explorer that name is events in right panel of tasks
I use historyservice for this but I cant find suitable query for this .

plz help me for this
11 REPLIES 11

shaparak-smmira
Champ in-the-making
Champ in-the-making
Hmm that is probably because the commenting uses the current user:

try to do this:

try {
  identityService.setAuthenticatedUserId("Joram");
  … // your logic
} finally {
  identityService.setAuthenticatedUserId(null);
}

tanks a lot

shaparak-smmira
Champ in-the-making
Champ in-the-making
i want to save comment in data base for each task and my code was it :
  task.setDescription("this is a test");
  task.setAssignee("kermit");
  taskService.saveTask(task);

it dont save taskevent in "act_hi_comment" table when I use

taskService.setAssignee(task.getId(),"kermit");
it is work and save event to  "act_hi_comment" table but when use this code :

taskService.setAssignee(task.getId(),"kermit");
  task.setDescription("this is a test");
  taskService.saveTask(task);

taskService.saveTask(task) get this error
org.activiti.engine.ActivitiOptimisticLockingException: TaskEntity[401] was updated by another transaction concurrently
what's problem in my code?