Configuring the File Access node

Note: 

In some situations, a file might be accessed while it is being used by another process. For example, a process writes to a file and the succeeding step or another process performs a read from the same file. If the file write is writing a lot of content, the write may not be complete by the time the file read begins. Consequently, the file read will error out because the file was not found. In such scenarios, you can use a wait and retry logic as a workaround

  1. On the General tab, specify this information:
    Configuration name

    Select the configuration that you want to be used for this activity. If you want to use an existing configuration, select a name from the list. If you leave the field blank, the default configuration will be used.

    Execution mode

    Select from these file operations:

    • Read from file: read the file specified in the Input file field and place the contents in the NODENAME_outputData output variable

    • Write to file: write the data specified in the Input data field to the file specified in the Output file field

    • Append to file: append the data specified in the Input data field to the file specified in the Output file field

      Note: When accessing a file in Amazon S3 storage, appending is not supported because Amazon does not support this action. As a workaround, you need to read the entire file into local memory, concatenate the new data to the end of the file, and then re-upload the file to the Amazon bucket.

      Users are advised to use the recommended approach of using the File Access node with the append option within a loop to build a file.

    • Check file exists: check if the file specified in the File field exists. If it exists, NODENAME_errorCode is set to 0 (SUCCESS), otherwise NONENAME_errorCode is set to 8 (FILE_ACTIVITY_ERROR) and the process is terminated if Stop process (in the On Error tab) is selected.

      If you select Ignore Error If File Does Not Exist, the node will not throw an error even if the specified file does not exist.

    • Delete file: delete the file specified in the File field

    • List files: return a list of the files in the directory specified in the Directory field, which match the filename pattern specified in the Filename filter field

      Files which have been modified within some period of time are not listed. The time value is specified in seconds in the "system" configuration property called fileAccessCheckTime. The default is five seconds. For more information about the property, see "Configuring mail and timeout properties" in the Infor Process Automation Administration Guide.

    Encoding type

    Select from the list.

    This setting is enabled only when Read from file, Write to file, or Append to file is selected.

  2. Depending on the selected file operation, specify this information:
    File (or Input file)

    Specify the pathname of the file to act on. This can be an absolute or relative pathname. Server variables are allowed.

    Input data

    Specify the data to write or append to the file. This can include server variables.

    Directory

    Specify the directory to search for the List files function.

    Filename filter

    Optional. Specify the filter for filenames for the List files function, for example, *.xml

    Ignore Error If File Does Not Exist

    Applicable only when execution mode is Check file exists

    If you select this check box, the node will not throw an error even if the specified file does not exist.

  3. On the On Error tab, specify this information:
    What should happen on an error?

    Select from the available options.

    Notify

    Select the check box if you want to send a notification when an error occurs. If this option is selected, you must fill out the notification details.

    Custom log entry

    Select the check box if you want a custom log entry in addition to the system-generated log entry.