Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

AEM Cloud Post Processing workflow Request params

Avatar

Level 5

Hi All,

Have a requirement to capture request params sent from front-end after hitting end point URL to upload asset onto Cloud. In post processing workflow need to capture & process custom metadata update on assets which are sent as request params, how can we capture those which are set in request.

Thanks in Advance

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

9 Replies

Avatar

Community Advisor

Hi, @rsl_lucky

you can set those param as properties in Asset/metadata node and read it in the workflow. 



Arun Patidar

Avatar

Level 5

Hi @arunpatidar , asset upload is happening by hitting end point of 3-step process i.e. 1).initiateUpload.json  2)URI call  3).completeUpload.json from front-end. Once upload complete post processing happen.

While hitting end point from front-end, request params are sent and corresponding values of asset are sent. Need to capture those request params.

Could you share inputs here or any thoughts on how this could be handled ?

Avatar

Level 5

Hi @arunpatidar thanks for sharing the info.

After checking the link can see asset metadata update could be processed with Asset HTTP api by making payload request from front-end. Is it after or before upload complete json call ?

As per link, its an direct update of metadata on Asset, but we have few business use-case which are calculated and then update of metadata happens on assets. Any suggestions where it can be taken care ?

Avatar

Community Advisor

Hi @rsl_lucky 
Since both activities are asynchronous, there is no guarantee that custom workflow would have those properties available during processing.

 

However you use java threads to wait and then process the login in custom workflow process. 



Arun Patidar

Avatar

Level 5

Hi @arunpatidar, so recommendation is to use http api call for update of metadata on to assets from UI/front-end ?

Also let us know when to make this call, is it before/after complete json upload call ?

Thank you.

Avatar

Community Advisor

Hi @rsl_lucky 
Yes, after uploading assets, you make another call to update metadata meanwhile workflow processor will wait.
Just make sure this processing workflow does not wait for forever, because you may need this metadata for all of the assets. Just handle it using max wait time.



Arun Patidar

Avatar

Level 5

Hi @arunpatidar, ok will make another call to update metadata of assets.

Not clear about workflow processor wait time mentioned above can you share more info towards it.

 

Avatar

Administrator

@rsl_lucky  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.



Kautuk Sahni