Running the File Transfer Sample

This sample demonstrates how to read an opaque file from a "/" directory and write the file to an "/upload" directory in a scheduled orchestrated integration. An FTP Adapter reads the file from the / directory and another FTP Adapter writes the file to the /upload directory. An assign action is configured to assign variables for the file name and file size. A logging message is created to indicate that the file name has been read. The message is logged to the activity stream for viewing. You also track the integration and monitor message status.
Description of sample_file_trans_int.png follows
Description of the illustration sample_file_trans_int.png

Complexity

Medium.

Prerequisites

None.

How To Activate

  1. On the Oracle Integration Cloud Service home page, click the Integrations diagram.
    The Integrations diagram for creating and activating integrations

  2. In the row for the File Transfer sample, click the Activate icon, then click Activate when prompted.
    Description of sample_activate.png follows
    Description of the illustration sample_activate.png

  3. Wait for the icon to turn green, indicating that it is activated.

How to Configure

Before you can activate and run this sample, you must configure the connection and security properties of the Sample FTP connection FTP Adapter used in this sample.

  1. In the home page, click the Connections diagram.

  2. Click Sample FTP connection.

  3. Click Configure Connectivity to specify information to connect to the application/endpoint and process requests.

    1. For FTP Server Host Address, enter speedtest.tele2.net.

    2. For FTP Server Port, enter 21.

    3. Click OK.

  4. Click Configure Security.

    1. For Security Policy, select FTP Server Access Policy.

    2. For Username, enter anonymous.

    3. Enter the same password twice. You can use any password.

    4. Click OK.

  5. Click Test to test your configuration. A message is displayed that describes the results of the test. If successful, you are ready to activate the integration.

    Connection Sample FTP connection was tested successfully.
  6. Click Save, then click Close.

How To Run

  1. From the Actions menu for the integration, select one of the following options:.

    Description of sample_file_run.png follows
    Description of the illustration sample_file_run.png
    • Select Submit Now to run the scheduled integration immediately:

      1. View the following message at the top of the page. You are ready to monitor the results of the file transfer.

        Submit Now request to run integration File Transfer sample (verion_number) was submitted successfully with request id number.
    • Select Add Schedule to schedule a time at which to run the integration:

      The Run File Transfer sample page is displayed.

      1. Accept the default values for Type (Basic) and Frequency (Only Once).

      2. For This schedule runs, click the time and select Modify start date.

      3. Use the Calendar icon to specify a soon-to-occur start time, and click OK.

      4. Click Save, then click Close.

        The Schedule and Future Runs page is displayed.

      5. Click Start Schedule.

        The time at which the integration is scheduled to run is displayed at the bottom of the page.
        Description of sample_file_start_sch.png follows
        Description of the illustration sample_file_start_sch.png

      6. When the scheduled time passes, click the refresh icon. The scheduled integration is no longer listed, indicating that it has run.

      7. Click Close.

How To Monitor

  1. In the upper left corner of the page, click the The hamburger menu menu.

  2. In the navigation pane, click the home icon icon, then click the Monitoring diagram.

    By default, the Dashboard page displays overall system status, including the percentage of successful messages, total number of messages, total number of successful messages, and total number of failed messages. Details about currently used connections, currently activated integrations, and scheduled integrations are also provided. You can also view the activity stream and download diagnostic logs and incident reports. From the Integration Health dropdown menu, you can view overall system health and design time metrics.

  3. Click Activity Stream to view details about the scheduled integration. The log indicates the 1 KB file was uploaded to the /upload directory.


    Description of sample_file_act_st.png follows
    Description of the illustration sample_file_act_st.png
  4. In the navigation pane, click Tracking and note that the File Transfer sample integration instance is listed as completed. You can see the filename and file size, which enables you to look for particular files in case of problems.


    Description of sample_file_track.png follows
    Description of the illustration sample_file_track.png
  5. In the navigation pane, click Integrations and note that the message was successfully received and processed without any errors. For this example, Schedule is not defined is displayed because this scheduled integration was invoked with the Submit Now option.


    Description of sample_file_int.png follows
    Description of the illustration sample_file_int.png

How To View

  1. Click the home icon icon.

  2. Click the Integrations diagram.

  3. Click the File Transfer integration.

    A read-only version of the integration is displayed for viewing. Because the integration is active, it cannot be edited.

  4. View the flow of the integration:

    • The Schedule icon indicates that this is a scheduled orchestrated integration. The schedule invokes this integration.

    • An FTP Adapter (ReadFile) is configured to read a file in binary mode from the / directory of the server you specified in the Connections page. No schema is defined for this file transfer, so it is treated as an attachment.

    • A logging message is created to indicate that the file name has been read. The message is logged to the activity stream.

    • An assign action is configured to assign variables for the file name and file size. This enables you to track issues based on filename and size.

    • An FTP Adapter (WriteFile) is configured to write a file to the /upload directory on the same server that matches the file name pattern of 1KB%yyMMddHHmmssSS%.zip.

    • A logging message is created to indicate the file name has been uploaded to the /upload directory. The message is logged to the activity stream.


    Description of sample_file_trans_int.png follows
    Description of the illustration sample_file_trans_int.png