Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page was created because of 

Jira Legacy
serverJIRA (openlmis.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId448ba138-230b-3f91-a83e-16e7db1deed1
keyOLMIS-1319
 and provide basic information about FTP settings for facility which will be used to establish an connection with the FTP server and send a CSV file related with created order.

FTP Properties

Each setting has to have the following properties:

...

Code Block
languagejava
titleFacilityFtpSetting
public class FacilityFtpSetting {
  private UUID facilityId;
  private String protocol;
  private String username;
  private String password;
  private String serverHost;
  private Integer serverPort;
  private String removeDirectory;
  private String localDirectory;
  private boolean passiveMode;
}

Management

The fulfillment service should provide the following options:

...

Also if there is no setting for the given facility the fulfillment service should still save an order into database.

Open FTP connection

The fulfillment service uses Apache Camel to establish an connection with the FTP server set in setting. When an order is saved firstly it retrieves a setting from the database by supplyingFacilityId property from the Order class. If there is no setting the service will save the order in database and finish the work. If there is setting for the given facility the fulfillment service will store a generated CSV file locally (in directory set in setting), will try to send the file into the FTP server. If transfer ends with success the local file will be removed, otherwise the file will be still present in the folder and a user would have ability to manually transfer the file to the FTP server.