Processing Custodian Manager

This topic describes the IProcessingCustodianManager interface, which is used to access the Processing Custodian Manager service. The Processing Custodian Manager service supports read and save operations on custodian objects. The ProcessingCustodian class represents a custodian associated with the files that you want to process. For more information, see Entity object on the RelativityOne Documentation site.

Note: See the topic Get started with the Processing API for general guidance on the Processing API, and links to documentation for the other interfaces and services in this API.

Create a processing custodian

  • Method
    •  CreateAsync: Creates a custodian and returns the artifact id of the custodian.
  • Parameters
    • <int>workspaceID : The workspace that the custodian resides in.
    • custodian: The custodian to be saved. This is a ProcessingCustodian object.
  • Returns
    • <int>CustodianId: The artifactID of the custodian that is created.
Copy
//Build the ProcessingCustodian object.
ProcessingCustodian custodian = new ProcessingCustodian {
  CustodianID = 0, // Indicates a new ProcessingCustodian object.
    DocumentNumberingPrefix = "REL",
    FirstName = "John",
    LastName = "Smith"
};

using(IProcessingCustodianManager proxy = _servicesMgr.CreateProxy<IProcessingCustodianManager>(ExecutionIdentity.CurrentUser)) {
  //Create the ProcessingCustodian object
  int custodianID = await proxy.CreateAsync(data.WorkspaceId, custodian).ConfigureAwait(false);
}

Read a processing custodian

Read the values for the properties on a ProcessingCustodian object by calling the ReadAsync() method on the proxy created with IProcessingCustodianManager interface. The ReadAsync() method requires that you pass the Artifact IDs of the ProcessingCustodian object and the workspace as arguments.

  • Method
    •  ReadAsync: Returns the custodian for the artifact ID passed in.
  • Parameters
    • <int>workspaceID : The workspace that the custodian resides in.
    • <int>custodianID: artifactID of the custodian you want to read.
  • Returns
    • ProcessingCustodian object
      • <List<int>>Classifications: The Custodian classifications
      • <string>DocumentNumberPrefix
      • <string>FirstName
      • <string>LastName
      • <string>Notes
      • <enum>CustodianType: NotSet, Other, or Person
      • <int>CustodianID: custodian artifact ID
      • <string>Name: corresponds to FullName
Copy
using (IProcessingCustodianManager proxy = _servicesMgr.CreateProxy<IProcessingCustodianManager>(ExecutionIdentity.CurrentUser)) {
  //Read the ProcessingCustodian object
  ProcessingCustodian custodian = await proxy.ReadAsync(data.WorkspaceId, custodianID).ConfigureAwait(false);

  //Convert the last and first name of the custodian to a concatenated local string
  string fullName = $ "{custodian.LastName}, {custodian.FirstName}";
}

Update a processing custodian

When updating a processing custodian, call the ReadAsync() method on the proxy created with the IProcessingCustodianManager interface. Next, set the properties on the instance to their new values, and then call the UpdateAsync() method to commit your updates.

  • Method
    •  UpdateAsync: Updates the Custodian object and returns the artifact id of the custodian.
  • Parameters
    • <int>workspaceID : The workspace that the custodian resides in.
    • <int>custodianID: artifactID of the custodian you want to update.
    • custodian: The custodian to be updated. This is a ProcessingCustodian object.
  • Returns
    • <int>CustodianId: The artifactID of the custodian that is updated.
Copy
using (IProcessingCustodianManager proxy = _servicesMgr.CreateProxy<IProcessingCustodianManager>(ExecutionIdentity.CurrentUser)) {
  //Read the ProcessingSet object.
  ProcessingCustodian custodian = await proxy.ReadAsync(data.WorkspaceId, custodianID);

  //Modify the notes and first name of the custodian
  custodian.Notes = "updated notes";
  custodian.FirstName = "Test";

  //Update the ProcessingCustodian object. The service returns the Artifact ID of the object.
  await proxy.UpdateAsync(data.WorkspaceId, custodianID, custodian).ConfigureAwait(false);
}