Dynamic Media migration from Hybrid to Scene7 mode
Hi everyone,
Currently we are working on migration from Dynamic Media Hybrid to Dynamic Media Scene7 mode. At this moment we have a clone of our production author that is configured to use a new Dynamic Media Scene7 mode server and we already published all our assets to Dynamic Media Scene7 Cloud server from this clone.
Now we are looking for a way to set up a production environment to start using the Dynamic Media Scene7 mode. We can't just replace production environment with the clone environment, since clone environment is up to date only from point of view of assets and it is missing all other data that was generated on production environment because this clone was created a long time ago.
I noticed, that assets in AEM that were published to Dynamic Media contain additional metadata properties like dam:scene7Name, dam:scene7Folder, dam:scene7File and etc. What if we just pool these metadata properties to our production assets? Will this work?
I found the next services from Adobe for doing this job:
Search asset in Dynamic Media Scene7 Cloud server by filename (server returns Scene7Asset that contains all needed metadata):
https://developer.adobe.com/experience-manager/reference-materials/6-4/javadoc/com/day/cq/dam/scene7/api/Scene7Service.html#searchAssetsByFilename-java.lang.String-java.lang.Boolean-java.lang.Boolean-java.lang.String-com.day.cq.dam.scene7.api.S7Config-
Set metadata properties to the AEM asset (add these properties to the JCR):
https://developer.adobe.com/experience-manager/reference-materials/cloud-service/javadoc/com/day/cq/dam/scene7/api/Scene7FileMetadataService.html#setAssetMetadataOnSync(com.day.cq.dam.api.Asset,com.day.cq.dam.scene7.api.model.Scene7Asset,com.day.cq.dam.scene7.api.S7Config,java.lang.String
Based on these two services I've created an AEM workflow that is working in a next way. It iterates over all assets under the /content/dam and for each asset trying to get data from Dynamic Media Scene7 Cloud and if asset is presented, workflow updates asset metadata in JCR with scene7 properties (dam:scene7Name, dam:scene7Folder, dam:scene7File and etc). Now my plan is to configure Dynamic Media Scene7 mode on production and run this workflow to pull scene7 properties on assets.
Will this solution work or I'm missing something? Or maybe Adobe have another recommended tool to sync back assets from the Cloud server to AEM JCR?
Appreciate any feedback.
Regards,
Oleksii