Hi Guys,
I've been searching about how to migrate external pages into AEM but seems like there is not much information out there with a general guide in how to implement this process. Let me give you some context of what I'd like to do:
Business wants to migrate a website that was built with a different technology. The way we can fetch the data is through an API they have. The response is in JSON format. I don't know if I need to do kind of a transformation activity to convert from JSON to JCR so I'd like to know what kind of steps I need to follow in order to migrate the information into AEM. Do I need to create first all the components, templates, workflows first?. What would be a good way to map the data into the components?.
Regards
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
HI @Luis_Ochoa ,
If you want to map JSON data to AEM pages you can go with page manager API's, you can directly read your exported JSON and create pages and then set the page properties.
If you want to add JSON data into the components then you can also create custom component programmatically and then save the JSON data to it.
Sample code for it:
componentNode = node.addNode(componentName, Constants.UNSTRUCTURED_NODE);
componentNode.setProperty(Constants.RESOURCE_TYPE, <your-custom-value>);
You can build a custom workflow that can embed the above approach and based on your requirement trigger the workflow to feed the data in your AEM page.
Thanks
Tarun
HI @Luis_Ochoa ,
If you want to map JSON data to AEM pages you can go with page manager API's, you can directly read your exported JSON and create pages and then set the page properties.
If you want to add JSON data into the components then you can also create custom component programmatically and then save the JSON data to it.
Sample code for it:
componentNode = node.addNode(componentName, Constants.UNSTRUCTURED_NODE);
componentNode.setProperty(Constants.RESOURCE_TYPE, <your-custom-value>);
You can build a custom workflow that can embed the above approach and based on your requirement trigger the workflow to feed the data in your AEM page.
Thanks
Tarun
@Luis_Ochoa It all depends on your requirement on how to do it. If client is looking for authoring the content regularly and existing technology is going to be deprecated and no source to change the content then you need to follow below steps
1. Create the related components, templates
2. Do a mapping for the existing pages to components and templates
3. Write a custom script which reads the JSON and save it as component jcr content.
If no content authoring is needed I recommend you to explore the option of SPA
Thanks for your inputs. As per my understanding, the content will be authored in the future. What the client wants is to have at least all the data migrated into AEM.
Hi,
In short, yes, you need to become familiar with how AEM works, how nodes relate and render components, how components function and exist within templates, and so on. It's not just a matter of transforming data into nodes.
Please go through this link, which outlines several steps for typically assessing such migrations:
Hope this helps
@Luis_Ochoa Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Likes
Replies