I am using a servlet to upload images programatically through asset manager api into dam and its renditions will be created by dam update asset workflow. In the servlet response I need to return the urls of all the generated renditions for the UI to consume.Now since the rendition generation will take time as dam update asset workflow takes time to start and to complete, how to ensure that my servlet sends the response only after all the renditions are completely generated? Note:- I am using ImageMagic for generating renditions via dam update asset workflow.
The property dam:assetState
=processed
gets set on the jcr:content
(dam:AssetContent nodetype node) if the asset is successfully processed by the "DAM Update Asset" workflow.
I would say that it is best to check the status using an AJAX call instead of keeping the connection open.
If you really would like to do this all synchronously then you could look into using "Synthetic Workflow" from ACS Commons: https://adobe-consulting-services.github.io/acs-aem-commons/features/synthetic-workflow/index.html