AnsweredAssumed Answered

Custom CalculateVersionLabelPolicy for custom type

Question asked by mendigou on Mar 17, 2014
Hi. I'm trying to override the default CalculateVersionLabelPolicy for a custom type. I am using a basic example, concretely the one created by Peter Monks in and I'm using the <a href=""></a>, only with my custom type (which I of course changed in the TYPE_VERSION_BASELINED_CONTENT definition).

The type is just a descendant of cm:content, without any addition (simply a name change).

When I try to trigger the policy by uploading a new version (the content was already versionable), I get:
<blockquote>Caused by: org.alfresco.service.cmr.version.VersionServiceException: 02170012 More than one CalculateVersionLabelPolicy behaviour has been registered for the type {http://my.domain/custom/extension/version/externalcontent/1.0}document</blockquote>
EDIT See complete log in the edited part below using the example directly /EDIT

I thought this could resemble, but that bug refers to overriding the policy of the cm:content type, and says it works fine when defining a custom type. Other forum posts ( suggest modifying the default alfresco files, which is something I would rather avoid.

I'm sure this is possible, but there's something I'm missing. Any idea why this might be happening?

I tried this morning again with a fresh standalone linux alfresco installation, with the following simple steps (as in
- Add the AMP with the example code as provided by Peter Monk. This means that <a href=""></a> is used, not the simple Logging one.
- Upload new content and assign the Baseline Version.
- Make that content versionable.
- The mentioned exception appears (see complete log below)

Complete log:

What is done in the example makes sense to me, but I don't see why it does not work. Is alfresco forcing the serialVersionPolicy?