Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
Versioning3.03.13.2Back to Server Administration Guide
The following applies to versioning behaviour of the ADM store implementation. For versioning behaviour of the AVM store implementation, refer to Versioned Directories.
Alfresco 3.x uses a new stream-lined version store. When upgrading from Alfresco 2.x to Alfresco 3.x, the version store will be migrated.
Out-of-the-box, content in Alfresco DM is not generally marked as 'versionable' by default when new content is added (*).
Content must be specifically marked as being versionable before versions can be created. For example, using the Alfresco Explorer (JSF client UI) you can select 'View Details' on a content item and then 'Version History -> Allow Versioning' (or you can 'Run Action -> Add aspect to item' and select 'Versionable').
When content is first marked as Versionable, a version history is created containing an initial snap-shot (V1.0) of the content and related metadata. As further changes are made then, based on the versioning behaviour, new versions are created of the content and related metadata.
Note (*): one exception is the Alfresco Share client, which will mark the content (within the 'Document Library') as versionable on the first update of the document. When uploading the first update, a new 1.0 version is created (which also adds the versionable aspect) and then the content is checked-out, updated and checked-in as either a minor 1.1 version or major 2.0 version, as selected by the user.
For example, using the Alfresco Explorer (JSF client UI) you can select 'View Details' on a space, and then add an inbound content rule for all items, which applies the Versionable aspect.
If you want all content to be versionable from the moment it is created (via any interface, including Alfresco Explorer) then this can be achieved by modifying the dictionary definition of the content type to include the mandatory aspect Versionable.
Please note options for modifying an Alfresco Content Model
<type name='cm:content'> | <type name='cm:content'> |
Now when content is created in the repository the version history will be created.
You can also control which types of content are automatically versionable and which are not by applying the versionable aspect to a custom sub-type of cm:content.
By default all versionable content has auto-version on. With auto-version on a new version is created in the content's version history when the content is updated.
Auto-Versioning behavior is governed by the following properties
The auto-version capability can be turned off on a per-content basis by setting to the cm:autoVersion property to false, via the UI.
Note: Any content that was made versionable prior to Alfresco 1.1 will have auto-version off.
If you want to configure the repository so that new content has auto version off by default then follow these steps:
1. Open the content model definition file /config/alfresco/model/contentModel.xml
2. Search for the cm:versionable aspect definition and change default parameter for cm:autoVersion to false:
<aspect name='cm:versionable'> | <aspect name='cm:versionable'> |
3. Save the file and re-start the repository.
When content is now made versionable, auto version will be off by default.
Alfresco 3.2 also adds the ability to auto-version on metadata-only (property) updates, even if the content has not been updated.
For 3.2, Auto-Versioning behavior is governed by the following properties:
This feature is enabled by default in the model and can be demonstrated using Alfresco Explorer with versionable content, although it should be noted that Alfresco Share currently disables this feature (by explicitly setting autoVersionOnUpdateProps=false for upload and checkout).
If you want to configure the repository so that new content has auto version of property updates off by default (as pre-3.2) then follow these steps:
1. Open the content model definition file /config/alfresco/model/contentModel.xml
2. Search for the cm:versionable aspect definition and change default parameter for cm:autoVersionOnUpdateProperties to false:
<aspect name='cm:versionable'> | <aspect name='cm:versionable'> |
3. Save the file and re-start the repository.
When content is now made versionable, auto version will be off by default.
If you want to configure auto-versioning on property-only updates (as above) but you also want to configure the repository so that certain property updates are excluded then the versionable aspect can be overridden with a list of excluded properties (in prefix:localname format).
For example, using a custom extension context file:
<bean id='versionableAspect' class='org.alfresco.repo.version.VersionableAspect' init-method='init'> | <bean id='versionableAspect' class='org.alfresco.repo.version.VersionableAspect' init-method='init'> |
In this case, if one or more updated properties match the one of the props in the excluded list then the auto-version will not occur (note: even if there are other properties are also updated).
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.