cancel
Showing results for 
Search instead for 
Did you mean: 

Document Action Evaluators

drozes
Champ in-the-making
Champ in-the-making
Hi all;
Hoping this will be a quick answer - currently I am using evaluator.doclib.action.propertyNotNull.
It is working well.

However I would love to do the following:
-check if a property value is equal to a string?
-Check if a property value IS null?

I've played around and looked through the included evaluators but have not been successful.
I've also looked through http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fdoclib-pred...

Anyone able to provide an example or is this a custom eval?
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
-check if a property value is equal to a string?
There an "org.alfresco.web.evaluator.ValueEvaluator" which you can use for this. Take a look at the "evaluator.doclib.metadata.isWorkingCopy" for an example of the config.

-Check if a property value IS null?
You can negate evaluator logic in the action definition, e.g.
<evaluator negate="true">evaluator.doclib.action.isLocked</evaluator>

Thanks,
Mike

drozes
Champ in-the-making
Champ in-the-making
Thanks a ton Mike;

I was using org.alfresco.web.evaluator.ValueEvaluator before but was running it against a boolean that didn't have a default value.

The "negate="true" is Very helpful - thank you so much.