Running a flow based on file activity

Sometimes you do not want a flow to run until something happens to a particular file. Add a file event in the Flow Attributes to automatically submit a flow based on specific conditions. Use the file event to repeatedly submit flows if the specified conditions are met.

About this task

You can specify the following criteria:

  • The file arrives

  • The file exists (includes when the file is created)

  • The file does not exist (includes when the file is deleted)

  • The file size meets a certain criteria

  • The file is updated within a certain time period

    When you specify a file event for a flow, the flow will run when the file meets the specified condition. Even if the flow is still active the next time that the file meets the specified condition, the file event runs the flow only once.

Procedure

  1. In Flow Editor, select Edit > Flow Attributes and select the Triggering Events tab.
  2. Click Add.

    The Trigger Flow with Events dialog is displayed.

  3. In Select type of event, select File Event.
  4. In the File name field, specify the full path name of the file as the Process Manager Server sees it, or click the Browse button to point to the file on which this event depends.

    When specifying the file name, you can also specify wildcard characters: * to represent a string or ? to represent a single character. For example, a*.dat* matches abc.dat, another.dat and abc.dat23. S??day* matches Satdays.tar and Sundays.dat. *e matches smile.

    Note: There are some differences between UNIX and Windows when using wildcard characters. Because UNIX is case-sensitive and Windows is not, if you specify A*, on UNIX it matches only files beginning with A. On Windows, it matches files beginning with A and a. Also, on UNIX, if you specify ??, it matches exactly two characters. On Windows, it matches one or two characters. These behaviors are consistent with UNIX ls command behavior, and Windows dir command behavior.

    You can also specify a variable for the file name, provided your system is configured to support them.

  5. In the Condition field, choose the appropriate condition from the list, and specify the number of bytes if applicable.
  6. In the Description field, add any descriptive text that may be used for understanding this event. For example, if this event requires special instructions for operations staff, place those instructions here.
  7. Click OK. The file event is displayed in the Flow Attributes.