Expand my Community achievements bar.

Does Subscribing to Notifications Work for Assets?

Avatar

Level 3

Hi All, 

I'm trying to understand if subscribing to notifications works for DAM assets.  (We are running AEM 6.1 SP1).

I'm following instructions found at the URL below, which seems to only mention pages [1].  I thought the same might apply for assets, but I'm unable to make it work.

For instance, I've subscribed to the "Created" action for the following 2 paths:

  1. /content/myapp 
  2. /content/dam/myapp 

I receive notifications when new pages are created under path #1, but no notifications come when adding assets under path #2.  I've tried subscribing both via the Inbox as well as Email and I see the same results regardless.  I don't see any errors in the logs.  

Does anyone have any thoughts?  Maybe this just doesn't work for assets? 

[1] https://docs.adobe.com/docs/en/aem/6-1/author/author-environment/inbox.html#Subscribing to Notifications

4 Replies

Avatar

Administrator

Agreeing with Scott, 

If the use-case is to get some sort of notification that some assets is been added to any page, then for that you need to write a custom event listener service.

When any specific type of node is added/deleted/updated at specified path, there you can send notification accordingly. 

Reference articles :- http://stackoverflow.com/questions/32770058/how-to-take-an-action-on-a-deleted-asset-in-adobe-experi...

Helpx article :- https://helpx.adobe.com/experience-manager/using/events.html

~kautuk



Kautuk Sahni

Avatar

Level 3

Thanks Everyone, 

I appreciate your responses.  To clarify, my use case is simply that I want to be notified (via email or inbox) when an asset is added, deleted, etc from the DAM.

Part of the reason that I asked the question is because in our production environment I am able to use the out-of-the-box notifications to subscribe to events in the DAM.  It works just fine.  But, I can't get it to work in any of our lower environments, including a simple, clean local instance.

So, I was trying to understand if the feature was even expected to work that way.  If no, I can't understand how it's working in our production environment.  Is it a fluke?  Could it be that it worked in a previous version of AEM and it's somehow remained?  (we originally launched with 5.6.1 and have since upgraded to 6.1, then 6.1 SP1).  

Any thoughts?

Avatar

Level 10

See this Stackoverflow thread - it mentions use of either a Sling event handler or JCR event handler: 

http://stackoverflow.com/questions/32770058/how-to-take-an-action-on-a-deleted-asset-in-adobe-experi...

I would look into that. You can code an event handler that is fired when an asset is added or deleted. The handler can send email.