Notifications
This part of the 4.x documentation is for eZ Publish 4.0, only reference section is common for all eZ Publish 4.x versions as well as eZ Publish 5.x "LegacyStack", please select the version you are using for the most up to date documentation! |
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
Subtree 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.
Collaboration notifications
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.
You can use collaboration notifications to be notified by E-mail about new collaboration messages. The system will send you an E-mail every time a new collaboration message is generated for you.
Processing notifications
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.
Please be aware that all notifications are triggered by the cronjob script "notification.php", which is included by default in the "frequent" cronjob part.
You can run it using the following command:
php runcronjobs.php frequent
Alternately, you can also set your own cronjob group with the cronjob scripts you desire, and make sure to include "notification.php" for execution.
In that case you should call it by the name you defined in your "cronjob.ini.append.php":
php runcronjobs.php <cronjob_name>
Also be sure to add the cronjob execution to your crontab for an automatic execution.
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 9:38 am)
Ricardo Correia (17/04/2013 3:18 pm)
Comments
Preconfigured Subtree Navigation-Button
Monday 15 January 2007 4:52:27 pm
Jonas Fischer
Reject Email Notification
Wednesday 26 March 2008 9:59:51 am
Andry
I already created a workflow and am able to receive email notification for approval,
but when the article is rejected for publish, I don't receive any email notification.
Is there a way to get email notification when the article was rejected?
How to get email notfication for collaboration?
Thank you very much
Re: Reject Email Notification
Monday 29 September 2008 7:47:04 pm
Cedric Monroe
about notifications URL in site admin
Saturday 17 January 2009 6:34:35 am
Jorge Armando
So I going to be more clear to help new users...
lets think the url to your administration interfaz is http://www.midomain.com/index.php/ezwebin_site_admin
so "add the notification/runfilter" notation to the administration interface URL means, you manually type the url like this:
http://www.midomain.com/index.php...in_site_admin/notification/runfilter
And the will appear the below image.