Expand my Community achievements bar.

SOLVED

Is It possible to call a webservice after an asset is uploaded with all metadata?

Avatar

Level 3

Hi community,

 

I'd like to know if it is possible to call a webservice after an asset is uploaded to a folder with all metadata as payload.

 

Thanks in advance for your help.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@olsalas711 

 

There are multiple options:

1. Custom workflow is triggered by dam-authors manually, once the asset is ready.

2. If an asset is published once its ready, then a custom Transport handler can publish the asset info to webservice, while publishing the asset in parallel to AEM publish. https://www.dev-eth0.de/2017/01/08/aem_transport_handler/

3. Create an additional metadata, to define the state of an asset (ready/not-ready). Once all metadata is in, update the value of this metadata to ready. This event can then be captured and info can be sent out to webservice.


Aanchal Sikka

View solution in original post

3 Replies

Avatar

Employee Advisor

Consider, writing a Custom Workflow with a Process step, which calls the required webservice with Asset as payload. Metadata can be extracted in custom Process before calling the WebService.

Workflow can be triggered with a Workflow Launcher, set for the folder path and EventType as Node Created and NodeType as dam:Asset.
Launcher can also be written to trigger a workflow, based on any metadata property.
Refer below link for extracting Asset metadata:
https://redquark.org/aem/day-13-aem-workflows-2/

Avatar

Correct answer by
Community Advisor

@olsalas711 

 

There are multiple options:

1. Custom workflow is triggered by dam-authors manually, once the asset is ready.

2. If an asset is published once its ready, then a custom Transport handler can publish the asset info to webservice, while publishing the asset in parallel to AEM publish. https://www.dev-eth0.de/2017/01/08/aem_transport_handler/

3. Create an additional metadata, to define the state of an asset (ready/not-ready). Once all metadata is in, update the value of this metadata to ready. This event can then be captured and info can be sent out to webservice.


Aanchal Sikka

Avatar

Administrator

@olsalas711 Do you find the suggestions from users useful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. 



Kautuk Sahni