View source | Discuss this page | Page history | Printable version   

Modordinvpost/Technical Specifications

Contents

Introduction

The development of this functionality consists on creating an extension point handler that depending on the extension point that has been launched it executes several procedures. The development includes:

Extension Point handler

A generic extension point handler procedure is needed, AD_EXTENSION_POINT_HANDLER. Based on the given AD_Extension_Points_ID it will execute all the procedures associated to it. The procedures that are launched can only have a parameter, AD_EP_Instance_ID, used to retrieve the parameters stored in the AD_EP_Instance_Para table. The available parameters depend on each extension point.

As it is needed to launch a dynamic query to execute the procedures it is needed to differentiate the case of Oracle and PostgreSQL (CALL procedurename(ad_ep_instance_id) for Oracle and SELECT procedurename(ad_ep_instance_id) FROM DUAL for Postgresql). To do that it has to be added in the postscript of each database a AD_GET_RDBMS() function that returns ORACLE or POSTGRESQL.

Parameter Handling

The parameters available in each Extension Point are stored in the AD_EP_Instance_Para table. This table is populated before the Extension Point Handler is called and deleted afterwards. Each set of parameters is identified by the AD_EP_Instance_ID that it is generated each time that is called the handler and the AD_Extension_Points_ID. The parameters can be of different types, so different columns have to be created to support strings, numbers, dates, long texts and ranges.

Configuration window

The window, Extension Point, has 2 tabs.

The main tab, Extension Points, is the definition of the Extension Points. The table behind it is the AD_Extension_Points. It is defined the name, description and the module it belongs to. The 2 extension points defined within this project will belong to core.

The child tab, Procedures is where are defined the procedures that have to be executed in the Extension Point. The table behind it is the AD_EP_Procedures. In this tab is defined the procedure name and the module owner of the procedure.

Available Extension points

Within this project 2 extension points are included.

"C_Order_Post - Finish Process" extension point

Message and Result have to be retrieved after the procedures have been launched as they might be changed by those procedures to set warnings and messages to the user.

"C_Invoice_Post - Finish Process" extension point

Message and Result have to be retrieved after the procedures have been launched as they might be changed by those procedures to set warnings and messages to the user.

Retrieved from "http://forge.openbravo.com/plugins/mwiki/index.php/Modordinvpost/Technical_Specifications"

This page has been accessed 2,633 times. This page was last modified on 29 July 2009, at 14:14. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.