eZ Publish has a built-in notification system that allows users to be informed about miscellaneous events that occur. It is possible to be notified when objects are updated or published, when workflows are executed and so on.
There are two built-in types of notifications:
- Subtree notifications
- Collaboration notifications
It is possible to subscribe for notifications about a subtree. For example, if you have a set of articles located under a folder called "Business", a user can subscribe for subtree notifications for this folder. The system will then send an E-mail to the user every time changes are made under the "Business" folder. The following changes will trigger a notification:
- When a new node is published within the subtree.
- When the contents of an existing node is changed.
A user can choose to receive notifications in the form of a single E-mail or as a digest of messages.
The eZ Publish collaboration system allows you to work together with other people so that you can approve/reject any changes they made when it comes to content. For example, you can specify that all the changes made in the "Standard" section can not be published without your approval. (This can be done by creating a new "Approve" event within a new workflow initiated by the "content-publish-before" trigger function.) If somebody (except you, the administrator) edits content located under the "Standard" section, the system will generate new collaboration messages. For example, if somebody changes article "A", the system will generate a new collaboration message "article A awaits your approval" for you and another collaboration message "article A awaits approval by editor" for the user who changed it.
To view your collaboration messages, click the "My Account" tab in the administration interface and then access the "Collaboration" link on the left. You will be able to review/approve/reject the changes.
In the root of the eZ Publish directory there is a file called "runcronjobs.php". It takes care of processing the workflows, notifications and other tasks that should be processed in the background. If you are going to use the notification system, "runcronjobs.php" must be executed periodically. The most common way to do this is to set up a scheduled job that runs every 30-60 minutes or so. Please refer to the "Configuring cronjobs" and "Running cronjobs" sections for more information.
In accordance with the instructions specified in the "cronjobs/notification.php" file, "runcronjobs.php" launches the main notification processing script "kernel/classes/notification/eznotificationeventfilter.php".
If you need to launch this script manually, add the "notification/runfilter" notation to the administration interface URL and then click the "Run notification filter" button there (see the next screenshot).
The notification filter interface.
Please note that processing notifications may cause a timeout error if there is a huge amount of notification events in the database. Because of this, the "runfilter" view of the "notification" module should only be used for testing and debugging.
Svitlana Shatokhina (09/02/2006 10:38 am)
Svitlana Shatokhina (27/11/2006 4:55 pm)