3.2.4.2.48.41 Run (Opnum 51)

The Run method starts the running file management task associated with the file management job.

 [id(FSRM_DISPID_FILE_MANAGEMENT_JOB | 0x01)] HRESULT Run(
   [in] FsrmReportGenerationContext context
 );

context: Contains the value of the report generation context in which the associated running file management task will run.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80045333

FSRM_E_REPORT_JOB_ALREADY_RUNNING

The file management job is already running.

0x80070057

E_INVALIDARG

The context parameter is not valid.

The server MUST perform the following actions in sequence or return a nonzero error code:

  • If this file management job does not have its Enabled/disabled property set to enabled, the server MUST return zero.

  • For the following, the Property definition that has a Name with the same value as the Name on a given Property Condition will be referred to as the Relevant Property Definition for that Property Condition.

    • If any Property Condition in Property conditions does not have a Relevant Property Definition, the server MUST return E_INVALIDARG.

    • If the Relevant Property Definition for any Property Condition in Property conditions has its Property Definition.Deprecated member set to true, the server MUST set File Management Job.Deprecated to true and return E_INVALIDARG. Otherwise, it MUST set File Management Job.Deprecated to false.

  • If there is already a Running Job in the Running File Management Job Queue whose Running Job.Parent instance has the same File Management Job.Name as this instance's File Management Job.Name, the server MUST return FSRM_E_REPORT_JOB_ALREADY_RUNNING.

  • Create a Running Job and set its properties as follows:

    • Running Job.Parent: Reference to this instance.

    • Reports directory: File system path to the output directory associated with context. See section 3.2.1.5.3 for details on selecting the output directory for different generation contexts.

    • Running Job.Cancel: false.

    • Queue the Running Job to Running File Management Job Queue.

  • Set the Running status of this instance to FsrmReportRunningStatus_Queued.

See section 3.2.1.12.1 for more information about how the server monitors running report tasks.