Projects:FTP AWO-EDL/Specs
![]() | Back to Projects:FTP_AWO-EDL |
Contents |
Goal
The goal of this project is to add the possibility to load the file for the EDL for Advanced Warehouse Operations from an FTP.
Functional Requirements
Currently, it is possible to upload AWO configuration using EDL with a process request. In order to do so, the user has to have SSH access to the server and place the CSV file in a folder of the server. This was designed for implementations where Openbravo prepares all the configuration and the final user does not need to use this process.
To make this accessible to all the users, we will add the possibility for this process to read from an FTP folder where the users can drop the file.
Configuration
The module configuration is done in the EDL for Advanced Warehouse Operations Window. This project will add three fields to the configuration:
- Protocol: This is a dropdown where Local or FTP can be selected.
- Username: The username to have access to the FTP. This will only be shown when FTP is selected as Type.
- Password: The password to have access to the FTP. This will only be shown when FTP is selected as Type.
- Port: The port where the FTP server is accepting connections.
Technical Specs
At the moment, there is only one ExternalDataIterator implementation that reads the file from a local folder and it is directly instantiated from the ImportSynchronizationProcess. The plan is to implement a new one that will be able to read from an FTP and ImportSynchronizationProcess will instantiate the correct one based on the configuration.
Import Synchronization Process
The Iterator should not be instantiated directly, an external method needs to be implemented to retrieve the correct Iterator.
protected ExternalDataIterator<RequestInfo> getRequestsInformation(EntityMapping entityMapping, Map<String, EntitySynchronization> entitySynchronizations) { ExternalDataIterator<RequestInfo> externalFileRequestInfoIterator = null; try { externalFileRequestInfoIterator = new LocalFileSystemImportRequestInfoIterator(entityMapping, getExternalFileFolder());
FTP Data Iterator
A new Iterator needs to be created extending ExternalDataIterator<RequestInfo>
public class FTPImportRequestInfoIterator implements ExternalDataIterator<RequestInfo>
Note: This will add a new dependency on the Base FTP module.