Library services

Library services are common document management functions for controlling the users through permissions, for creating multiple instances of a document (versioning), and for providing users with access into a document to make the changes (checking-in or checking-out).

Versioning

So far, you have learned about creating spaces, adding files, and editing them. You might have more than one person who can edit a document. What if somebody edits a document and removes a useful piece of information? Well, you can make use of the versioning features of Alfresco to resolve such issues.

Versioning allows the history of previous versions of a content to be kept. The content needs to be Versionable, in order for versions to be kept. You can enable versioning in four different ways:

  1. Individually: To enable versioning for an individual content object item, go to the View Details page and click on the Allow Versioning link. The screenshot on the next page illustrates how to enable versioning on an individual content item.
  2. Using Smart Spaces: A business rule can be set for a space to allow versioning of all of the content or selected content within that space. More information about this is provided in Chapter 6.
  3. By Type: By default, versioning is disabled for all of the content types in the Alfresco content model. Versioning can be enabled for a specific content type, irrespective of the location of the content. More information about this is provided in Chapter 7.
  4. Globally: Alfresco can be configured globally to enable versioning for all content throughout the site. More information about this is provided in Chapter 7.

Enable versioning for sample file that you have already uploaded to the system. Go to the Intranet > Marketing Communications > Switch to open source ECM > 02_Drafts space and view the details of Alfresco_CIGNEX.doc file. Click on the Allow Versioning link to enable versioning, as shown in the following screenshot. You will immediately notice that a version with a version number of 1.0 is created.

Versioning

At the time of writing this book (Alfresco version 3.1), reverting back to an older version of the content is not supported. There is a plan to support this feature in future releases of Alfresco. The workaround is to download the older version and upload it again as the current version.

For a checked out content, the version is updated when the content is checked in. The version number is incremented from the version number of the content object that was checked out.

Auto Versioning

Auto versioning can be enabled by editing the content properties and selecting the Auto Version checkbox.

If auto versioning is enabled, then each Save of the content results in an incremented version number, when the content is edited directly from the repository. Each Update (upload) of the content also results in a new version (with an incremented version number) being created.

If auto versioning is not enabled, then the version number is incremented only when the content is checked in.

Check In and Check Out

By using the versioning feature, you can ensure that all of the changes made to a document are saved. You might have more than one person who can edit a document. What if two people edit a document at once, and you get into a mess with two new versions? To resolve this issue, you'll need to use the library services.

Library services provide the ability to check out a document, reserving it for one user to edit, while others can only access the document in read-only mode. Once the necessary changes have been made to the document, the user checks in the document, and can either replace the original, or create a new version of the original.

Check Out locks the item and creates a working copy that can be edited (both the content and the details). Check In replaces the original item with the working copy, and releases the lock.

Checking out documents

Ensure that you are in the Intranet > Marketing Communications > Switch to open source ECM > 02_Drafts space. Click on the Check Out action for the Alfresco_CIGNEX.doc file, as shown in the following screenshot:

Checking out documents

The Check Out pane is displayed, as shown in the following screenshot. You can either check out the file into the current space or to any other pre-defined space. As a best practice, it is recommended that you check out the working copy to your own Home Space.

For the current example, choose to check out the file to the In the current space option, and click on the Check Out button. You will return to the 02_Drafts space.

Checking out documents

You will see two copies of the same document, as shown in the following screenshot. The original version of the file has a lock. This indicates that no one else can check out this file until you have checked it in again. The original version of the file can't be edited (there is no Edit icon) and cannot be checked out (there is no Check Out icon). The desired effect of all of these features is that you cannot edit a checked out file, either deliberately or accidentally.

You can only update the working copy. The checked out file has Working Copy inserted into the file name. The Working Copy can be edited and checked in.

Checking out documents

Checking in the working copy

Update the Working Copy of the Alfresco_CIGNEX (Working Copy).doc file. Updating the document is explained earlier in this chapter in the Upload updated binary file section. After you have updated the working copy, you can check in by clicking the Check In button, as shown in the screenshot above. Once you click on the Check In action, you will see the Check In dialog window, as shown in the following screenshot:

Checking in the working copy

If you have only made a few minor changes to the file, then you should select the Minor Change checkbox. By selecting the Minor Change checkbox, you will be able to increment only the number after the decimal (for example, from 1.1 to 1.2); otherwise, you will increment the number before the decimal (from 1.0 to 2.0).

For this example, select the Minor Change option, and provide some meaningful version notes. Version notes are very important documentation to help understand the differences between various versions of the same document.

There will no longer be a Working Copy of the document. Notice the latest modification timestamp of the original document. If you click on the View Details action and scroll down to the Version History, then you will see that the history has been updated, as shown in the following screenshot:

Checking in the working copy

Undo Check Out to unlock a document

Now that you are able to use the library services, you might still have questions, such as, how long does a file remain checked-out? Can we see who checked it out and when? And who can cancel the lock?

A document remains in the checked out state (locked), until either the working copy is checked in or somebody cancels the checked out status from the working copy. To cancel a check out, locate the Working Copy of the document, and click on the Cancel File Editing button, as shown in the following screenshot:

Undo Check Out to unlock a document

This action will delete the working copy and release the lock, as if the Check Out had not taken place.

The owner of the document, or a coordinator, or an administrator can unlock the document by executing the Cancel File Editing action on the Working Copy. Other users, who have read access to the space, can still see the Working Copy of the document but they can never edit or check in the document. The possible actions on a Working Copy by other users are shown in the following screenshot:

Undo Check Out to unlock a document

You can enable auditing in the Alfresco repository, and display the audit trail information, such as who locked the content and when. More information about auditing is covered in Chapter 14.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset