Fork me on GitHub

Introduction

What is BloomReach Version History Cleaner?

BloomReach Version History Cleaner provides the following features:

  • On document publication, it can remove surplus versions or older versions automatically based on configurations. See Configuration page for details.

Some versions are used to keep internal branching metadata; technically the versions for the branching metadata contains multiple version labels. That kind of versions are excluded in the version history cleanup process.

Running Demo Project

You can run the demo project like the following:

$ mvn clean install
$ cd demo
$ mvn clean verify && mvn -Pcargo.run
          

The demo project is configured like the following. So, if you edit and re-publish any documents more than three times, other than Events documents, then you will notice the older versions being removed automatically in order to keep only 3 versions in the version history. But, it will keep only up to 2 versions for Events documents. Also, it will truncate the archived nodes and all the versions when a document is deleted due to the configuration: default.truncate.ondelete: true (false by default).

/hippo:configuration/hippo:modules/version-history-cleaner/hippo:moduleconfig:
  default.max.revisions: 3
  default.truncate.ondelete: true
  versionhistorycleanerdemo:eventsdocument.max.revisions: 2
          

Demo Scenario: Managed Document Versions by Publication

By default, documents in the demo project do not have any version history initially. When you edit an Events document and publish it, it will create a version in its version history.

Step 1

After publishing the document, select Document / Show revision history... menu to see its version history.

Ignore the labeled version in gray color as it is used only to keep branching metdata internally. You will see only one version, excluding the labeled version in gray color, as you published it just once.

Step 2

Edit the document and publish it again, and you will see two versions in its version history.

Step 3

Edit the document and publish it one more time, and you will still see two versions, with the oldest version being removed automatically, because the configuration in the demo project includes versionhistorycleanerdemo:eventsdocument.max.revisions: 2 to force to keep only 2 versions at max for Events documents.

Step 4

If you test this sceanrio on other documents such as News documents, then it will result in keeping 3 versions at max due to the configuration: default.max.revisions: 3.

For details on configurations, see the Configuration page.

Demo Scenario: Truncaction of Version History on Document Deletion

Find the "preview" variant node, with a blue document icon, of the Events document in CMS Console, and you will see its link to the internal JCR version history of the document.

Step 1

Click on the link and you will see the internal JCR version history node.

Step 2

Now, open the document in CMS UI again, take the document offline and delete the document through the Document / Delete... menu.

Step 3

When the document is deleted, its version history is also removed because the configuration in the demo project enables to truncate the version history on document deletion through the configuration: default.truncate.ondelete: true.

Step 4

For details on configurations, see the Configuration page.


Project status

Please see Release Notes.