0

I have bpm:assignee control in my custom wokflow, and that's ok. But wright now user can pick up all alfresco users for bpm:assignee. I wan't to limit user so that when he goes to select control and enter some term for search in search result appear just user from specific group or just some users defined by some criteria (it means that user can not search over entire alfresco user database, just over specific set of users). Does anybody know how i can achieve this in my custom workflow?

Regards, Aleksandar

Aleksandar
  • 79
  • 3
  • 10

1 Answers1

3

Yes, this is definitely possible. To do what you are describing, you'll need to customize the out-of-the-box people picker component and put it in your own namespace. Then, you can change the repository tier web scripts the component uses for searching to your own custom web scripts. Those web scripts can implement whatever search criteria you need, such as restricting to a one or more groups or users with a certain property set, etc. The last step is to tell the form service to use your new custom component when rendering the bpm:assignee field instead of the default component.

Jeff Potts
  • 10,468
  • 17
  • 40
  • Thanks Jeff on your help. :) Do you maybe know where i can find in alfresco definition of people picker component and related web script, just to take closer look what i need to do? – Aleksandar Feb 24 '12 at 08:11
  • The Share Extras project has generated documentation on all of the client-side JavaScript. If you are using 4.0.d, the doc lives at http://sharextras.org/jsdoc/share/community-4.0.d/symbols/Alfresco.PeopleFinder.html. As noted in that page, the PeopleFinder component lives in documentlibrary-actions.js. – Jeff Potts Feb 24 '12 at 23:14
  • Thanks Jeff once again. :) I looked at doc that you described, but i didn't make big progress (i'm totally alfresco rookie.:D). Basically i need the same people finder as it is defined in documentlibrary-actions.js just to pass him some custom search script.(i saw that there is people-finder.js and people-finder.get.desc.xml, maybe i need something similar) But where i have to put my files? How i can connect these new files with my assignee control? Do you know any good tutorial for creating custom form controls in Alfresco? Sorry for my dumb questions. – Aleksandar Feb 29 '12 at 09:09
  • They are not dumb questions. The problem is that we don't have a comprehensive guide that helps people make these customizations. I've added this to my list of examples that would be good to write up. Assuming your time frame is shorter than mine, you're going to have to dig in to the code to figure this out. I'd recommend starting with the Hello World dashlets in Share Extras on Google Code, then look at some of the other Share Extras examples. You can follow those examples to see how to structure your project and how to extend client-side JavaScript components. – Jeff Potts Feb 29 '12 at 15:10
  • Thanks Jeff on your time and help. I will try with those guidelines. :) – Aleksandar Mar 01 '12 at 13:32
  • No, I haven't shared the customized people picker example yet. The best I can offer at the moment, besides the links I referenced at Share Extras, is this sample dashlet showing the basics of how to fetch data from the repo tier: https://code.google.com/p/alfresco-get-latest-document – Jeff Potts May 06 '14 at 19:04