3.2.4.2.50.2 CreateFileManagementJob (Opnum 8)

The CreateFileManagementJob method creates a blank Non-Persisted File Management Job Instance (section 3.2.1.7.1.2) and returns S_OK upon successful completion.

 [id(FSRM_DISPID_FILE_MANAGEMENT_JOB_MANAGER | 0x2)] HRESULT CreateFileManagementJob(
   [out, retval] IFsrmFileManagementJob** fileManagementJob
 );

fileManagementJob: Pointer to an IFsrmFileManagementJob interface pointer (section 3.2.4.2.48) that upon completion points to a blank fileManagementJob. A caller MUST release the fileManagementJob received when the caller is done with it. To have the fileManagementJob added to the server's List of Persisted File Management Jobs (section 3.2.1.7), the client MUST call Commit (section 3.2.4.2.48.1).

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

Return value/code

Description

0x80070057

E_INVALIDARG

The fileManagementJob parameter is NULL.

Upon receiving this message, the server MUST validate parameters:

  • Verify that fileManagementJob is not NULL.

If any validation fails, the server MUST terminate processing and return a nonzero error code.

Upon successful validation of parameters, the server MUST perform the following actions.

  • Create a new Non-Persisted File Management Job Instance.

    • Set FSRM Base Object.Id to a GUID.

    • Set File Management Job.Name to an empty string.

    • Set Namespace roots to an empty list.

    • Set Enabled/disabled to enabled.

    • Set Operation type to Expiration.

    • Set Notification periods to an empty list.

    • Set Notifications to an empty list.

    • Set Logging to FsrmFileManagementLoggingFlags_None.

    • Set Report enabled to true.

    • Set File Management Job.Formats to an empty list.

    • Set File Management Job.Mail to to an empty string.

    • Set Days since file created to FSRMDaysNotSpecified.

    • Set Days since file last accessed to FSRMDaysNotSpecified.

    • Set Days since file last modified to FSRMDaysNotSpecified.

    • Set Property conditions to an empty list.

    • Set From date to FSRMDaysNotSpecified.

    • Set Task name to an empty string.

    • Set File Management Job.Parameters to an empty list.

    • Set File Management Job.Deprecated to false.

    • Set File name pattern to an empty string.

    • Set Running status to FsrmReportRunningStatus_NotRunning.

    • Set Last run time to a date in the distant past.

    • Set Last error to an empty string.

    • Set Last report path without extension to an empty string.

    • Set Error log to an empty list.

    • Set Information log to an empty list

  • Set fileManagementJob to the IFsrmFileManagementJob interface pointer for the newly created Non-Persisted File Management Job Instance.

The new Non-Persisted File Management Job Instance MUST NOT be associated with an existing Persisted File Management Job (section 3.2.1.7.1.1).