Table of Contents

Search

  1. Preface
  2. Informatica Managed File Transfer Welcome Overview
  3. Dashboard
  4. Resources
  5. Workflows
  6. Task Reference
  7. Services Overview
  8. Users
  9. Logs and Reports
  10. Encryption
  11. System
  12. Appendix
  13. Glossary Terms

Example: While Loop

Example: While Loop

A company expects to retrieve four files each day from a trading partner’s FTP server. The four files can appear at any time during the day. All four files must be processed at the same time. In the example below, the loop verifies there are exactly four files, then it processes those files and exits.
  1. Create a Variable that counts the number of files.
    1. From within the Project Designer page, expand the Project folder in the Component Library, and then drag the Variable task to the Project Outline.
    2. Provide the variable name and default value.
  2. Create the While Loop using the "fileCount" variable:
    1. From within the Project Designer page, expand the Loops folder in the Component Library, and then drag the While Loop task to the Project Outline.
    2. Specify the Condition for the While Loop.
  3. Add the FTP Task to monitor the file count:
    1. From within the Project Designer page, expand the FTP folder in the Component Library, and then drag the FTP task to the Project Outline.
    2. On the FTP Task page, specify the FTP Server.
  4. Add the File List variable:
    1. From within the Project Designer page, expand the File System folder in the Component Library, and then drag the Create File List task to the Project Outline.
  5. Add the FTP File Set where the files will be located:
    1. Click the
      Add
      button in the sub-menu and select the Add a File Set menu item.
    2. On the FTP File Set page, specify the Base Directory where the files will be located.
  6. Create a Delay Task to wait before rechecking for the file count:
    1. From within the Project Designer page, expand the Loops folder in the Component Library, and then drag the Delay task to the Project Outline..
    2. On the
      Basic
      tab, set the duration and the time units.
    3. Click the Control tab to set the condition so the Delay Task only executes if needed. In this example the Delay Task will only execute if there are not 4 files in the specified location. If the condition is met, then the Loop will continue with the remaining Tasks.
  7. Add additional Tasks (after the Delay task) to process the files when the file count is satisfied. For instance, you could add a FTP task with a Get to retrieve the files and then add another task to process those retrieved files.
  8. Click Save.

0 COMMENTS

We’d like to hear from you!