cancel
Showing results for 
Search instead for 
Did you mean: 

Can I extend the People field to do more than search & return user names?

joeblue
Champ on-the-rise
Champ on-the-rise

My Alfresco BPM (aka Activiti) platform will start off supporting over 10,000 end users, and will eventually grow to support over 150,000 end users. As such, limiting the people search to just first and last name will not be sufficient. I'll have too many people with the same first and last name, and the returned list does not show anything other first and last name.

People field with search for "Thomas Bowman" and results displaying two users with the name "Thomas Bowman".

Does anyone know how I can extend the People field to allow my end users to search on other attributes of my users? Email address would be fantastic since that is a unique identifier and already included as an attribute of Activiti users. Or at the very least display other attributes of the returned users (such as their emails) that match the names entered in the search?

The only other alternative I've thought of is building a REST API that I can query for people based on the other attributes, return the people that match the query. Then allow the user to select the correct person and then set the People field to that person for the user. Which sounds technically feasible, but I think would require more work than extending the People field to search on other attributes or show more attributes in the returned list.

Thanks.

-Joe

3 REPLIES 3

douglascrp
World-Class Innovator
World-Class Innovator

It is not clear to me if what you are asking for is the Alfresco Share's people finder or the Activiti's one.

Douglas, thanks for pointing that out. I'm talking about Activiti. I edited the post to say "Alfresco BPM (aka Activiti)".

gdharley
Elite Collaborator
Elite Collaborator

Hey Joe,

The short answers is, certainly you can do what you are looking to do.
These are the sort of customizations that we specialize in and the wonderful thing about Activiti is that they provide us the hooks to modify any of the builtin functions.

Basically, the People Finder code can be found in two files (form-directives.js) and the associated template select-people-popover.html. (yes, you will need to pull the source from Alfresco's Activiti Enterprise Nexus repo - but if you have an enterprise license you will have been given credentials for this repo).

Once you have the source, you need to overload the "selectPeoplePopover" directive with your own version that references your own template.

To do this you DO NOT need to modify any of the base javascript classes in lace, thater you overload using the built in resourceLoader mechanism (resourceLoader was created for exactly this reason). You can find resourceLoader documented here: Alfresco Activiti - Custom Web Resources 

The work is straightforward and we have literally customized the entire activiti-app UI in different ways using this approach for a number of clients. Additionally, it is relatively future proof as we have successfully taken customers from version 1.3 to 1.5 without any modification necessary to the overload code. This is a testament to Alfresco's UI structure.

Hope this gets you pointed int he right direction.

Greg