I have added:
<mandatory-aspects>
<aspect>cm:countable</aspect>
</mandatory-aspects>
To list definition, so every item should have "increment" field. But when list items are created nothig happened. I have check the follwoing code:
nodeService.getAspects(nodeRef)
return all defined aspects for item,cm:countable
presents in this list.nodeService.getProperty(nodeRef, QName.createQName("http://www.alfresco.org/model/content/1.0", "countable"))
return null.nodeService.getProperties(nodeRef)
returns all properties but nocountable
key is present.
I have search in alfresco sources and found CounterIncrementActionExecuter
is extends ActionExecuterAbstractBase
and defines executeImpl
, but:
executeImpl
is not invoked at new list item creation.ActionExecuterAbstractBase#isApplicableType
also not invoked.ActionExecuterAbstractBase#isApplicableType
"looks" atapplicableTypes
variable which is not populatd explicitly inCounterIncrementActionExecuter
. So it is unclear how it should be populated and when.
So the question is - how does cm:countable
aspect actually works in alfresco?
UDPATE
As I see counter is incremented in java code. So is safe to use it with one database and multuple alfresco instances connected to db?