Freigeben über


Drill through the Records Center structure using the DOD5015.2 add-on pack

The Microsoft Office SharePoint Server 2007 DoD 5015.2 Add-On Pack has been around for sometime now. In this post, I want to share a high level overview of the add-on pack File Plan and then detail how to drill down through the Records Center structure created by the File Plan using the associated development kit.

What is the DoD 5015.2 Add-On Pack?

The Add-On Pack extends MOSS 2007's records management capabilities in appropriate ways so that customers and partners can deploy DoD 5015.2 compliant solutions. The DoD 5015 is a widely-adopted industry standard for records management applications in the Enterprise Content Management (ECM) industry. The standard offers guidelines for how records and permissions should be managed, automating the periodic review of vital records, managing e-mail as records, and being able to support multi-phased lifecycle management for documents that require more-complex retention rules. More related information can be found at

https://www.microsoft.com/sharepoint/capabilities/ecm/dod5015.mspx

Records Center File Plan Structure

A file plan is a classification scheme that contains all the business rules associated with an organization's records. The add-on pack file plan structure mainly contains the following groups:

Record Categories

· Container for records and record folders

· Determines the retention and disposition (destroy or transfer) of the records and folders

Record Folders

· Container for records that are grouped together

· Allows retention and disposition of records and sub folders to happen together

The file plan also includes configuration such as:

Global Period

· Defines specific periods of time (week, month, and year) defined at the Record Center level.

Global Events

· Events that occur within an organization that trigger a record's or group of records' disposition

For example, the patient discharge event in a hospital can trigger the transfer to retention of the medical records into the archives.

Cut-Off Instructions

· Cut-Off indicates start of retention. It means a record enters the retention and disposition lifecycle only after the cutoff occurs. A Cut-Off instruction is a set of rules that initiates the cut-off for a record/ group of records. The Add-On pack provides the ability to create three different types of cutoff instructions

1. Global Period Cutoff – trigged by a global period

2. Folder Event Cutoff - triggered by a Record Folder event such as Closure

3. Global Event Cutoff – triggered by a global event

Disposition Instructions

· CutOff triggers record retention. The records are retained till the retention lifecycle completes (retention time). After this, records undergo disposition – destroy or transfer to another device.

Disposition Instructions are rules that carryout the disposition of the records.

Drill through the File Plan

Now that we have an overview of the structure of the File Plan in the Add-on pack, we will see how to drill through the records center created by the file plan. This can be useful in many scenarios that need to retrieve information about records and folders from an inner level in the file plan hierarchy, such as:

Reports: For example, the Claims department in a hospital will need a report on all newly created discharge summary records in the current week, within the In-Patient Record Category within their Health Information System records center.

The development kit available with the add-on pack provides an object model and API set. However there is no direct API or utility method that allows retrieving all records and folders in the records center for a given Record Category or Folder in the File Plan.

In the following sections, we will see how we can retrieve the items in the File Plan using basically two steps namely – get the container list for the file plan and employ content type filter based query to retrieve items.

File Plan location:

The File Plan location can be specified either at the Record Category level or Record Folder level in the File Plan. Each Record Category is implemented in the Records Center as a document library and each Record Folder is implemented as a folder within the parent document library. Each Record Folder object has a property for the URL of the records and folders container. In the following sections, we will see how to retrieve the records and folders in a Record Category and a Record Folder. The complete code listing is available in the attached zip file.

Scenario 1: Drill through a Record Category 
In this scenario, all records and folders in the Record Center are fetched for the specified Record Category in the File Plan. There are 2 steps to this namely:

           Step1: Get the Document Library in the Records Center for the RecordCategory

using Microsoft.SharePoint.RecordCenterAddOnPack.Common;

//RecordCategory object from the File Plan

SPList filePlanRecordCategoryList = RecordCategory.GetList(web);

SPListItem recordCategoryItem = filePlanRecordCategoryList.Items[0];

//Get the associated Document Library SPList for the RecordCategory

string fieldNameForRCDocLibGuid = RecordCategory.RecordCategoryDocumentLibraryGuidField;

Guid documentLibGuid = new Guid(recordCategoryItem[fieldNameForRCDocLibGuid].ToString());

web.Lists.IncludeRootFolder = true;

SPList parentSPListForFilePlan = web.Lists[documentLibGuid];

Step2: Dereference the Document Library of the RecordCategory

In this step, we can employ a CAML query to retrieve all the items in the list that have a content type “Record” or “Record Folder Container”. These are the names of the content types in the DoD 5015.2 add-on pack for the record and record folder respectively. The list being queried will be the SPList for the document library of the Record Category

StringBuilder where = new StringBuilder("<Where>");

where.Append("<Or>");

AddWhere(where, "ContentType", "Choice", "Record Folder Container"); //Folder ContentType in DoD Pack

AddWhere(where, "ContentType", "Choice", "Record"); //Record ContentType in DoD Pack

where.Append("</Or>");

From the query results, the SPListItem references to the items can be retrieved easily using the parent SPList (document library) reference.

Scenario 2: Drill through a Record Folder

In this scenario, all records and folders in the Record Center is fetched for the specified Record Folder in the File Plan. As mentioned earlier, each Record Folder object has a link to the URL of the container folder for its records and sub folders. We need to retrieve all the items within this container recursively to dereference the record folder.

Step1: Get the Container Folder in the Record Center for the Record Folder

//Record Folder

SPList recordFolderList = RecordFolder.GetList(web);

SPListItem recordFolderItem = recordFolderList.Items[0];

//Get the Container Folder (SPFolder) in the RecordCenter for the RecordFolder

stringfieldForLinkToRecords = RecordFolder.RecordFolderLinkToFoldersRecords;

string link = recordFolderItem[fieldForLinkToRecords].ToString();

SPFolder containerFolder = web.GetFolder(link);

SPList parentList = web.Lists[containerFolder.ParentListId];

Step2: Dereference the Container of the Record Folder

Here also we can employ a CAML query to retrieve all the records and subfolders within the container folder of the Record Folder. The Contains clause for the field “FileDirRef” and the name of the record folder as the value will ensure that we retrieve items only within the container folder.

The SPList to be queried on will be the parent list of container folder.

whereBuilder.Append("<Contains><FieldRef Name='FileDirRef' /><Value Type='Text'>" + recordFolderItem.Name + "</Value></Contains>");

The complete code listing for the above steps can be found in the attached zip file.

Conclusion

In the above article we discussed at a high level the structure of the File Plan in the DoD5015.2 add-on pack, the Record Category and Record Folder being the core levels. We also discussed the object model provided by the development kit. The RecordCategory and RecordFolder objects provide pointers to their actual containers in the Records Center. The Document Library identifier for the RecordCategory object can be used to dereference the RecordCategory. Similarly, the link to the folders and records of the RecordFolder object can be used to dereference the RecordFolder. Finally, we discussed how to query these containers to retrieve all the items within a specific location in the File Plan for which there is no direct method in the development kit.

I hope this article provides some useful information. Please provide your comments and suggestions.

 

Kumar

Kumar Subramanyam Consultant Microsoft Services Kumar.Subramanyam@microsoft.com

Click here for my biopage

CodeListing.zip

Comments