code: public Set<ProcessDefinition> getVisibleProcesses(PermissionManager permissionManager) {
  		Set<ProcessDefinition> ret = new HashSet<>();
  		Set<String> queues = getWriteableQueues(permissionManager);
  		String lastProcessName = "";
  		for (ProcessDefinition processDefinition: m_processes) {
  			String processName = processDefinition.getName();
  			if (!processName.equals(lastProcessName)) {
  				String queueName = processDefinition.getQueueName();
  				if (StringUtils.hasText(queueName)) {
  					if (queues.contains(queueName)) {
  						ret.add(processDefinition);
  					}
  				} else {
  					ret.add(processDefinition);					
  				}
  				lastProcessName = processName;
  			}
  		}
  		return ret;
  	}
docs: Get the list of queues visible to this user ie to the user with the permissions
  defined in the given permissions manager,
  @param permissionManager
  @return