CMS platforms seem to be a dime a dozen these days. Plone, Drupal, Joomla, SharePoint…the list goes on and on. I’ve used many of these tools over the past four or five years. I’ve always though Plone was the best tool (except for that wacky database), but Drupal is also a favorite of mine and the one I use the most these days. However there is one area these tools typically fall short on: document versioning, rendering, and workflow control. This is the bread and butter of collaboration in most company settings. Despite all the hoopla around wikis and blogs, if the system is not adept at the aforementioned tasks then it simply will not be accepted by most corporate users.
Alfresco offers a good mix of capabilities – it is an open source CMS system with a focus on document management and traditional WCM (web content management). Check out the tool at alfresco.com for more details. It has been around for a few years now and has established itself firmly as a major player in the space. Recently version 3 was released with sweeping new capabilities, including their first move into the “web 2.0” space. I’ll talk about installing Alfresco 3 on WinXP with Derby and Oracle 11g and then show how some of the advanced features can be installed and used.
To get started there are a number of installers on the Alfresco site. Pick the one you want – I’d recommend for a first try that you grab the all inclusive installer. After you goof around a bit with that one you can try the others if you want an alfresco instance running inside an app server of your choice or with a different database from Derby or MySQL. I’m installing this on my trusty T61p Win XP Pro laptop.
I ran the installer and took pretty much all the defaults. I even used Derby even tho I have MySQL installed. Everything went ok with the installer. Afterwords what you’ll get is a set of Start Menu entries for starting and stopping the server. When I attempted to start the server I saw a few command windows flashing around but nothing happened. Strange – this should have been easy. I installed alfresco in c:alfresco so if you look in that directory you’ll see a bunch of batch files that are doing all the work. To troubleshoot the issue I removed all the “echo off” commands and tried starting up the server from a command line like this:
c:alfrescoalfresco.bat start > start.txt
That will give you some output – try re-directing output to various files. In the end my problem was in alfresco.bat’s JAVA_OPTS. It had a -server argument. I’m not sure what that option does (looking for a specific JDK or something perhaps?), but as soon as I deleted it all was well and my server would start up as I expected.
So here’s what you get after you login (admin/admin is the default):
Well – not too fancy. It is similar to most traditional document management solutions. A folder-ish (spaces in alfresco lingo) and file metaphor that will be familiar for everyone. I’m not going to spend much time on Alfresco basics – check their site for that.
The shot below is the alfresco “web 2” alternate interface called “share”. I’m not sure why everyone has reduced “web 2.0” to be dynamic publishing of crap, but there it is.
One of Alfresco’s strengths is all the different options for access. There are also CIFS, NFS, and WebDAV interfaces. WebDAV works OOB but the other interfaces require a bit of work. On Windows you can setup a drive easily using the Network Places wizard and using a url with a format like this:
The webDAV functions work nicely and are great for moving content quickly into the reository, but there are some issues to think about. You can’t add properties or comments or specify version numbers and things like that. The files mirror what you see as files and folders. Drag and drop performs reasonably well – although doing this over a WAN connection can be painful. At home this is a great way to mass publish pictures from your camera to a central server. Throughput across my home WiFi is fantastic even with the Derby database.
Now that the basics of Alfresco are up and running the next thing I would like to do is convert the database over to an Oracle back-end. Sounds like fun? Er well…how about a challenge? Yeah – that’s about right. If you are new to Oracle you can check out my post on Oracle 11g.
I’m going to be using Oracle 11g for this. The first thing to do is check out the alfresco wiki page on database configuration. This is a good start, but if you go to the directories they talk about there’s something missing…all the files they are talking about. So what you need to do is go back to the download page and scroll down to Alfresco SDK and APIs section and grab the sample extension files. Copy these into the directory called out in the wiki page. It’s also a good idea to read about how the configuration pages work.
I grabbed the files and followed the directions on the wiki page. In addition to what that page says I also turned on schema updates and just un-rem’d the hibernate dialect setting. In theory what should happen is that you change over these settings and restart the app server and Alfresco should install the schema for you. When I started up jboss I received a slew of hibernate errors. The schema looks like it was created correctly, however I cannot startup the alfresco application. Looks like this is going to be a pain – I posted a thread to the alfresco forums, but got no response. I’m guessing there is something funky with the hibernate dialect and/or mappings that Alfresco is using with 11g…I’d rather move on and start learning about application development and the web studio stuff so I’m dropping back to MySQL.
UPDATE: I got a report from a colleague that tried this with the latest 3 stable build and he reported that Oracle worked with no hibernate errors. I’ll try to confirm this later and update my post.
The tool is fairly interesting, but it is a beta and has some glitches. For example once you are logged in and editing a site it does not seem possible to switch to a different site. The menu item does nothing when you click on it (I’m using FF3.1b2)…I resolved this by just going back to the base url a few times. If you create a blank site and associate a template, the template will not render properly until you go into the pages and and go in and out of editing mode. While we’re talking about glitches…the little toolar they have to go in and out of editing mode is cool at first, but quickly becomes annoying because it is floating on top of the slider panels.
WS looks like an intersting project, but it is a beta and there aren’t enough docs on it yet to really know how useful it will truly be. This is something to keep track of and see what they come up with, but for now I think I need to look at the WCM stack for a set of tools that can manage and publish a static website.
Alfresco is an enterprise class document management platform, right? Of course no tool that claimed such a lofty thing would not include a robust and flexible workflow tool with lots of examples and documentation on how to use the workflow capability – including of course a set of pre-built commonly required work flows.
Well..I guess they have some of the above and maybe not so much of some it. I’ve been starting to explore the workflow component for doing a few things that we need, such as:
- Routing a document to a pool of users for feedback – including locking the document during editing; with a final notification to the owner that everyone has done their bit.
- Multi-stage reviews in a chain (marketing-regulatory-legal-owner) review cycles that include interations.
When you start looking at the workflow it takes all of 10 seconds to realize that there are only a couple of samples installed and these are so basic they are practically useless. Wonderful! Oh well – so its on the documentation (since I remember in a past life Mr. Cornelissen going on and on about how great and easy the work flow stuff was).
There’s not much documentation in the basic install, but I’ve pieced together a bunch of places to look.
What is the Workflow tool?
What do I need to get started?
The first thing you need is an Alfresco instance that you can destroy without any worry. I installed everything on my laptop for this purpose. I keep my entire alfresco tree (including the database) on a USB stick as snapshots for recovery purposes.
The next thing you need is the designer tools from JBoss. jPDL is the designer and process language; jBPM is the server and runtime engine. I suggest just grabbing the entire jBoss Tools package for Eclipse 3.4 and using that. Then you will need a copy of the jBPM runtime. You really only need this for design time purposes when creating projects and stuff. The project wizards want to know where your runtime is and they do not seem to recognize the runtime that is in the alfresco lib directory.
Where can I learn?
So this will not be completely pain free. Alfresco is a fairly complex system. I would start with learning the basics of the alfresco content model system and dictionary system. It is fairly similar to other things like plone, drupal, and joomla. After getting thru that then I would start looking at jBPM all by itself and get a handle on the designer tool. There’s a user guide fromJBoss and a lot of tutorials on the internet:
- JBoss jPDL jBPM User Guide
- JBoss jBPM Tutorial 1
- Alfresco Workflow Wiki Head
- Designing Workflows with jPDL and Alfresco
The designer tool is pretty nice. I started with that and then the Alfresco work flow documentation makes more sense.
Things to Know about the Designer Tool:
- Swimlanes are important – you can use them to control the actor in alfresco that is supposed to complete a step. There is no swimlanes GUI concept, you need to manually deit the XML to include them. The tutorial above shows the code, but does not mention this deal about how to actually create them.
- Tasks and nodes are steps in your workflow. A task is meant for an actor based action. A node is meant for a programmatic action handler.
Right now I’m at the point of trying to deploy workflows from eclipse to alfresco directly. I’ll post an update in a second post when I have that working. Then I will try writing some custom action handlers and also try a workflow pool and see if that works.
That’s a pretty long winded and rambling post on Alfresco…so what’s a conclusion? Alfresco has a lot to offer, but like any making any good pasta you have to roll your own a bit and you need some basic cooking skills to make a really fine dinner. If you don’t have the time for all this “cooking” then I would look elsewhere, perhaps to Plone since this has a lot of similar capabilities. Drupal and Joomla are not really the same kind of tool.