Community

IdentityService implementation

reply from Walter Seymore in jBPM - View the full discussion

This is what I use the populate the dropdown in my reassignment screen:

 

Get the participations like Michael suggested or through an hql query and then loop through the them to find the users:

 

    for (Participation participation : participations) {        if (participation.getUserId() != null) {            users.add(participation.getUserId());        }        else if (participation.getGroupId() != null) {            List groupUsers = noTxCmdService.execute(new FindUsersInGroupCmd(participation.getGroupId()));            if (groupUsers != null) {                for (User groupUser : groupUsers) {                    users.add(groupUser.getId());                }            }        }    }  

 

 

 

 

FindUsersInGroupCmd:

 

    public List execute(Environment environment) {        IdentitySession identitySession = environment.get(IdentitySession.class);        return identitySession.findUsersByGroup(groupId);    }

 

 

Hope  this helps

Walter

Reply to this message by going to Community

Start a new discussion in jBPM at Community