Skip to content

Wait for file

Introduction

The Wait for file task is designed to retrieve the list of files under a specified path at regular intervals. It then attempts to match the name of each individual file against a specified filename and pattern, following the order of filename matching first and then pattern matching. As soon as a match is found, the task will exit immediately and provide a response containing information about the first matched file.

However, if the file is not found even after a predetermined number of attempts, the task will not continue indefinitely. Instead, the case will be terminated, indicating that the desired file could not be located within the specified path and matching criteria.

Configuration

  • Name - The display name of the task.
  • Connector - Select a previosly configured remote agent connector.
  • Path - Directory that will be observed.
  • Filename - Exact name of the file that will be waited for under the path.
  • Pattern - Regular expression to be matched against every file found under the path.
  • Recursive - Observe the content recursively.
  • Wait - Time to wait before the next scan.
  • Attempts - Number of scan attempts. If it's not set, the path will be scanned until the file or pattern is matched
  • Log on complete - Prints the response in the business log.
  • Response - WaitForFileResponse object that contains information about the first matched file.
Format used in the Wait field

The format that may be used when defining for how long the task should wait is the following: Week - w, Day - d, Hour - h, Minute - m, Second - s.

For example if process variable "res" is used to catch the result from wait for file task to access particular property, specify the file property which you wish to access:

res.file.filename
res.file.size
res.file.absolutePath

Example