Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Inquiry Regarding Triggering Notifications for AEM Editor Actions

Avatar

Level 1

Hi all,

I need to activate trigger notifications for our support mailbox whenever editors attempt to perform actions such as moving, unpublishing, or deleting pages from the AEM environment.

Could you kindly advise on the best approach to set up these notifications within the AEM environment? Any insights or guidance on configuring this functionality would be greatly appreciated.

Thanks.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Level 10

Hi @SubashM1 ,

To set up notifications for editor actions in Adobe Experience Manager (AEM), you can utilize event listeners and workflows. Here's a general approach to achieve this:

  1. Identify Editor Actions: Determine which editor actions you want to trigger notifications for, such as moving, unpublishing, or deleting pages.

  2. Event Listeners: Implement event listeners in AEM to capture these editor actions. Event listeners can listen for specific events (such as page deletion, movement, or unpublishing) and execute custom code when these events occur.

  3. Custom Workflow Steps: Create custom workflow steps to handle the notifications. These workflow steps will be triggered by the event listener and will be responsible for sending notifications to the support mailbox.

  4. Email Notification: Configure the custom workflow steps to send email notifications to the support mailbox. You can use AEM's built-in email capabilities or integrate with an external email service.

Here's a more detailed breakdown of each step:

1. Identify Editor Actions

Identify the specific editor actions you want to trigger notifications for. This could include actions like page deletion, movement, unpublishing, etc.

2. Event Listeners

Implement event listeners to capture these editor actions. Event listeners in AEM are OSGi services that can be registered to listen for specific events in the JCR (Java Content Repository). You can create a custom event listener by implementing the org.apache.sling.event.jobs.JobProcessor interface or by using OSGi declarative services.

3. Custom Workflow Steps

Create custom workflow steps to handle the notifications. These custom workflow steps will be triggered by the event listener whenever an editor action occurs. You can create custom workflow steps by implementing the com.adobe.granite.workflow.exec.WorkflowProcess interface or by using the AEM Workflow API.

4. Email Notification

Configure the custom workflow steps to send email notifications to the support mailbox. You can use AEM's built-in EmailService to send emails programmatically. Alternatively, you can integrate with an external email service like SendGrid or Amazon SES.

Example Workflow Configuration:

  • Start: Start node of the workflow.
  • Event Listener Step: Custom workflow step triggered by the event listener.
  • Notification Step: Custom workflow step responsible for sending email notifications.
  • End: End node of the workflow.

Example Workflow Logic:

  1. When an editor action is detected by the event listener, it triggers the custom workflow.
  2. The custom workflow invokes the notification step, passing relevant information such as the action type, affected page, etc.
  3. The notification step sends an email notification to the support mailbox, informing them of the editor action.

Additional Considerations:

  • Ensure proper error handling in both the event listener and workflow steps.
  • Test the notification workflow thoroughly in a non-production environment before deploying it to production.
  • Consider implementing logging to track the execution of the notification workflow.

By following these steps, you can set up notifications for editor actions in AEM and ensure that your support team stays informed about any changes made by editors in the AEM environment.

Avatar

Level 1

Hey, thanks for the reply.
Do you know how I can attach Amazon SES for email notifications to this custom workflow? Do you have any workaround?

Avatar

Administrator

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



Kautuk Sahni