Version increment on Asset and Page





I need help with version on Assets.


When asset or page are saved it creates a new version with incremental value as 1.0, 1.1, 1.2 and so on. Which is in 1.x.  Does version ever change from  1.x to 2.x or it there a way to change the version in this format.

Please find attached screen shot for reference.



Thanks in advance. 


Accepted Solutions (1)

Accepted Solutions (1)



As per adobe documentation, the default behaviour is 

  • Create versions of any page.
  • The initial labels and version node names will be 1.0, 1.1, 1.2 and so forth.
  • Restore the first version; i.e. 1.0.
  • Create new versions again.
  • The generated labels and node names will now be 1.0.0, 1.0.1, 1.0.2, etc.


But, if you want to implement custom numbering, instead of 1.0 if you want 2.0 then the below approach may help you.

Create a new workflow step, in the workflow step, write custom replication code, while replicating it should also create a version.

The ReplicationOptions class has setRevision method, you can try that.



ReplicationOptions options = new ReplicationOptions();
    // Do not create new versions as this adds to overhead
    // Avoid sling job overhead by forcing synchronous. Note this will result in serial activation.
    // Do NOT suppress status update of resource (set replication properties accordingly)
    options.setSuppressStatusUpdate(false);"**** ABOUT TO REPLICATE" ) ;  
    //Rep the content      replicate(Session session, ReplicationActionType type, String path)


You can refer this to get some idea.

You need to disable the activation step which is in the request for activation workflow and author your custom activation step.






Answers (0)