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
Hi:
I did something similar here (with other evaluators):
zk-zpm-statusable/custom-zpm-metadata-context.xml at master · zylklab/zk-zpm-statusable · GitHub
GitHub - zylklab/zk-zpm-statusable: Basic metadata to deal with document lifecycle status
Hope this helps.
Regards.
--C.
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
Mmmm.. why do you need a scheduled job?
Regards.
--C.
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
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.