Open davidjgonzalez opened 9 years ago
Here is pseudo code
In your OSGi Service class, inject instance of 'InboxNotificationSender'(com.adobe.acs.commons.notifications.InboxNotificationSender)
Invoke 'buildInboxNotification()' method on above injected class to get 'InboxNotification' instance InboxNotification inboxNotification = inboxNotificationSender.buildInboxNotification()
Populate the 'InboxNotification' instance with your details inboxNotification.setTitle("Hello World"); inboxNotification.setContentPath("/my/sample/path"); inboxNotification.setAssignee("AEM-USER-PRINCIPAL-NAME"); inboxNotification.setMessage("Greetings of the day!"); inboxNotification.setNotificationActions("Approve");
Invoke 'sendInboxNotification()' method on Step-1 injected object, like
inboxNotificationSender.sendInboxNotification(resourceResolver,inboxNotification);
Sample code using TaskManager and Tasks
@sachinmali has example codes