* @return
*/
protected List<String> getParticipantsByRequester(PackageParticipant participant, String processDefId, String processId, String requesterUsername) {
List<String> resultList = new ArrayList<String>();
ApplicationContext appContext = AppUtil.getApplicationContext();
DirectoryManager directoryManager = (DirectoryManager) appContext.getBean("directoryManager");
if (participant.getValue() != null && participant.getValue().trim().length() > 0) {
WorkflowManager workflowManager = (WorkflowManager) appContext.getBean("workflowManager");
String activityDefId = participant.getValue();
requesterUsername = workflowManager.getUserByProcessIdAndActivityDefId(processDefId, processId, activityDefId);
}
if (requesterUsername != null && requesterUsername.trim().length() > 0) {
User user = directoryManager.getUserByUsername(requesterUsername);
if (user != null && user.getActive() == User.ACTIVE) {
resultList.add(user.getUsername());
}
}
return resultList;