Integrating Alfresco WCM with Drupal

Categories:
Posted on: Mon, 2009-08-31 13:00

Recently I gave a Tech Talk on "Integrating Alfresco Web Content Manament (WCM) with Drupal".  As a follow up I have posted the presentation slides, the source code and a download package on Alfresco Forge (http://forge.alfresco.com/projects/drupal-wcm/)

This supports a use case in which Alfresco WCM is used to manage web content while Drupal is used as the presentation layer.

With the functioanlity in this demo we can support the following:

  • Content is managed in Alfresco WCM using web forms
  • Content can be reviewed on a staging server (which can be a Drupal instance) before being deployed
  • Approved content is deployed to an FSR which in turn forwards the content to a Drupal instance

Rationale and Benefits

The benefits of this is that we get the power of the Alfresco's rich workflow, content review and approval process while taking advantage of Drupal's rich presentation and online community features.

This is especially useful for organizations with large constituencies (e.g. Universities and Professional Associations) that may have both institutional and user generated content.  The institutional content (press releases, news and announcements) can be managed in Alfresco while the user generated content (user blogs, forums etc..)  can be managed in Drupal.

In this implementation the content deployed to Drupal is instantiated into the Drupal repository as Drupal nodes. By instantiating the content as proper Drupal nodes, developers can use all of the Drupal features when presenting this content (such as including them in views, including them in search, tracking access and creating presentation templates.)

Technical Details

The proof of concept achieves these results by using a callback in Alfresco’s deployment system to post the content to Drupal using XMLRPC. The Drupal module that receives this content, strips out the content and metadata from the xml and creates or updates nodes. The Drupal  module associates pathname with nid via a custom table and hook_nodeapi (pathname is the unique identifier in the AVM). By associating the unique identifiers on the Drupal and Alfresco systems, Drupal is able to keep track of the version history when content is updated.

The Drupal and Alfresco customizations are standard customizations on either side that all developers have access to.  No core code is modified in either instance.

Missing Functionality

To be clear, this is only a demo and should only be run in a closed environment (i.e. on localhost). There is quite a bit of missing functionality that would be needed to get this up to alpha quality.  The most urgent piece is the need to add some sort of authentication into the mix.  Below are a list of items that are necessary for an alpha release.

  • Support for full refresh
  • Support for delete
  • Inclusion of images in the content
  • Support for file attachments
  • Authenticating the FSR when it connects via XMLRPC to post content.

Planned Improvements

To make this production ready, we need to consider the users of these systems and make sure that non/semi-technical users can adequately use the system.  Currently all of the mappings between the Alfresco content model (the XSD) and the Drupal content model (custom or CCK based nodes) is done by hand coded functions.  There have been a number of discussions, and the most likely solution that comes to mind would be a way to take a CCK definition and generate a corresponding XSD.  This would most likely satisfy 80-90% of the potential use cases.

Looking forward at the upcoming releases of Alfresco and Drupal, we are considering Drupal 7 and Alfresco 3.2 to be the ideal releases to support a production ready implementation of this functionality. Alfresco 3.2 has some key enhancements in the area of Deployment while Drupal 7 will have some enhancements in how content types are defined.

Summary

This is a start. We have a long way to go.  I welcome any feedback from the community on this project.

-Rich