Reputation: 31
How can a workflow initiator assign a task to user by selecting particular site in alfresco?currently it lists all users registered in alfresco ECM, i want it to list the current site users or a provision to select site first and search user therein.
Is there any configuration needs to done or please tell me the files to work on.
Thanks in advance
Upvotes: 2
Views: 202
Reputation: 1486
You have to customize both alfresco-share and alfresco repo side to achieve this and you've to start the workflow from site context means from the document library.
Here are the steps.
Alfresco-share
people-finder-extended.js (_buildSearchParams method). Pass the current site name in the filter.
return "filter=" + encodeURIComponent(searchTerm) + "&maxResults=" + this.options.maxSearchResults+"&siteId="+<YOUR_CURRENT_SITE_NAME>;
Alfresco Repo You need to extend the people.java to limit the search. Methods to be modified.
Add extra siteId param to filter.
public Scriptable getPeople(String filter, int maxResults, String siteId)
{
return getPeople(filter, maxResults, null, true, siteId);
}
public Scriptable getPeople(String filter, int maxResults, String sortBy, boolean sortAsc, String siteId) { ... }
Hope this helps you.
Please let me know, if you're not clear.
Upvotes: 1