Hi,
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.
Solved! Go to Solution.
Views
Replies
Total Likes
As per adobe documentation, the default behaviour is
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
options.setSuppressVersions(true);
// Avoid sling job overhead by forcing synchronous. Note this will result in serial activation.
options.setSynchronous(true);
// Do NOT suppress status update of resource (set replication properties accordingly)
options.setSuppressStatusUpdate(false);
log.info("**** ABOUT TO REPLICATE" ) ;
//Rep the content replicate(Session session, ReplicationActionType type, String path)
replicator.replicate(session,ReplicationActionType.ACTIVATE,path);
You can refer this to get some idea.
https://helpx.adobe.com/experience-manager/using/aem64_replication_api.html
You need to disable the activation step which is in the request for activation workflow and author your custom activation step.
As per adobe documentation, the default behaviour is
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
options.setSuppressVersions(true);
// Avoid sling job overhead by forcing synchronous. Note this will result in serial activation.
options.setSynchronous(true);
// Do NOT suppress status update of resource (set replication properties accordingly)
options.setSuppressStatusUpdate(false);
log.info("**** ABOUT TO REPLICATE" ) ;
//Rep the content replicate(Session session, ReplicationActionType type, String path)
replicator.replicate(session,ReplicationActionType.ACTIVATE,path);
You can refer this to get some idea.
https://helpx.adobe.com/experience-manager/using/aem64_replication_api.html
You need to disable the activation step which is in the request for activation workflow and author your custom activation step.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies