cancel
Showing results for 
Search instead for 
Did you mean: 

List all IdentyLinks for a model

pred05
Champ in-the-making
Champ in-the-making
Hi,
i want to get a list of all groups/users candidates for a model. i have try to user the method offer by the RepositoryService (getIdentityLinksForProcessDefinition()) and it only return the list of identitylink in the runtime. Do you know how i can get this data directly on the all model ?

Thanks for help.
Remi.
2 REPLIES 2

pred05
Champ in-the-making
Champ in-the-making
I have used the POJO which parse the bpmn file (BpmnModel).

<code>
RepositoryService repositoryService = processEngine.getRepositoryService();
BpmnModel model =  repositoryService.getBpmnModel("helloActiviti:21:67504");
List<org.activiti.bpmn.model.Process> processes = model.getProcesses();
List<UserTask> flowElements = processes.get(0).findFlowElementsOfType(UserTask.class);
logger.info(""+flowElements.size());
for(UserTask elem : flowElements)
  logger.info(elem.getName()+" - "+elem.getCandidateGroups().size()+" "+elem.getCandidateGroups().toString());
</code>

jbarrez
Star Contributor
Star Contributor
Yes, the BpmnModel is indeed the way to go.