Can I read values stored into aio-lib-state by a aio-runtime-action into AEM java say osgi service? | Community
Skip to main content
sarav_prakash
Community Advisor
Community Advisor
September 25, 2024
Solved

Can I read values stored into aio-lib-state by a aio-runtime-action into AEM java say osgi service?

  • September 25, 2024
  • 2 replies
  • 958 views

My use case follows an idea I posted 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-ideas/enhance-assetcompute-microservice-to-accept-alttext/idi-p/705880

 

Basically I am receiving asset creation events from Workfront and am creating assets into AEM using a runtime action. I am able to create successfully using AssetCompute microservice. But after asset creation, I need to update altText and couple custom properties. These values are available with event at Runtime action. Now AssetCompute microservice DOES NOT allow to update metadata. The runtime action dies once it fires createAsset, doesnt wait ( or doesnt know) for asset to complete processing.  

 

So I temporarily need to cache altText metadata somewer; wait for microservice to complete upload process, and then update metadata. One workaround is to use JCR as temp storage. store the metadata properties onto /var somewer and then fetch them after asset processed. Looking for better solutions. Thinking of caching the metadata onto aio-lib-state and ask AEM to pull from aio-lib-state. But looks there is NO Java SDK/library available to reuse aio-lib-state. I have to expose another web-action at aio runtime, and make AEM call a fetchAIOLibState web-action to fetch metadata. 

 

Any other better solution to temp cache metadata, wait for asset completion event and update into asset.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by tmj

Hi @sarav_prakash 

 

I spoke to the engineering team. 

 

> Thinking of caching the metadata onto aio-lib-state and ask AEM to pull from aio-lib-state. But looks there is NO Java SDK/library available to reuse aio-lib-state. I have to expose another web-action at aio runtime, and make AEM call a fetchAIOLibState web-action to fetch metadata. 

 

This looks like a fine approach.

 

Thanks
Manik

 

2 replies

tmj
Adobe Employee
tmjAdobe EmployeeAccepted solution
Adobe Employee
October 1, 2024

Hi @sarav_prakash 

 

I spoke to the engineering team. 

 

> Thinking of caching the metadata onto aio-lib-state and ask AEM to pull from aio-lib-state. But looks there is NO Java SDK/library available to reuse aio-lib-state. I have to expose another web-action at aio runtime, and make AEM call a fetchAIOLibState web-action to fetch metadata. 

 

This looks like a fine approach.

 

Thanks
Manik

 

Adobe Employee
October 1, 2024

Another option to explore is to use an Asset Compute custom worker to read the required data from the event or aio-lib-state and create a custom rendition(which will be in JCR). Leverage AEM workflow to update the asset properties as needed.

 

Regards