Module:External Data Integration Developers Guide
Contents |
Introduction
In this guide are described the needed developments needed to properly implement a EDL Process. All these artifacts has to be developed as extension modules that depend on the EDL module.
EDL Process
The main artifact to create is the EDL Process. It defines how is executed the process and the logic that has to be implemented. It is required to create a new record in the EDL Process window as System Administrator. The logic is implemented by extending the ItemProcessor abstract class. The class is linked to the process by a Qualifier using the Search Key defined in the window.
Read the How to implement a EDL Process document for detailed instructions.
Type of Data
The EDL Module includes a JSON based generic type of data. In case the data is received in other formats like csv, xml, excel,... or some specific JSON structures a different Type Of Data is required. To add a new Type of Data it is required to:
- add a new option to the EDL Types of Data List Reference
- implement the DataProcessor, AsynchronousProcessor and SynchronousProcessor abstract classes that are linked by a Qualifier using the value of the reference list element.
Read the How to implement a EDL Type Of Data document for detailed instructions.
Other possible customizations
There are other possible customizations that can be developed and used by the EDL Processes.
Storage Location
By default the module provides 3 different Storage Locations where the data to be processed on each request is stored.
- Not Stored (NS)
- The data is not stored.
- Database (DB)
- The data is stored in a column of the EDL Request table.
- Attachment (A)
- The data is stored in a file named Attachment and attached to the corresponding EDL Request.
To add an additional Storage Locations it is required to:
- add a new option to the OBEDL Storage Location List Reference.
- extend the CustomStorageLocation class linked by a Qualifier using the value of the reference list element.
Read the How to implement a Storage Location document for detailed instructions.
Output Processors
Output processes are executed when a EDL Request is processed. This process manages the output generated by the execution. The module provides 2 different processes:
- Debug
- prints a INFO in the Openbravo log with the output generated by the EDL Process.
- WSRest
- allows to configure a REST WebService to send the result of the EDL Process.
To add new processes is required to:
- Add a new record in the EDL Output Type window.
- Implement the OutputDataProcessor abstract class linked by a Qualifier using the value of the Output Type
Read the How to implement a Output Process document for detailed instructions.
Custom Validations
When a request is added some validations are executed. Extending the org.openbravo.externaldata.integration.process.CustomValidation class is possible to add new custom validations. There are 2 methods to implement:
- doProcessValidations(): Validations executed when the addRequest is called before the EDL Request is created. If any of these validations fail no EDL Request is created.
- doConfigurationValidations(): Validations executed when the EDL Request is going to be processed. If any of these validations fail the process is stopped and the EDL Request is updated to Error status.