Evaluator Not Working - 3 works out of 5

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
zputnoky
Established Member

Evaluator Not Working - 3 works out of 5

Dear All,

Run into an issue while creating evaluators to display different icons depending on the status of a document.

Have a status flag and a date to monitor and do some calculations based on the values assigned to these properties. In order to build the test case, I created dummy properties to store an integer (1 or null). These properties are set by a javascript code which started by a rule on a folder.

Below the code from custom-slingshot-application-context.xml

<bean id="evaluator.doclib.metadata.edlif_blnWATCH" parent="evaluator.doclib.action.propertyNotNull">
     <property name="property" value="edlif:blnWATCH"/>
</bean>

<bean id="evaluator.doclib.metadata.edlif_blnLATER" parent="evaluator.doclib.action.propertyNotNull">
     <property name="property" value="edlif:blnLATER"/>
</bean>    

<bean id="evaluator.doclib.metadata.edlif_blnACCEPTED" parent="evaluator.doclib.action.propertyNotNull">
     <property name="property" value="edlif:blnACCEPTED"/>
</bean>    
 
<bean id="evaluator.doclib.metadata.edlif_blnREJECTED" parent="evaluator.doclib.action.propertyNotNull">  
     <property name="property" value="edlif:blnREJECTED"/> 
</bean>          

<bean id="evaluator.doclib.metadata.edlif_blnACCEPTEDWITHCOMMENTS" parent="evaluator.doclib.action.propertyNotNull">  
     <property name="property" value="edlif:blnACCEPTEDWITHCOMMENTS"/> 
</bean>

Below the code from the share-config-custom.xml

<indicator id="accepted" index="10" icon="validated-16.png" label="ACCEPTED">
        <evaluator>evaluator.doclib.metadata.edlif_blnACCEPTED</evaluator>
</indicator>

<indicator id="rejected" index="10" icon="rejected-16.png" label="REJECTED">
        <evaluator>evaluator.doclib.metadata.edlif_blnREJECTED</evaluator>
</indicator>
     
<indicator id="accepted_comments" index="10" icon="validated_comments-16.png" label="ACCEPTED WITH COMMENTS">
     <evaluator>evaluator.doclib.metadata.edlif_blnACCEPTEDWITHCOMMENTS</evaluator>
</indicator>

<indicator id="watch" index="10" icon="warning-16.png" label="WATCH">
     <evaluator>evaluator.doclib.metadata.edlif_blnWATCH</evaluator>
</indicator>

<indicator id="late" index="10" icon="late-red-16.png" label="LATE">
     <evaluator>evaluator.doclib.metadata.edlif_blnLATER</evaluator>
</indicator>

The interesting part is that the evaluator works - no error message anywhere in the log files - and the proper icons are displayed for blnACCEPTED, blnREJECTED and blnACCEPTEDWITHCOMMENTS but not working for blnWATCH and blnLATER.

The icons are in the ../share/components/documentlibrary/indicators folder.

The javascript sets the properties to the right value - checked with JavaScript console.

Do you have any ideas what can cause such behaviour?

Regards,

Zsolt Putnoky

4 Replies
cesarista
Advanced

Re: Evaluator Not Working - 3 works out of 5

zputnoky
Established Member

Re: Evaluator Not Working - 3 works out of 5

Hi Cesar,

thanks for the info. I managed to make it work. It was a stupid mistake. I use several indictors on different content types, as I did the copy/paste in the share-config-custom.xml, I forgot to change the ID in 2 cases. Now it works with a scheduled job which scans the repository each morning and sets the indicators.

Regards,

Zsolt Putnoky

cesarista
Advanced

Re: Evaluator Not Working - 3 works out of 5

Mmmm.. why do you need a scheduled job?

Regards.

--C.

zputnoky
Established Member

Re: Evaluator Not Working - 3 works out of 5

Content is being uploaded by the DocControl team, then based on content type the files are distributed - at a later stage by a workflow - to different people for review. The content is belongig to different contract and each contract has different delay to review the content. Wrote a script which scans the whole repository - basically all sites - then compares approval status, target date with system date and sets an indicator on each content. The daily report show these.

Might be another approach but this was the quickest to implement as a proof of concept