3.2.1.7.1 File Management Job

For each file management job, a minimal set of configuration properties and state data is maintained by the server. The configuration of a file management job consists of all the information required to define the file management job. The state consists of the properties that are tracked while the file management job is running and the results of both successfully completed and failed file management jobs.

A File Management Job is a type of FSRM Base Object (section 3.2.1.1) that has all the properties and state of a FSRM Base Object. The following configuration data is maintained for each file management job on the system:

File Management Job.Name: This property is a unique, case-insensitive, user-assigned Unicode string for the file management job.<43>

Namespace roots: This property is a list of either full directory paths (referred to as static path in this definition) or values from the FolderUsage list (referred to as dynamic path in this definition). The set of file system namespaces (file system directory trees) that will be scanned as a part of the file management job consists of either the full directory path (for a static path) or the FolderUsage Instance.Path values of each FolderUsage Instance in the FolderUsage Mapping whose FolderUsage Instance.Value list contains the <value> portion of a dynamic path.<44>

Enabled/disabled: This property controls whether the file management job will be run.

Operation type: This property identifies the file management job as one of two file management types: expiration and custom, as defined in the FsrmFileManagementType (section 2.2.2.9.1.1) enumeration. The set of properties for the file management job is different depending on which file management type the file management job belongs to:

Expiration:

Expiration directory: This property is the folder on the server that files matching the file management job's conditions will be moved to.

Custom:

Custom action: This property is a handle to an IFsrmActionCommand interface pointer (section 3.2.4.2.9) that points to a command line action type notification object that is called when all the file management job conditions are met by a file. A protocol client can initiate a change to a custom action and can delete the custom action. See section 3.2.1.4 for more information about data required for the action.

Notification periods: This property is a list of zero or more notification period objects. A protocol client can initiate a change to a notification period value and can delete the notification period.

Logging: This property determines how logging will be handled for the file management job. It is a bitwise combination (using the OR operator) of values of the FsrmFileManagementLoggingFlags (section 2.2.2.9.1.2) enumeration.

Report enabled: This property determines if the file management job will output a report of the files that matched the file management job's conditions.

File Management Job.Formats: This property describes the set of output formats to which the file management job's report will be transformed as a result of a successful execution of the file management job. Supported formats are DHTML, HTML, TXT, CSV, and XML.

File Management Job.Mail to: This property is a Unicode string that will be used for the email TO addresses to which the file management job's report will be sent as a result of a successful execution of the file management job.

Conditions: The following properties are used when a file management job is run to determine if a file is to be acted on by the file management job. The first three items describe specific attributes of the file that will be compared when determining if a file is to be acted on. The condition is met if the file's attribute is greater than the file management job's value for the specific attribute. The fourth item is a list of property conditions specified by the client that are used to determine if a file is to be acted on by the file management job. All the conditions need to be met if the file is to be acted on.

Days since file created: This property is the number of days since the file was created.

Days since file last accessed: This property is the number of days since the file was last accessed.

Days since file last modified: This property is the number of days since the file was last modified.

Property conditions: The file management job configuration can be associated with zero or more property conditions. See section 3.2.1.7.2 for details. A protocol client can perform the following management operations involving property conditions:

  • Create a property condition to be used when determining what files might be affected by the file management job. See section 3.2.4.2.45.13 for details.

  • Enumerate a list of all the property conditions configured to be used when determining what files might be affected by the file management job. See section 3.2.4.2.45.12 for details.

  • Delete a property condition from the file management job. See sections 3.2.4.2.10.4 and 3.2.4.2.10.5 for details.

From date: This property controls the date on which the file management job can be applied to files.

Task name: This property is a Unicode string containing the name of an associated scheduled task.

File Management Job.Parameters: This property is a list of Unicode text strings that are additional parameters or descriptive metadata regarding the file management job that can be used by consumers of the protocol. Clients can use these strings to store additional descriptive information about the file management job. Examples of information that a client can store here include "Author=jdoe" and "Created=12-5-10". See section 3.2.1.12.3 for details of how these strings affect server behavior. See the definition for parameter strings in section 3.2.4.2 for details regarding the individual text strings.

File name pattern: This property is a Unicode file name pattern that is used to compare file names to be scanned as a part of the file management job. If no pattern is specified, all files that are scanned will be included. If a pattern is specified, a file that is scanned will only be included if it matches the pattern.

The following state data is maintained for each file management job in the system:

Running status: This property is a numeric value indicating the current running status of the file management job. Possible status values are defined in the FsrmReportRunningStatus (section 2.2.1.2.13) enumeration.

Last run time: This property maintains a time stamp that corresponds to the chronological date/time that the file management job was last run.

Last error: This property maintains a Unicode string that corresponds to an error message generated when the file management job was last run. If the last run of the file management job was successful, the Last error Unicode string is an empty string.

Last report path without extension: This property maintains a Unicode string that corresponds to the file path of the report last generated by the file management job. This property does not include the file extension of the last report.<45>

Error log: This property is a list of all files where the file management job encountered an error either when determining if the file met the conditions of the file management job or when the file management job tried to act on the file. This list is maintained while the file management job has a running status of Running and is persisted when the running status changes from Running to Not Running.

Information log: This property is a list of all files that met the conditions of the file management job and were acted on by the file management job. This list is maintained while the file management job has a running status of Running. This list is persisted when the running status changes from Running to Not Running.

File Management Job.Deprecated: This Boolean property indicates whether the file management job is valid.<46>