We have a requirement to send AEM Inbox notifications in custom AEM workflow process step. In this custom workflow process, we are reading a file and creating pages by reading the data of that file. We need to send different Inbox notification messages based on different conditions. So, I am looking for any OOB Notification API which we can integrate in custom workflow process step to send notification messages.
Solved! Go to Solution.
You can use the AEM Notifications API to send inbox notifications in a custom AEM workflow process step. To use this API, you will need to create a notification message and specify the user or group who should receive the notification. The message can be customized based on different conditions in your workflow process.
Here's an example code snippet for sending a notification:
// Get the notification service
NotificationsService notificationsService = sling.getService(NotificationsService.class);
// Create a notification message
Notification notification = notificationsService.createNotification("Workflow Notification Title", "Workflow Notification Message", NotificationSeverity.MINOR);
// Set the user who should receive the notification
// Send the notification