Accessing Remote File and Handling It in TIBCO Cloud™ Integration

This topic describes how to access a file from the on-premises FTP server and store it in the TIBCO Cloud™ Integration application container for further processing.

The sample project contains the following process:

ReadandWriteFileToOnPremiseUsingFTP.bwp: It accesses a simple text file from the FTP server, writes that file into the TIBCO Cloud™ Integration application container with updated contents, puts the updated contents of the file into a new file, and then puts this new file on the FTP server.

Note: The default path to store the file in the TIBCO Cloud™ Integration application container is /opt.
Before you beginWhen you access the on-premises FTP server, ensure the following FTP server information is available:
  • FTP server name or IP address
  • FTP server port (default is 21)
  • FTP username
  • FTP password
    Procedure
  1. In the samples directory in the File Explorer view, expand palette > file > OnPremiseFileHandlingOnTCI and double-click tibco.bw.sample.palette.file.OnPremiseFileHandlingOnTCI.zip. For more information, see Accessing Samples.
  2. In the Project Explorer view, expand the tibco.bw.sample.palette.file.OnPremiseFileHandlingOnTCI.zip project.
  3. Fully expand the Resources directory and then double-click FTPConnectionResource.ftpResource. Specify valid values for the FTP connection in the Host, Port, User Name, and Password fields. Click Test Connection to verify the FTP connection.
  4. Deploy this application to the cloud. For more information about deploying an application, see Deploying an App from TIBCO Business Studio™ for BusinessWorks™.
    Note: When you connect to the on-premises resource - FTP server, use Hybrid connectivity to connect your application hosted in TIBCO Cloud™ Integration to the FTP server running on-premises in your network. For more information about hybrid connectivity, see Using TIBCO Cloud Hybrid Connectivity.
    • The file specified by the module property FileLocationOnFTPServer is read from the FTP server.
    • The file specified by the module property FileLocationOnTCI is written into the TIBCO Cloud™ Integration application container.
    • The file specified by the module property FileToBePutOnFTP is put onto the FTP server.

Understanding the Configuration

You can change the module properties FileLocationOnFTPServer and FileToBePutOnFTP as per the locations defined on your FTP server. The module property FileLocationOnTCI is the default directory, where you can create, modify, and delete your files.