Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

Resource change listener with multiple paths

Avatar

Level 2

I am using resourcechange listener to identify the changes in multiple paths. Once the listener identify change from the given path I am triggering an e-mail. Till here it is fine.

 

Resource change listener paths: I have configured locale paths in config manager like ex: /content/en_usd/testpage.

/Content/en_de/testpage.

In my case resource change listener should only trigger in locale pages so I have given locale paths

 

I am facing an issue in this scenario:

When I rollout change s from language master en page to locale pages en_usd and en_de pages at once.

 

Resource change listiner is considering it as 2 event s and triggering an email twice,each mail for each locale.

I want to trigger a single email for changes in both locales page when rolling out from language master page at once.

 

Can someone please help me here? How to achieve this

 

 

 

 

 

 

 

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

The root cause is that there are actually 2 ResourceChanges. If you want just one event, this approach to generate the event is not the correct one, you should probably try and catch a rollout event (I don't think that such an event exists, but you could check the Events view in the OSGI webconsole, if such an event is generated).

View solution in original post

3 Replies

Avatar

Level 2

hi @Nimma05 
Since you have register the resource change listener for language copy any property change in the registered resources will trigger the listener. The methods which helps to identify the property which got updated is deprecated now. 

Avatar

Level 2

Hi @sateaswa94 ,

Thanks for responding!

 Actually I don't need which property is updated in the given path.

What I actually want is when I rollout from language master to language copies. 2 locale pages are updating and 2 event are getting triggered.

On each event I am sending an email (there is some use case)

Here for every event mail is getting triggered.But I want to know if there is a way to trigger a single email for all the events occurred at specific time.

 

 

Avatar

Correct answer by
Employee Advisor

The root cause is that there are actually 2 ResourceChanges. If you want just one event, this approach to generate the event is not the correct one, you should probably try and catch a rollout event (I don't think that such an event exists, but you could check the Events view in the OSGI webconsole, if such an event is generated).