Notification Channels via Operation Chains

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 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?

0 votes

1 answers



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.

0 votes