AEM Content Migration and Pages Creation

Avatar

Avatar

AEM_Forum

Avatar

AEM_Forum

AEM_Forum

19-03-2019

Hi all, Let us say we are migrating content from an external system to AEM. First I would create templates, workflows and components in AEM. Then I migrate the content to AEM JCR. Now, my question is regarding creating AEM pages using the migrated content. Does this have to be done manually necessarily? Or Migration automation script could be extended to create AEM pages using the templates, dropping components on to the pages and configuring them? It is like automation script executing what normally a content author would do manually. Appreciate your support. Thanks, Rama.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

jayQ

Avatar

jayQ

jayQ

06-06-2019

Hello

If you already have everything needed on AEM (templates, page component(s), components), you could generate a JSON file (as an example http://localhost:4502/content/we-retail/us/en/experience.infinity.json) with the data you want to migrate placed on the AEM counterpart components.

Then using the sling post servlet you could import it back the updated JSON file into AEM. It can be done using curl, for example:

curl -u user:password -F:operation=import -F:contentType=json -F:replace=true -F:replaceProperties=true -F:contentFile=@jsonFile  destinationPath


Answers (4)

Answers (4)

Avatar

Avatar

AEM_Forum

Avatar

AEM_Forum

AEM_Forum

20-03-2019

Hi all, Let us say the AEM page has 2 text boxes, 5 images and 3 videos. After extraction, we have an XML file for Transformation and Loading. And after loading, we will have these 2+5+3 assets sitting in JCR. When I create this page programmatically, I could use PageManager APIs and select the AEM template. Now, my question is how to link the 2 text boxes, 5 images and 3 videos to the artifacts in JCR? How could I put this mapping in the program? Appreciate your responses. Thanks, Rama.

Avatar

Avatar

smacdonald2008

Total Posts

(val/1000)?string[".0"]}K

Likes

(val/1000)?string[".0"]}K

Correct Answer

(val/1000)?string[".0"]}K

Avatar

smacdonald2008

Total Posts

(val/1000)?string[".0"]}K

Likes

(val/1000)?string[".0"]}K

Correct Answer

(val/1000)?string[".0"]}K
smacdonald2008

19-03-2019

Even though it's possible to use APIS to develop pages - its best practice to build an AEM muliti-page site using editable templates --  as discussed in this Adobe document - Getting Started with AEM Sites - WKND Tutorial

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

19-03-2019

You can create pages programmatically based on the design of your app. In your migration script, you could build the intelligence to define content-to-component/template mappings based on your use case(s).

I assume that you mean assets (js/css/images etc.) with this statement and not the actual content nodes (text paragraph, structured or unstructured content) in AEM terminology -  "Then I migrate the content to AEM JCR."

Avatar

Avatar

kunal23

MVP

Avatar

kunal23

MVP

kunal23
MVP

19-03-2019

You can definitely  create AEM pages programmatically by calling backend JCR and AEM APIs. The AEM repository allows you to programmatically create new nodes and perform other CRUD operations.

The content which you are migrating can be loaded into AEM after you know how that content is going to be represented in the repository node structure. And once you know the node structure then you can create the nodes and their properties programmatically by calling AEM APIs.