With the recent release of the Alfresco Enterprise Viewer as an Alfresco product, one question that has come up on multiple occasions surrounds the requirement to allow users to view annotations on prior non-latest versions of a document. This requirement is something that we have long supported in the Alfresco Content Accelerator (formerly the OpenContent Management Suite) but it is not possible out of the box with ADW or Share. In this post, we’ll explore why this is the case, how we solve the issues in ACA, and what options exist for Share and ADW applications.
Annotations and Versioning
In looking at the functionality request, there are two main components:
- AEV needs to associate annotations to a specific version
- Each version needs to maintain it’s PDF rendition in order to display the annotations associated with that specific version
However, in Alfresco (as of ACS 6.x), associations are node-to-node and not version-to-version. Since renditions are stored by association by default, this means that only the most recent version of a document contains the rendition. This is the reason that, for example, in Share the user options for viewing a previous version are focused on viewing properties, downloading the native version or reverting the version to be the latest. Note that future versions of Alfresco Share, ADF/ADW and the API may provide more options for associations and renditions.
ACA – Viewing Version Annotations
The ability to view annotations on specific versions of a document is completely supported using the Alfresco Content Accelerator. AEV handles versioning and annotation with the following approach:
- When AEV creates an annotation association, it notes the applicable version on the association object. When requesting annotations, AEV sends over the version label of the document and the services layer only returns the annotations applicable to the given version.
- When creating a PDF rendition of a document, instead of the default rendition mechanism, the OpenContent Services layer directs the rendition to be stored as a content property.
Since properties are always tied to a given version, this makes it trivial for AEV to display annotations on both the latest version as well as prior versions.
What are the Options Outside of ACA?
While the functionality is available in ACA, some customers would like to use AEV from within an ADW/ADF application or Alfresco Share. However, as of this writing, these applications only have the ability to view the PDF rendition of the latest version of the document. So while using AEV to annotate a document is supported, viewing annotations on previous versions is not out of the box. Similar functionality can be made possible with customizations within Share or ADF. Other than the option that ACA uses above with content properties, another option is to utilize the Chain Versioning Module, which works by creating a new repository node for each version of a document. Therefore, in Share or ADF/ADW, the user can easily access each version within AEV to view annotations. Check out the video below which demonstrates how users can view version annotations in both ACA as well as in Share for Chain Versionable documents:
Contact Us to discuss the options and your specific use case. Let us know your thoughts below:
Leave a Reply