How to fetch the previous version of an asset(if available) programmatically within a Workflow Process? | Community
Skip to main content
New Participant
November 26, 2018
Solved

How to fetch the previous version of an asset(if available) programmatically within a Workflow Process?

  • November 26, 2018
  • 1 reply
  • 1711 views

Hi All,

I'm using AEM 6.4 and under a use case, I need to check the current version of an asset and then fetch the previous version of an asset?

Basically, I have to address the following items:-

  • View what version of the asset you are using programmatically in the WorkflowProcess.
  • Get byte[] for the previous version if exists. (*I can get bytes[] once I get the previous version)
  • Restore the asset to a previous version.

Has anyone achieved this or something similar?

-thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

You can get the version using VersionManager (Content Repository for Java Technology API Version 2.0)

and you can restore directly.

1 reply

arunpatidar
arunpatidarAccepted solution
New Participant
November 26, 2018

You can get the version using VersionManager (Content Repository for Java Technology API Version 2.0)

and you can restore directly.

Arun Patidar