3.2.1.12.2 Running Classification Task

The Running Classification Task is a task that runs continuously, in a loop, and monitors the Running Classification Job Queue. Because the server maintains only one Running Classification Job Queue, there is only one Running Classification Task in the server.

Whenever the Running Classification Job Queue is not empty, the task searches for one Running Job in the queue for which the parent Classification Job – identified by the Running Job.Parent reference – has a Running status of FsrmReportRunningStatus_Queued. The task processes such an object by performing the following actions in sequence:

  1. Set the parent instance's Running status to FsrmReportRunningStatus_Running.

  2. Create an empty volatile list of file references that will be referred to as Report item list for the remaining steps.

  3. The server performs the following steps listed here, in sequence, for each file whose path resides in at least one of the parent instance's Classification Job.Namespace Roots.

    1. If the Running Job's Running Job.Cancel property is true, skip to the Report step below.

    2. Perform the Retrieve stored classification properties for the file.

    3. Perform the Generate new classification properties action for the file given the list of Property Definition Instances from the preceding action. If the property definition instance.flags of any of the resulting Property Definition Instances contains FsrmPropertyFlags_SetByClassifier, add the file to the Report item list.

    4. Perform the Store classification properties action for the file given the list of Property Definition Instances from the preceding action.

  4. Report Step (in sequence):

    1. If the parent instance's Generate classification report is false, skip the Report step.

    2. For each report format in the parent instance's Classification Job.Formats, generate a classification report of that format for the items in the Report item list.

    3. Store all generated reports as files in Reports directory. All file names MUST begin with Report.Last generated file name prefix.

  5. After the Report Step (in sequence):

    1. Set the parent instance's Classification Job.Last error to an empty string – if no errors occurred – or to a string describing the error encountered.

    2. Set the parent instance's Last generated path to Reports directory.

    3. If reports were generated, send emails with the generated reports to the email address recipient list in the parent instance's Classification Job.Mail to, as follows:

      1. If the parent instance's Classification Job.Mail to is an empty string, the server MUST NOT email the report when the action is run.

      2. If the parent instance's Classification Job.Mail to contains the string "[ADMIN EMAIL]", the server MUST send the report to the Administrator email address returned from IFsrmSetting::AdminEmail (get), in addition to other email addresses in Mail to, when emailing the report.

  6. Set the parent instance's Running status to FsrmReportRunningStatus_NotRunning.

  7. Remove the Running Report Job from the Running Classification Job Queue.