Implementing Document Management in Alfresco 3- part2

Exclusive offer: get 50% off this eBook here
Alfresco 3 Enterprise Content Management Implementation

Alfresco 3 Enterprise Content Management Implementation — Save 50%

How to customize, use, and administer this powerful, Open Source Java-based Enterprise CMS

$35.99    $18.00
by Munwar Shariff | July 2009 | Content Management Open Source

In this article by Munwar Shariff, we will learn how to use Alfresco as a smart document repository. This will include providing automatic version tracking and control, and accessing documents in the Alfresco repository from your web browser, a network drive, FTP, or WebDAV.

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

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 next screenshot 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.
  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.
  4. Globally: Alfresco can be configured globally to enable versioning for all content throughout the site.

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.

Implementing Document Management in Alfresco 3- part2

At the time of writing this article (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.

Alfresco 3 Enterprise Content Management Implementation How to customize, use, and administer this powerful, Open Source Java-based Enterprise CMS
Published: June 2009
eBook Price: $35.99
Book Price: $59.99
See more
Select your format and quantity:

Checking out documents

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

Implementing Document Management in Alfresco 3- part2

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.

Implementing Document Management in Alfresco 3- part2

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.

Implementing Document Management in Alfresco 3- part2

Checking in the working copy

Update the Working Copy of the Alfresco_CIGNEX (Working Copy).doc file.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:

Implementing Document Management in Alfresco 3- part2

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.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:

Implementing Document Management in Alfresco 3- part2

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:

Implementing Document Management in Alfresco 3- part2

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:

Implementing Document Management in Alfresco 3- part2

You can enable auditing in the Alfresco repository, and display the audit trail information, such as who locked the content and when.

Categorizing content

Categorization allows information to be classified in a number of ways. Various technologies use various terminologies such as hierarchies, taxonomies and ontology for the same concept.

In Alfresco, all of the content can be linked to one or more categories. Categories are defined and managed by administrators only. Categories can have sub-categories, and there is no limitation on the number of categories that can be defined, or depth of the hierarchy. Categorization aids in searching, and the advanced search form in Alfresco allows you to search for content based on categories.

Managing categories

Carry out the following steps to create two new categories called Technology and Products for your sample application:

  1. In any space, click on the Administration Console icon in the top tool bar. The Administration Console pane is displayed.
  2. Click on the Category Management link. The Category Management pane is displayed, as shown in the following screenshot. Notice the existing categories, such as, Software Document Classification, Regions, and Languages.
  3. Implementing Document Management in Alfresco 3- part2

  4. In the header, click on the Create | Add Category link to create a new category.
  5. As an example, create a new category called Open-Source Products. Under that new category, create a few sub-categories, such as Alfresco and Plone.

You can add additional categories and sub-categories, and can edit the existing categories.

Alfresco 3 Enterprise Content Management Implementation How to customize, use, and administer this powerful, Open Source Java-based Enterprise CMS
Published: June 2009
eBook Price: $35.99
Book Price: $59.99
See more
Select your format and quantity:

Adding categories to content

In order to categorize content, you need to have one of the administrator, editor, collaborator, or coordinator roles, on that content.

To enable categorization for an individual content item (say Alfresco_CIGNEX.doc), go to the View Details page, and then click on the Allow Categorization link. Click on the Change Category icon, as shown in the following screenshot, to apply categorization to the content.

Implementing Document Management in Alfresco 3- part2

You will see the Modify categories dialog, as shown in the following screenshot. Apply two different categories to the content. Click on the OK button to confirm the assignment. You will see that these two categories are assigned to your document, in the View Details page.

Implementing Document Management in Alfresco 3- part2

Search content by category

Categorization helps to narrow down a search, or filters the search results.We will search for marketing documents containing the text Content, and categorized under Open Source Products | Alfresco.

Click on the Advanced Search link from the drop-down list of the search menu.From the form options, click on the Show me results in the categories pane. Click on the Click here to select a category link. Select the Open Source Products | Alfresco category, and provide this text to search for in the Look For text box. Then, click on the Search button.

Managing multilingual content

You can make content multilingual by selecting the Make Multilingual action, as shown in the following screenshot. You need to select the base language (Pivot Translation) and, optionally, add other translations.

Implementing Document Management in Alfresco 3- part2

Once multilingual support has been added to a file, you will see the following window in the view details page. You can change the properties, such as Pivot Translation, by clicking on the Edit button, as shown in the following screenshot:

Implementing Document Management in Alfresco 3- part2

You can add translations, with or without a file. In either case, a new content object will be created in the selected language. Clicking on the Add Translation link will open up a dialog box, enabling you to upload a file with the selected language translation, as shown in the following screenshot:

Implementing Document Management in Alfresco 3- part2

Versions of Multilingual Content

At the time of writing this article, Alfresco's multilingual support is very basic. It is equivalent to associating—and thus, grouping—the documents. All of the latest versions of the documents are associated as one logical document group, as shown in the following screenshot. The latest version of the English document could be 1.0. The German translated version could be 1.1, whereas the Japanese version could be 2.0.

Implementing Document Management in Alfresco 3- part2

Multilingual files are related to each other, and for all other purposes they are treated as separate files within Alfresco. They can have different versions, different metadata, different categorization, and different workflow processes. All of these translated files will show up in the Search result, if they match the search criteria.

Deleting Multilingual Content

You can't delete the base file if it has translated files available for it. In our example (as shown in the following screenshot), the content, with the base language set in English (with the icon EN), has two translations available: German (with the icon DE) and Japanese (with the icon JA). You will see that you cannot delete the base English version. However, you can delete the translated versions. If a particular content does not have translated content, then it can be deleted.

Implementing Document Management in Alfresco 3- part2

Using network drives to manage content

Out of the box installation includes a web client, that you can use to connect to the Alfresco repository through a web-based application. In addition to a web client, Alfresco supports various client applications for accessing the repository content using protocols such as FTP, WebDAV, and CIFS.

CIFS

CIFS is an enhanced version of Microsoft's Server Message Block (SMB). It is the standard way for computer users to share files across the intranet and Internet. CIFS enables collaboration on the Internet by defining a remote file-access protocol that is compatible with the way that applications already share data on local disks and network file servers.

CIFS supports the usual set of file operations, such as open, close, read, write, and seek. CIFS also supports the locking and unlocking of files and records. CIFS allows multiple clients to access and update the same file, while preventing conflicts by providing file sharing and file locking. CIFS servers support both anonymous transfers and secure, authenticated access to named files.

CIFS helps you to map the Alfresco space to your local file system folder, thus giving you the flexibility of working with files in the repository, as though they are in your local file system. You will be able to bulk upload files to the server and edit them directly by using your desktop applications.

Mapping the drive

As an example, you will now map one of your spaces, say Intranet | Marketing Communications, as your local folder.

Implementing Document Management in Alfresco 3- part2

To map a space as a network drive in Windows Explorer, follow the steps given below:

  1. In Windows Explorer, click on the Tools | Map Network Drive link. The Map Network Drive dialog is displayed, as shown in the preceding screenshot.
  2. Select an unused drive letter (say, M for the Marketing Communications space).
  3. In the Folder text box, type AlfrescoServerNameAAlfrescoIntranetMarketing Communications. Please note that you have to append a capital letter A at the end of your machine name. The syntax is: YourMachineNameAalfrescoYourSpaceName.
  4. Click on the Finish button. Because the space is secured, the system will prompt you for authentication.
  5. Type in your Alfresco username and password when prompted.

Another easy way of mapping your space as a network folder in your local file system is by using a web client. Go to the space and click on the Open Network Folder icon, as shown in the following screenshot:

Implementing Document Management in Alfresco 3- part2

Once a space is mapped as a network folder, you can browse the space as if it is a local folder. The following screenshot illustrates that you could browse your Alfresco content on your local file system, and the server name is YourMachineNameA, as shown in the following screenshot:

Implementing Document Management in Alfresco 3- part2

Drag-and-drop documents in Alfresco through CIFS

Once a space has been mapped as a network drive, you can drag-and-drop files from your local hard disk onto the Alfresco server. Similarly, you can copy files from the Alfresco server to your local hard disk.

For example, drag-and-drop an image file from your hard disk into your Intranet > Marketing Communications > Switch to open source ECM > 02_Drafts space.

People belonging to a department can map their department-specific space, and can transfer files from their local file system to this space.

As an administrator, you can map the root space (Intranet) to your local drive, and bulk transfer documents between the server and the local machine.

Check Out and Check In documents in CIFS

Carry out the following steps, to try the Check Out and Check In functions for a document in CIFS:

  1. In Windows Explorer, locate the 02_Drafts folder, and drag-and-drop the Alfresco_CIGNEX.doc file (or any other file) onto the __CheckInOut.exe file, in order to check out the file.
  2. A working copy of the document is made, and the original document is locked, as shown in the following screenshot.
  3. Implementing Document Management in Alfresco 3- part2

  4. Make your changes to the working copy by directly editing it, using your favorite editor.
  5. Click on the __Alfresco icon (as shown in the preceding screenshot), given in CIFS, in order to open the web client interface directly from your CIFS folder. You can verify that the file has been checked out in the web client interface as well. You will notice that changes made to the Alfresco repository through the CIFS interface are also visible in the web client user interface.
  6. Once again, drag-and-drop the working copy onto __CheckInOut.exe, in order to check in the file. You will see that the working copy file is checked in and deleted. The original file is updated and unlocked.

If auto versioning is enabled on the document, then you will also notice that the changes made to the document are versioned. This is a great advantage for content authors, as they can edit the documents in their local file system using their choice of editors, as well as maintain various versions in the Alfresco repository automatically.

The sample works fine with Windows Internet Explorer and other web browsers, which already contain the CIFS plugin. If you are using an older version of Firefox or any web browser that does not contain the CIFS plugin, then you need to install the plugin to take advantage of this feature.

For the Firefox (or Mozilla) browser, a plugin is available on the sourceforge.net site. To install the Firefox extension, carry out the following steps:

  1. Browse to the URL: http://sourceforge.net/projects/alfresco
  2. Click on the green box named Download
  3. Scroll down to the Firefox extension, and click on the Download link
  4. Click on the link alfrescoext-0.9.xpi
  5. In the list of download sites, click on the Download link for the site nearest to you
  6. Allow permission to install the extension

File Transfer Protocol

FTP is useful for transferring files from your local file system to the remote server. By using any FTP client, you can connect to the Alfresco server, as if it were an FTP site, and you can upload to and retrieve files from it.

If you are connecting to a space, then all of the space's rules are applied and all of the space's permissions are enforced. If versioning is enabled, then content will be versioned, regardless of how it is updated.

Issue the following commands via the DOS command prompt to use FTP, to upload a file from a local hard disk to your Intranet > Marketing Communications > Switch to open source ECM > 02_Drafts space.

> ftp localhost
Login as: admin/admin
> ls
> cd Alfresco
> ls
> cd Intranet
> ls
> cd Marketing*
> cd Switch*
> cd 02_Drafts
> put c:press2A.txt
> ls

Verify that the text file is now present in the Alfresco repository. Similarly, you can use any FTP client application to connect to the Alfresco repository and access files.

WebDAV

WebDAV is primarily designed to be used for editing and managing files on remote Web servers in a structured way. For example, an application such as Adobe Photoshop can directly open a file in the Alfresco Content Repository and edit it. This gives you the flexibility of using your own favorite editor to edit content on the Alfresco server.

If you are connecting to a space, then all of the space's rules are applied and all of the space's permissions are enforced. If versioning is enabled, then content will be versioned, regardless of how it is updated.

If you have a WebDAV client, then you can access the Alfresco server by using the URL, http://localhost:8080/alfresco/webdav/.

Windows explorer can be used as a WebDAV enabled file mount, by accessing the URL, as shown in the following screenshot:

Implementing Document Management in Alfresco 3- part2

Summary

We have learnt how to customize Alfresco's features, such as library services, and security, in order to implement your enterprise document management requirements. We also saw how various interfaces such as web client, CIFS, FTP, and WebDAV can be used to manage the content in the Alfresco repository.

If you have read this article you may be interested to view :

About the Author :


Munwar Shariff

Munwar Shariff, as a co-founder and Chief Technology Officer at CIGNEX Datamatics, brings over 20 years of industry experience and proven technical leadership. He oversees the enterprise architecture solution team and provides strategic planning to achieve business goals by identifying and prioritizing technology-based services and solutions. Defining initiatives and setting timetables for the evaluation, development, and deployment of pioneering technologies are his areas of expertise.

He is an entrepreneur, open source technologist, and author of the following four technical books:

  • Plone Live
  • Implementing Alfresco
  • Alfresco3 WCM
  • Alfresco3 ECM

He contributes to the open source community by journaling submissions on open source CMS, and has been a featured speaker at AIIM USA, JBoss World, DAM Conference, Plone Conference, Linux World, Gilbane, CTC, Yahoo OSCMS, Saudi Government, and CA World.

Munwar has also served on board at the Plone Foundation and is currently a board member at CIGNEX Datamatics.

Books From Packt

Microsoft Office Live Small Business: Beginner’s Guide
Microsoft Office Live Small Business: Beginner’s Guide

eZ Publish 4: Enterprise Web Sites Step-by-Step
eZ Publish 4: Enterprise Web Sites Step-by-Step

Drupal 6 Content Administration
Drupal 6 Content Administration

 

Plone 3 Theming
Plone 3 Theming

ICEfaces 1.8: Next Generation Enterprise Web Development: RAW
ICEfaces 1.8: Next Generation Enterprise Web Development: RAW

Apache Maven 2 Effective Implementations: RAW
Apache Maven 2 Effective Implementations: RAW

Flex 3 with Java
Flex 3 with Java

Pentaho Reporting 3.5 for Java Developers
Pentaho Reporting 3.5 for Java Developers

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software