Version Control in Enhanced Folders

Version control, which requires the use of enhanced folders, enables users to:

  • Lock documents while editing.
  • Work on the most current version of the document.
  • Get document approval before documents become visible to readers.

There are four version control states. The following table shows the version control states and a description of each.

State Description
Checked-out Places an editing reservation on the document. To check out a document, use the Checkout method on the KnowledgeVersion object.
Checked-in Releases the editing reservation placed on the document. To check in a document, use the Checkin method on the KnowledgeVersion object.
Waiting for approval Enables approvers to approve or reject the document. If the folder is set for auto-approval, there is no approval process, and the document goes immediately to the Approved state.
Approved Makes the document available to readers. To approve a document, use the Approve method on the KnowledgeVersion object.

For more information about the documentstate property, see SharePoint Portal Server Global Properties.

Folders support user roles so that selected users are allowed to perform certain functions while other users are prevented from performing these same tasks. Three essential roles for versioning control are:

  1. Authors.
  2. Approvers.
  3. Readers.

For more information about roles, see Roles and Permissions.

Figure 8: Version Control in the Document Life Cycle

The preceding figure shows the states, roles, and processing steps for version control, from document creation to readers viewing the document.

To publish a document in an enhanced folder:

  1. Check out a document. This places the document in the Checked-out state. Checking out a document places an editing reservation on the document. The checked-out document becomes read-only until either it is checked in again or the check-out on the document is undone. Undoing the check-out releases the edit reservation on the document without changing the existing version or the version number.
  2. Edit the document. In the Checked-out state, all edits are performed on the latest version of the document.
  3. Check in the document. When the author is finished with the edit process, the author checks in the document. This places the document in the Checked-in state. Checking in a document releases the editing reservation placed on the document when it was checked out and updates the content of the document.
  4. Publish the document. This places the document in the Waiting for Approval state. Publishing a document starts the approval cycle. When a document is published, and there is approval routing defined for that document, the routing is initiated. If there is no approval routing, the document is published as the new default version. If the document is checked out, SharePoint Portal Server checks it in before it is published. SharePoint Portal Server immediately approves all documents added to standard folders. Each time the document is checked in or published, a new version number is assigned to the document and the previous version is archived.
  5. Approve the document. This places the document in the Approved state. If the document is approved according to the selected publishing model, readers with the correct permissions can view the document. The Approve method of the KnowledgeVersion object approves the document as the current default version. This method succeeds only for documents that are published, and only if the user is an approver for this document.
  6. Review feedback from the approvers. If one or more approvers, depending upon the selected publishing model, reject the document, it is placed in the Checked-in state. The author can then review the feedback, and if desired, check the document out, perform further edits beginning the version control cycle again. The Reject method of the KnowledgeVersion object rejects the document as the current default version. The default version remains unchanged.

The preceding version control cycle is non-ending. An Approved document can be checked out and the version control process can begin again.

When you check out an approved document, SharePoint Portal Server creates a working copy for you. The URL for this working copy is not that of the original document you checked out. You must now bind to the working copy. The URL of the working copy can be obtained in one of two ways:

  1. You can determine the URL from the recordset returned from the Checkout method of the KnowledgeVersion object and then bind to that URL.
  2. You can open the approved version and query for the URL of the working copy and bind to this URL.

For more information about how to do these procedures, see the example in KnowledgeVersion object.

See Also

SharePoint Portal Server Help Documentation