Wait for File Change

The Wait for File Change activity is a signal-in activity that waits for a file creation, modification, or deletion event to occur during the process execution. When this activity is executed, the process instance suspends and waits for the specified change to occur before resuming.

General

The General tab has the following fields.

Field Literal Value/Process Property/Module Property Description
Name None The name to be displayed as the label for the activity in the process.
Filename Yes The name and path of the file to poll for. Use to locate an existing file.

You can also use wildcards to monitor a directory for files that match the applied specification. For example, C:\files\*.log matches any change to a file in the files directory with an extension of .log.

Polling Interval (sec) Yes The polling interval (in seconds) to verify the changes in the specified file.
Include Existing Files None Select this check box so that you can select the file among the files that existed prior to the starting of process engine.
  • When selected: if an existing file matches the specification in the Filename field on process engine start, the Wait for File Change activity accepts the file as changed and proceeds to the next activity.
  • When not selected: any existing file with matching specification in the Filename field is ignored, until there are changes in the file.
Exclude File Content None Specifies not to load the data from the file into the output of the activity.

If this field is selected, the contents of the file are not available to the subsequent activities in the process.

In addition, if this field is selected, Content as and Encoding fields are not available.
Content as Literal Value The type of the content in the file. It can be either Text or Binary.
Encoding Yes The character encoding of the file.

This field is available only when Text is specified in the Content as field.

Include Timestamp None Select the check box to display timestamp, in addition to the date.

Description

Provide a short description for the activity.

Event

The Event tab has the following fields.

Field Description
Event Timeout (seconds) This field specifies the amount of time in seconds. If no value is specified in this field, the message waits indefinitely. If zero is specified, the event is discarded immediately, unless this activity has already been executed.
Activity Timeout (msec) A file change may occur before this activity is executed.

This field specifies the amount of time (in milliseconds) to wait if the file change occurs before this activity is executed in the process instance. If the event timeout expires, an error is logged and the event is discarded.

Conversations

You can initiate or join the conversation here. To initiate multiple conversations, click the Add New Conversation button. To join multiple conversations, click the Join Existing Conversation button.

For more information about conversations, see the TIBCO ActiveMatrix BusinessWorks™ Application Development guide.

Output

The following is the output for this activity.

Output Item Datatype Description
action string The occurred event to trigger the File Poller activity. The possible values are: create, remove, or modify.
timeOccured integer The time when the Wait for File Change activity detected the change in the file.

The time is defined as the amount of time in milliseconds. For example, since midnight, January 1, 2013 UTC.

fullName string The name of the file, including the path information.
fileName string The file name without the path information.
location string The path to the file.
configuredFileName string An optional element. This element is not populated by this activity.
type string The type of the file.
readProtected boolean Specifies whether the file is read-protected.
writeProtected boolean Specifies whether the file is write-protected.
size integer The size of the file in bytes.
lastModified string The timestamp indicating when the file was last modified.
fileContent complex The element containing the textContent data.
textContent string The content of the file (text files), if the Exclude File Contents check box is not selected on the General tab.
binaryContent binary Contents of the file (binary files), if the Exclude File Contents check box is not selected on the General tab.
encoding string The character encoding for the file.

Fault

The Fault tab lists the possible exceptions generated by this activity. For more information about error codes and the corrective action to take, see the TIBCO ActiveMatrix BusinessWorks™ Error Codes guide.

Fault Generated When..
ActivityTimedOutException A timeout has been reached.