Skip to main content
rk39193348
Level 4
Nov 28, 2015 3:10 PM UTC
Solved

Programatically replicate a page

Hi All ,

I have a requirement where i want to programatically activate the pages. I need a program which will parse through the pages and check for "replicated" property. If the property is available the pages should get activated after 30 mins automatically. Can you please please tell me how this can be achieved ??

Awaiting your positive response

Regards

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Nov 28, 2015 3:40 PM UTC

This would need a custom implementation. I would look at using workflows as part of this solution. 

Write code  that iterates through pages using JCR API or QueryBuilder API. The when you find a page that meets you criteria, invoke a workflow (that activates the page) using an API. You can invoke workflows programmatically. See: 

http://scottsdigitalcommunity.blogspot.ca/2013/09/creating-workflows-for-adobe-experience.html

You may need to write a custom workflow step as well to perform time operations (if you want to wait 30 mins for example)\. However AEM is very flexable in letting you write custom workflow steps. TO learn how to write a custom workflow step that implements , WorkflowProcess see: 

https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html

11 replies

saurabh08tiwari
Jul 23, 2018 12:18 PM UTC

Hi can you tell how I can replicate an asset from one path to different path with using

getReplicator().replicate(workflowSession.getSession(), ReplicationActionType.ACTIVATE,

payload, opts);

Translate