cancel
Showing results for 
Search instead for 
Did you mean: 

Adding multiple evaluators to doclib Actions

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi,

I want to hide some of the actions in document details page for one particular site.

I tried adding a custom evaluator that checks the 'siteId' and returns true/false based on the id of the site. But its not working in other sites as expected for actions that already has an evaluator. For e.g - "document-approve". I am able to hide them but when I go to other sites, they seem to be shown there. These actions already has an evaluator and it looks like my custom evaluator take precedence here and it identifies it as a site to display the action, where as it should get displayed only based on the out of the box evaluator (evaluator.doclib.action.simpleApprove).

Is there a way to have multiple evaluators for an action?

Alfresco version - Community 4.0.a

Thanks
5 REPLIES 5

jpfi
Champ in-the-making
Champ in-the-making
Hi,
as far as I know you'll have to implement your own Evaluator that's able to handle multiple evaluators…would be a nice contribution.
Cheers, Jan

acarpine
Champ in-the-making
Champ in-the-making
Hi jjacob,
have you tried to use evaluator.doclib.action.chainedMatchAll or evaluator.doclib.action.chainedMatchOne?
They should run a list of evaluators as specified in http://wiki.alfresco.com/wiki/Document_Library_Predefined_Evaluators.

Anyway I don't know the exact syntax because I never use it and I didn't find any useful example.

jpfi
Champ in-the-making
Champ in-the-making
Hi acarpine,
thanks,I missed that!
cheers, jan

acarpine
Champ in-the-making
Champ in-the-making
You can find a useful example in the Alfresco code looking the file slingshot-documentlibrary-context
I just tried and it works!

unknown-user
Champ on-the-rise
Champ on-the-rise
Thank you. I'll try it out