05-19-2017 08:21 AM
i am currently trying to get finished process Instances with processDefinitionKey("courriersArrivés") and i want to check which process instances involved the user with id "ha".
when i type this
System.out.println( historyService.createHistoricProcessInstanceQuery().processDefinitionKey("courriersArrivés").involvedUser("ha").finished().list().size());
i always got 0 😕 even i am sure that i have tasks whcih where assigned to "ha" because when the process is runnig ha recieve its tasks,but when it is finished i face this problem
So how to do that in activiti ?
Thank's in advanced
05-19-2017 11:09 AM
05-19-2017 04:00 PM
i have already mention "ha" as a candidate in groupe "Bureau d'ordre",and this is how i assigned th task
taskService.addCandidateGroup(
taskService.createTaskQuery().processInstanceId(processInstance.getId()).list().get(0).getId(),
"Bureau d'ordre");
05-20-2017 02:41 AM
You should use TaskService.addCandidateUser, not TaskService.addCandidateGroup.
If you use only TaskService.addCandidateGroup, act_hi_identitylink has only a groupId.
If you use TaskService.addCandidateGroup, act_hi_identitylink has a userId and you can use involvedUser option.
Explore our Alfresco products with the links below. Use labels to filter content by product module.