Defining a read file action for reading files

  1. Start ION.
  2. Click Connect > Connection Points
  3. Click New and select File.
  4. Click the Documents tab
  5. Click Add. A new action is created and listed in the Action List.
  6. Select the action entry and specify the action type Read File to read a file and construct a BOD using the file content.
  7. If Create non-existing folder(s) is selected, the specified folders for Read, Error or Archive are automatically created.
  8. In the File Format Template & Document Settings section specify the Document Template or File Format Template to use when reading files.
    1. Document Template, select from documents defined in ION Registry.
      File Format Template, select from already defined templates or click New to define a new file template. To view the details of the selected template, click Details.

      For details, see File templates.

    2. After the file template is specified, the BOD Noun that is associated with the specified template is filled. If the template does not have an associated BOD, an error occurs.
    3. Select which BOD Verb to use in the read action.
  9. In the Read File Settings section specify this information:
    Read Location
    Specify the read location in the file server from which the files is read. This is defined relevant to the hostname defined in the connection tab setting. This is a required field.

    For guidelines on how to define the correct location, see File share locations.

    Error Location
    Specify the Error Location on the file server. Files are moved to this location in case an error occurs during reading or performing the 'After Read' action. This is defined relevant to the hostname on the connection tab setting. This is a required field.
    Note: If a file with the same name already exists in the Error Location, the File Connector renames the file. A timestamp is added to the file name to avoid overwriting existing files.

    For guidelines on how to define the correct location, see File share locations.

    File Name Pattern
    Specify the file name pattern that represents the name of the file or files that are read by that action. This allows the usage of wildcards (? for one character and * for multiple characters). This field is case-sensitive and required.

    We do not recommend that you specify a file name pattern of *.* or any pattern ending with *. This pattern allows the file connector to retrieve everything from the source folder. Sometimes when the file is read, a temporary file such as .inprocess is created by the operating system. If you rename a file after the read, the already processed and renamed file is reprocessed. To avoid such undesirable outcome, you must be cautious when selecting this pattern.

    Note: Some sFTS servers have a built-in file renaming feature. This feature may result in unprocessed files.
    After Read
    Select which after read action to run when the read action is finished successfully. Available options are:
    • Move File: Specify the Archive Location in the file server to which the files are moved. This is defined relevant to the hostname defined in the connection tab setting.

      For guidelines on how to define the correct location, see File share locations.

      Note: If a file with the same name already exists in the Archive Location, the File Connector renames the file. A timestamp is added to the file name to avoid overwriting existing files.
    • Rename File: Specify the New File Name Pattern that specifies the new file name. This field is case-sensitive. This pattern does not allow wildcards (? or *) and other characters.

      See File name pattern restrictions.

      This pattern can allow the usage of keywords. Press Ctrl + Space to view the list of possible keywords. For a complete list of keywords, see Keywords.
      Note: In the case of the SMB V2 and SMB V3 protocols, the File Connector overwrites an existing file if the file has the same name as the renamed file. In the case of protocols other than SMB V2 and SMB V3, if an existing file has the same name as the renamed file, the File Connector adds a timestamp to the renamed file name. To avoid overwriting files for the SMB V2 and SMB V3 protocols, we recommend that you add a timestamp to the new file name in the New File Name Pattern field.
    • Delete File: Processed files are deleted. No extra properties must be configured.
    Compression
    Select which compression type is used for the files in read location. These are the available options:
    • None: No compression is expected to be used for the read file.
    • Deflate: The files are expected to be compressed based on the deflate algorithm, as described in RFC 1951. A combination of the LZ77 algorithm and Huffman coding, wrapped inside the zlib data format, RFC 1950.
      Note: When the document_id keyword is used in New File Name Pattern, the file must be inflated in the File connection point to read the document id property. This action can result in exceeding the ION message size limit.
  10. In the Schedule section, specify one of these options:
    Basic Scheduling
    In Basic Scheduling, ION is always polling the folder in the Read location. If there are no more new files found to be processed on a given polling attempt, the polling daemon goes in sleep mode. The duration of the sleep mode is specified in milliseconds by the property Daemon Sleep Time (ms).
    Advance Scheduling
    Specify an advance scheduling option based on a CRON expression. When a trigger is executed based on CRON, all matching files at that point in time are processed.

    See "Advanced scheduling options".

  11. In the Polling Settings section, specify this information:
    1. Select the Sort By option that is used to retrieve files from the Read Location to start the reading action. Files are sorted in an ascending order either by Name or Modification Date Time.
    2. Other polling properties values:
      • Number of Error Retries
      • Default Minimum Retry Delay
      • Default Retry Delay Change Unit
      • Default Maximum Retry Delay
      • Default Retry Delay Number

      For explanation of these properties, see "Advanced properties for polling" in the Infor ION User Guide.

  12. After the configuration for the Read File action is finished, click Test.
    A test is run to check if the specified (Read, Error and Archive) locations are valid and accessible. This also validates if the permissions provided to run the required action are sufficient. A message is displayed to inform you whether the test is successful or not.