View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

Alerts

Contents

Introduction

Alerts are the way Openbravo ERP can inform users about virtually any event that happens in the system (if an appropriate alertrule is created). The System Administrator defines when an alert should be prompted. This notifications are shown in the top bar, just beside the Application menu.

Ad-alert1 ob3.png

Alert Rules

The definition of the Alert Rules is made in the Alert window (General Setup || Application || Alert). There are two types of Alert Rules: Data Driven or External

Data Driven

With this type of Alert Rules the System Administrator can define a query to test a particular scenario, e.g. Products without defined price, Products under stock, Customers with exceeded credit, etc.

The flow for data driven alerts is as follows:

You can find more information about how to define Alerts in this document.

Definition

 
SELECT m_product_id AS referencekey_id,
       p.name AS record_id,
       '0' AS ad_role_id,
       NULL AS ad_user_id,
       p.name ||' is not in any Purchase price list' AS description,
       'Y' AS isActive,
        ad_org_id, 
        ad_client_id, 
        now() AS created,  
        '0' AS createdBy,  
        now() AS updated,
        '0' AS updatedBy
 FROM m_product p
WHERE p.ispurchased='Y'
AND NOT EXISTS (SELECT 1 
                    FROM m_productprice pp,
                         m_pricelist_version pv,
                         m_pricelist pl
                  WHERE p.m_product_id = pp.m_product_id
                  AND pv.m_pricelist_version_id = pv.m_pricelist_version_id
                  AND pv.m_pricelist_id = pl.m_pricelist_id
                  AND issopricelist='N')
union                  
SELECT m_product_id AS referencekey_id,
       p.name AS record_id,
       '0' AS ad_role_id,
       NULL AS ad_user_id,
       p.name ||' is not in any Sales price list' AS description,
       'Y' AS isActive,
        ad_org_id, 
        ad_client_id, 
        now() AS created,  
        '0' AS createdBy,  
        now() AS updated,
        '0' AS updatedBy
 FROM m_product p
WHERE p.ispurchased='N'
AND NOT EXISTS (SELECT 1 
                    FROM m_productprice pp,
                         m_pricelist_version pv,
                         m_pricelist pl
                  WHERE p.m_product_id = pp.m_product_id
                  AND pv.m_pricelist_version_id = pv.m_pricelist_version_id
                  AND pv.m_pricelist_id = pl.m_pricelist_id
                  AND issopricelist='Y')

Performance

The sql commands you define in alert rules will be executed periodically in your system. Therefore, it is very important to define them as performance-efficient.

If they are not, they will slow down your system noticeably.

External

There are other external ways to create alerts in Openbravo. The background process checks if a new instance was created and notifies the recipients. An example of this type is 'Updates Available'. The Heartbeat process creates new alert instance when it receives updates from the Heartbeat server.

Alert Recipient

The Alert Recipient tab handles the alert recipients management. You can define the Role whom will be notified, or an specific user. Also you can define if the user(s) should be notified by email.

Retrieved from "http://wiki.openbravo.com/wiki/Alerts"

This page has been accessed 2,775 times. This page was last modified on 8 July 2011, at 10:43. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.