Hi guys,
When we create versions of the page, it starts from 1.0 and then increments to 1.1, 1.2. Is there a limit on how much this 1.x can go to.
If I am making a major change, can I make it 2.0 and then let it increment from there on?
Solved! Go to Solution.
Views
Replies
Total Likes
As per adobe documentation, the default behavior 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 to 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.
I answered this in another thread long time back you can refer to it
As per adobe documentation, the default behavior 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 to 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.
I answered this in another thread long time back you can refer to it
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies