How to fetch the previous version of an asset(if available) programmatically within a Workflow Process? | Community
Skip to main content
Level 2
Nov 26, 2018 11:59 AM UTC
Solved

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

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.
arunpatidar
arunpatidarAccepted solution
New Participant
Nov 26, 2018 12:37 PM UTC

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

and you can restore directly.

Arun Patidar

1 reply

arunpatidar
arunpatidarAccepted solution
New Participant
Nov 26, 2018 12:37 PM UTC

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

and you can restore directly.

Translate
Arun Patidar