Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

is there any way to exclude certain path for Asset Compute Service in AEMaaCS??

Avatar

Level 3

I have a folder "/content/dam/abc" where i need to upload zip file then once i uploaded there will be custom workflow which will be triggered validate the zip size, folder count, subfolder count and other validation using some metadata property like "dam:Content", "dam:size", "dam:FileCount", "dam:extracted".

 

currently i'm migrating the dam Asset workflow to AEMaaCs and where Asset compute service is interrupting the zip validation process.

 

When Custome workflow triggered this value is not generated in cloud "dam:Content", "dam:size", "dam:FileCount", "dam:extracted" so the workflow is failing as the required property not available. 

 

Can any guide me how to handle this issue??

5 Replies

Avatar

Community Advisor

@KarthickVe 

 

Would it be possible for you to elaborate what do you mean by "migrating the dam Asset workflow to AEMaaCs"

 

If you need the OOTB workflow, with some additional steps, then I would suggest:

  • not excluding paths from Asset Compute
  • use post-processing workflow instead for additional steps

 

https://medium.com/@bsaravanaprakash/aem-assets-post-processing-workflows-a-savior-to-resource-chang...

 

 


Aanchal Sikka

Avatar

Level 3

Hello@aanchal-sikka ,

i'm migrating custom workflow from on-prem to AEMaaCS. This workflow is resposible for validating the zip file. I have a folder "/content/dam/abc" where i need to upload zip file, then once i uploaded the custom workflow which will be triggered to validate the zip size, folder count, subfolder count and other validation using some metadata property like "dam:Content", "dam:size", "dam:FileCount", "dam:extracted".

 

The issue what i'm facing is in AEMaaCS that when i upload the asset this service "com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob" first and same time the custom workflow also starting. The workflow required some metadata so if metadata is there it successfully complete it. 

This service is generating the metadata "com.adobe.cq.assetcompute.impl.assetprocessor.AssetProcessorEvent" before it completes it, the custom workflow is running and failed as the above service still generating the metadata.

 

24.05.2024 08:43:37.495 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-cq-asset-processing-7-adobe-io-assetcompute-events-consuming-job] com.adobe.cq.assetcompute.impl.assetprocessor.AssetProcessorEventHandler Submit '4' create rendition job for asset '/content/dam/abc/xyz.zip'
24.05.2024 08:43:37.495 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-cq-asset-processing-7-adobe-io-assetcompute-events-consuming-job] com.adobe.cq.assetcompute.impl.assetprocessor.AssetProcessorEventHandler Waiting for 1 create rendition threads to finish.
24.05.2024 08:43:37.497 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Save the rendition cqdam.machine.metadata.colors.json for asset: /content/dam/abc/xyz.zip, processingId: fc076ac2-2c8c-4495-b9d9-c955429695a5 with data
24.05.2024 08:43:37.497 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Emptify data for the rendition cqdam.machine.metadata.colors.json for asset: /content/dam/abc/xyz.zip, processingId: fc076ac2-2c8c-4495-b9d9-c955429695a5
24.05.2024 08:43:37.498 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Update asset jcr:content for asset '/content/dam/abc/xyz.zip/jcr:content/renditions/cqdam.machine.metadata.colors.json' with: {jcr:encoding=UTF-8}
24.05.2024 08:43:37.498 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Save the rendition cqdam.machine.metadata.features.json for asset: /content/dam/abc/xyz.zip, processingId: fc076ac2-2c8c-4495-b9d9-c955429695a5 with data
24.05.2024 08:43:37.499 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Emptify data for the rendition cqdam.machine.metadata.features.json for asset: /content/dam/abc/xyz.zip, processingId: fc076ac2-2c8c-4495-b9d9-c955429695a5
24.05.2024 08:43:37.499 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Update asset jcr:content for asset '/content/dam/abc/xyz.zip/jcr:content/renditions/cqdam.machine.metadata.features.json' with: {jcr:encoding=UTF-8}
24.05.2024 08:43:37.500 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Save the rendition cqdam.metadata.xml for asset: /content/dam/abc/xyz.zip, processingId: fc076ac2-2c8c-4495-b9d9-c955429695a5 with data
24.05.2024 08:43:37.548 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Update asset jcr:content for asset '/content/dam/abc/xyz.zip/jcr:content/renditions/cqdam.metadata.xml' with: {jcr:encoding=utf-8}
24.05.2024 08:43:37.550 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Start to extract metadata for asset '/content/dam/abc/xyz.zip', processingId: fc076ac2-2c8c-4495-b9d9-c955429695a5
24.05.2024 08:43:37.562 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Extract asset metadata for asset: /content/dam/abc/xyz.zip took 12 ms
24.05.2024 08:43:37.562 [cm-p892509-e11004381-aem-author-f54f6y89-0rb4by] *INFO* [sling-threadpool-789bebac-2abe-4553-b026-58c2b76bb352-(com.adobe.cq.assetcompute.impl.assetprocessor.assetprocessoreventhandler)-12] com.adobe.cq.assetcompute.impl.connection.CreateRenditionJob Unable to update jcr encoding for asset original rendition /content/dam/abc/xyz.zip, no encoding was provided in metadata rendition

 

i'm not sure how make the workflow wait until the metadata updating is complete.

Avatar

Community Advisor

Hi @KarthickVe,

Do you mean to say when you migrated assets to Cloud you are not getting the properties in asset metadata like "dam:Content", "dam:size" etc.?

Are you migrating the assets from On Prem to Cloud instance?

If the properties are not coming when assets are getting uploaded to Cloud server, then you might have to look at migrating the metadata for the assets too.

There are couple of options to handle certain assets differently in AEMaaCS.

  1. Custom Processing Profiles - 

    Custom Processing Profiles allow you to define how assets are processed when they are ingested into AEM. By creating a custom processing profile, you can specify the conditions under which assets are processed.
    Reference - Integrate with AEM Processing Profiles

  2. Custom Asset Microservices - 

    You can develop custom asset microservices to handle asset processing according to specific business rules. This approach gives you the flexibility to include or exclude assets based on their path or other criteria.

    Reference - Asset Compute microservices extensibility

  3. As @aanchal-sikka mentioned you can use a post processing workflow to add custom metadata that is mandatory for the workflow to execute successfully.

Hope this helps!

Rohan Garg

Avatar

Level 9

Hi @KarthickVe ,

Yes, you can exclude certain paths from being processed by the Asset Compute Service in AEM as a Cloud Service (AEMaaCS). You can do this by configuring the Asset Compute Service pipeline in AEMaaCS.

Here are the general steps to exclude a path from being processed by the Asset Compute Service:

1. Create a new pipeline configuration: Go to the AEMaaCS console (`https://experience.adobe.com/#/console`) and create a new pipeline configuration for the Asset Compute Service. You can do this by clicking on the "Create" button and selecting "Asset Compute Service Pipeline".

2. Configure the pipeline: In the pipeline configuration, you can add a new step to exclude a path from being processed by the Asset Compute Service. You can use the "Exclude Path" step to exclude a specific path or a pattern of paths. For example, you can exclude the "/content/dam/abc" path by adding a new "Exclude Path" step with the path "/content/dam/abc".

3. Save and publish the pipeline: Once you have configured the pipeline, save and publish it to make it active. The Asset Compute Service will now exclude the specified path from being processed.

By excluding the "/content/dam/abc" path from being processed by the Asset Compute Service, you can ensure that the custom workflow is triggered and the required properties are generated.

Please note that the exact steps to configure the pipeline may vary depending on your specific AEMaaCS environment and configuration. It's recommended to consult the AEMaaCS documentation or reach out to Adobe Support for more information on configuring the Asset Compute Service pipeline.

Avatar

Administrator

@KarthickVe Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni