cancel
Showing results for 
Search instead for 
Did you mean: 

Notification Channels via Operation Chains

ron_1
Star Contributor
Star Contributor

In addition to generating e-mail messages using the NotificationService, I would like to be able to generate other types of messages such as SMS messages, JMS messages, or even custom REST invocations. I see that the NotificationService has a vague reference to the concept of a "channel" that is likely intended for this purpose. It appears the Nuxeo 5.1 API even had an interface http://community.nuxeo.com/api/nuxeo/5.1/javadoc/org/nuxeo/ecm/platform/ec/notification/ChannelNotif... for this purpose. However, that interface no longer exists in the Nuxeo 5.5 API.

Instead of trying to formalize the low-level concept of a java Channel interface with various implementations, I am wondering if it would make more sense to enhance the NotificationService to leverage Operation Chains? The Notification.SendMail operation could be leveraged to support the existing email "channel". Adding new channels would be as simple as contributing new operations.

Leveraging automation chains would introduce some overhead since they require remote REST invocations. How big of a concern would that be for the standard e-mail notification mechanism? Any other concerns or feedback?

1 REPLY 1

Florent_Guillau
World-Class Innovator
World-Class Innovator

The NotificationService would benefit from an overhaul to use Operation chains, yes...

However in the meantime the core of the notification sending is done in NotificationEventListener in the method sendNotification. A similar listener could be subclassed to send other kinds of notifications.

Admittedly this class is not really designed today to be easily subclassed, it's not modular enough, but contributions are welcome.