Category: Content Management

Enterprise Content Management (ECM), Web Content Management (WCM), Document Management (DM). Whatever you call it this category covers market happenings and lessons learned.

cmislib extension supports Alfresco aspects

I can’t believe I didn’t know about this sooner. It completely passed me by. Patrice Collardez created an extension for cmislib that gives it the capability to work with aspects. Patrice’s version works with cmislib 0.4.1. I cloned it and made the updates necessary for it to work with cmislib 0.5.

What this means is that you can now use Python and cmislib to work with Alfresco aspects. Patrice’s extension adds “addAspect”, “removeAspect” and “getAspects” to Document and Folder objects. It also allows you to call getProperties and updateProperties on Folders and Documents even when those properties are defined in an aspect.

Check it out:

properties = {}
properties['cmis:objectTypeId'] = "D:sc:whitepaper"
properties['cmis:name'] = fileName

docText = "This is a sample " + TYPE + " document called " + NAME

doc = folder.createDocumentFromString(fileName, properties, contentString=docText, contentType="text/plain")

# Add two custom aspects and set aspect-related properties
doc.addAspect('P:sc:webable')
doc.addAspect('P:sc:productRelated')
props = {}
props['sc:isActive'] = True
props['sc:published'] = datetime.datetime(2007, 4, 1)
props['sc:product'] = 'SomePortal'
props['sc:version'] = '1.1'
doc.updateProperties(props)

Also, if you saw the webinar yesterday you know I showed some Python examples in the shell, but I then switched over to some OpenCMIS Java examples in Eclipse that I included in the custom content types tutorial. I didn’t want my fellow Pythonistas to feel neglected, so I ported those OpenCMIS examples to Python. Grab them here.

The examples assume you also have Patrice’s extension installed (my clone if you are using cmislib 0.5). If you don’t want to use Patrice’s extension for some reason, just comment out the “import cmislibalf” statement as well as the lines in the createTestDoc method that deal with aspects and aspect-defined properties. You should then be able to run the examples in straight cmislib.

If you don’t have cmislib you can install it by typing “easy_install cmislib”.

Presentations from content.gov on slideshare

Government folks might find some of these presentations from this week’s content.gov event interesting:

John Newton – Government Without Walls

Kane McLean – An Introduction to the Mil-OSS Community

Gunnar Hellekson – Open Source: A Platform for Government Innovation

Karen Stauffer – Zia Consulting and Athabasca University’s Alfresco ECM Project: A Case Study

Steve Davis –  Federalconference.com: Alfresco based Armedia Case Management Solution

Dr. David Prezant – Enterprise Content Management: New York City Fire Department

Webinar: Getting Started with CMIS

If you are brand new to CMIS or have heard about it but aren’t sure how to get started, you might want to join me in a free webinar on Thursday, January 26 at 15:00 GMT. I’m going to give a brief intro to the Content Management Interoperability Services (CMIS) standard and then I’m going to jump right in to examples that leverage Apache Chemistry OpenCMIS (Java), Apache Chemistry cmislib (Python), and Groovy (via the OpenCMIS Workbench).

UPDATED on 1/26 to fix webinar link (thanks, Alessandro). See comments for a link to webinar recording and slides.

Alfresco Tutorial: Custom actions including Share configuration

I’ve published a revision of my original Alfresco custom actions tutorial. The second edition greatly expands on the first by adding a UI action example. The original included only a rule action example. Just like the second edition of the content types tutorial, I’ve added instructions on how to configure the actions in Alfresco Share. The Alfresco Explorer steps are still there–they’ve been moved to the Appendix.

The code that accompanies the tutorial builds on the content types tutorial, so it includes the SomeCo content model and the user interface configuration needed to expose that to the Alfresco Share and Alfresco Explorer user interface.

This should be helpful to anyone who read the first edition who now wants to learn how to do the same thing using Alfresco Share, including some of the new extension points available in Alfresco 4.

Take a look and tell me what you think.

Alfresco tutorial: Custom content types including Share config and CMIS

UPDATE (2014): I’ve moved the tutorial and the source code to GitHub. The HTML version of the tutorial is here. It has been updated for Maven and AMPs.

It is hard to believe that the original version of my “Working With Custom Content Types” tutorial for Alfresco is almost five years old. That page has had over 37,000 unique visits since it was posted. It makes sense that it would be popular–creating a content model, exposing it to the user interface, and then performing CRUD functions against the repository through code are the first steps for most Alfresco development projects.

The fundamentals of content modeling haven’t changed since 2007, but since the original tutorial was posted the Alfresco Share web client has replaced Alfresco Explorer as the preferred user interface and the Content Management Interoperability Services (CMIS) API has become the first choice for writing remote code against the repository. That, combined with the influx of newcomers to the platform and a continued demand for how-to’s on the basics motivated me to revise the tutorial.

The second edition moves the Alfresco Explorer configuration to the Appendix and replaces it with steps for doing the same thing in Alfresco Share. I also moved the Java Web Services API to the Appendix and replaced that with Java examples that leverage the Apache Chemistry OpenCMIS API to create, update, query, and delete content in the repository. I’m executing the same queries as the first edition, just implemented using CMIS, so if you want to compare Lucene queries to CMIS Query Language, this is one place to do it.

I tested the document and the %

Alfresco Wiki Cleanup In Progress: Want to Help?

For someone who’s made the better part of a career about content management, my office is an abomination. Glancing around, I see a box of critical business documents sitting next to and virtually indistinguishable from a pile of papers ready to be recycled. In the closet, months (years?) of bills and other household detritus are stacked precariously atop the filing cabinet meant to organize them.

From time to time, Christy and I will get fed up and we’ll declare war on that stack of papers, spending an entire Sunday shredding and filing. Cleanup projects like this all start pretty much the same way:

  1. Create a filing system you like
  2. Make sure everything is filed
  3. Go folder by folder, pruning content, merging folders, splitting out folders, etc.

The steps are simple, but each cleanup is time-consuming. In-between cleanups it’s tough to find things, although, curiously, Christy has an uncanny knack for finding last month’s cable bill within seconds, regardless of the pile it’s been put in.

The critical breakdown in the process, of course, is that we aren’t disciplined enough to file and prune as we go. Chalk it up to laziness, time constraints, and even the poor quality of the filing cabinet and the cramped physical layout of the office closet. Whatever the reason, it’s a bit of a mess.

My office closet is almost perfectly analogous to the Alfresco Wiki:

  • There is good content in there if you know where to look.
  • There is a lot of outdated content, some of which begs the question, “Why are we saving this?”.
  • New pages get added with little thought to proper categorization.
  • Newcomers to the community are often hard-pressed to find what they are looking for because the browsability sucks.

This last point is really important. We did a Community Survey earlier in the year that had a section on the wiki. The results indicated that most people can find what they are looking for. But multiple people came up to me during DevCon and mentioned how difficult the wiki is for newcomers and even offered to help. I think the reason for this may be that experts know what they are looking for but newcomers often don’t. Experts search (or already have their favorite pages bookmarked) while newcomers need a hierarchy to browse.

I believe that, in general, we could be doing a much better job getting new developers ramped up on the platform, and the wiki is a starting point for many of them, so getting the wiki in shape (and keeping it that way) is important, even if experts can already find what they are looking for.

In short, it’s time to do a cleanup. Now, unlike my domestic situation, where the maximum possible number of people who would help with the office closet cleanup job is 4 (and that’s wildly optimistic), the Alfresco community is thousands strong. I know not everyone in our community is interested or even good at cleaning up and curating the wiki. But several have volunteered. We’re calling them Alfresco Wiki Gardeners.

The goal is not to do a one-time cleanup and then ignore it until it gets messy again. We do have to clean up what’s there, of course, but I’m hoping that, as a community-owned, community-managed asset, the Alfresco Wiki Gardeners will take ownership of the wiki and provide consistent curation over time. What we need to help make that happen is:

  • A group of people that care enough to spend time on it
  • High-level guidelines and loose direction
  • Channels for coordinating work
  • Regular attention

So here’s what we’ve done so far:

  • Formed the Alfresco Wiki Gardeners and had an initial meeting. We are using a Google Group to coordinate activities. We plan to meet online each month. We’re using chat to coordinate in-between meetings.
  • Created a Wiki Guidelines page, linked to from the Wiki main page. The document explains what the wiki is, what it should contain, some guidelines for authors, and how to get involved.
  • Categorized every category. We’ve moved from a flat list of categories to a hierarchy. The result is that we now have a pretty clean set of categories at the top level that is effectively our Table of Contents.
  • Categorized every page. This is almost done. We want every page to live in at least one bucket. Starting today, if you create a page on the wiki and you don’t categorize it, it’s going to get categorized. If it defies categorization it’s going to get deleted.
  • Drafted a set of “Special Categories”. These categories will be used to tag things like “Engineering Notes” or “Obsolete Pages” or pages that “Need to be Reviewed”.

Now we need to start cleaning up existing pages and some of the lower level categories. Obsolete content needs to be flagged, forward references to formal documentation on docs.alfresco.com need to be added. Some categories need to be combined or relocated.

I’m hoping that soon we’ll be able to identify major holes where new content is needed. I can already tell we need a ton of new content on Alfresco 4, particularly around Share Extensibility. We also need to spruce up the “Getting Started” category.

There is a lot of work to do. You can help. If you see a problem on a wiki page, log in and fix it. You don’t need to be a formal member of the Gardeners group to do that. But if you want to adopt a category or a topic area or commit to spending time regularly curating the Alfresco Wiki, you should join the Alfresco Wiki Gardeners group on Google so we can coordinate our efforts.

I hope this new team gets traction. I want to see a wiki we can be proud of instead of one we have to apologize for. Who’s with me?

Alfresco client-side JavaScript documentation

I may be late to the party on this one, but did you know that Will Abson has used JSDoc to generate documentation on Alfresco’s client-side JavaScript? It’s available for both Community and Enterprise releases on the Share Extras site on Google Code.

So if you’ve ever needed to quickly find out all of the methods available to you in Alfresco.util or Alfresco.component.Base, for example, put down that recursive grep and head over to Share Extras.

Will’s taken JSDoc and added some tweaks to make it more YUI aware. So if you’re following Alfresco’s pattern of comments in your own client-side JavaScript code, you can use the toolkit to generate doc specific to your project. Will explains how this works on his JSDoc wiki page.

Alfresco Community Pledges & other things that worked well at DevCon

I had so much fun putting on Alfresco DevCon last week in San Diego. You can read my short wrap-up on the Alfresco DevCon Blog. Claudia Saleh also provides Day 1 Re-Cap and Day 2 Re-Cap posts as well. And Claudia took a lot of great pics at the event and put them on Flickr. After London we’ll get all of the presentations from both events on SlideShare for everyone to enjoy.

We tried a lot of new things at DevCon last week. I thought I’d re-cap what worked well here:

Purposeful lunches. DevCon was two days. On Day 1, we assigned a technical topic to each lunch table and then made sure an Engineer was at each table to cover that topic. Attendees sorted themselves to the table they were interested in discussing over lunch. Some tables really worked their topic over thoroughly during lunch. Others used it as an icebreaker and then moved on to other stuff. On Day 2 we divided the tables up by geography and industry vertical. Most people I talked to liked the concept.

Engineering Office Hours. The concept is a repeat from our first DevCon, but this year we had a bulletin board with each Engineer, their bio, their picture, and a sign-up sheet. Attendees grabbed a slot, then met with their Engineer. This worked out really well. For London we’ll pre-print the time slots rather than have them be freeform.

Panel Discussion. Last year at DevCon in New York, the panel discussion was a little ad hoc. This year we put the panel discussion on the morning of the second day as a general session and that seemed to work. For London, we’re moving the panel discussion to the end of the second day so any questions that the day 2 sessions raise can be asked at that time. It should also give us a nice opportunity to recap the conference.

Alfresco Community Pledges. DevCon serves a lot of purposes. One is to energize and motivate people to get involved with the Alfresco community. I had some extra Alfresco “attitude” t-shirts so I decided to give them to people who would pledge to make some contribution to the community in the coming weeks and months. Here are some that we got via twitter.

@dev_kraig Kraig Van Houten
@Alfresco I #pledge to write one #alfresco related blog post per month

@SunilRehman Sunil Rehman
@Alfresco I #pledge to report 5 new #Alfresco 4.0 b bugs before thanksgiving

@WillWhite18 Will White
I #pledge to report at least 5 bugs in #Alfresco 4.0b before thanksgiving.

@Michaelcford Michael C Ford
@Alfresco I #pledge to answer 6 unanswered #Alfresco forum post in the next 3 weeks

@emmichie Eric Michie
I #pledge to host an #Alfresco meetup in my area twice this quarter. Salt Lake City Utah

@tenthline_ecm Tenthline
@tenthline_ecm will #pledge to host #Alfresco meetup in #Toronto twice this quarter.

@aaronaheath Aaron Heath
I #pledge to write one #Alfresco related blog post per month for the next 12 months. I will also become more active on the #Alfresco forum.

@perejnar Per Ejnar Thomsen
I #pledge to report 5 new (legitimate) #Alfresco 4.0b bugs before Thanksgiving

@dstaflund Darryl Stafflund
I #pledge to answer 6 unanswered #Alfresco forum posts in the next three Weeks.

@iancrew Ian Crew
I #pledge to write one #Alfresco related blog post per month.

@trisofer Chris Paul
@jeffpotts01 I #pledge to write one #Alfresco related blog post per month.

It was great to see these and to talk to people between sessions who said the conference was the kick in the pants they needed to get going again with their contributions.

Thanks to everyone who attended, sponsored, or spoke at DevCon San Diego. It exceeded my expectations and hopefully yours as well. I’ll report back here after London and we’ll see if these ideas were just as successful for that event.

Quick thoughts on Alfresco Mobile

A few weeks ago Alfresco released an application for iOS devices. It’s available for free right now in the Apple App Store. If you’ve ever used Zia’s FreshDocs, a mobile app that demos hitting an Alfresco repository via CMIS, you’ll recognize a good portion of the functionality–Alfresco worked with Zia to build the app and they started with FreshDocs as a base.

The app is free and runs on iPad and iPhone. You can use the app against Alfresco repositories versions 3.4 and higher for all three editions of the product (Community, Team, Enterprise).

You can use the app to browse content that lives in Alfresco, whether that content is stored in the “Company Home” part of the repository or in document libraries within Share sites. The UI is currently a single pane view but there is a multi-pane view in an upcoming release. Aside from navigating to the content you can also execute file name and full-text searches.

This is what the app currently looks like when you log in to an out-of-the-box Alfresco 4.0a install. (Click to enlarge).

The 1.0 version is mostly read-only. As you click on content in the repository it is downloaded to the device for viewing. Here is what it looks like when you open an image (one of the sample invoice images included in the 4.0a sample Share site), but obviously you can open any file your iOS device knows how to deal with. (Click to enlarge).

You can create new objects by adding images from the photo library. Or, use an app like iWork or QuickOffice to check in a document via WebDAV. In fact, you don’t need to install the app to do that if your iOS app can save to WebDAV. You can create folders and you can create comments on documents from within the app. Here’s what it looks like when you create a new object from within the app. (Click to enlarge).

There is some debate internally about how much content creation needs to be done on the iPad. Right now, our goal is not to re-create the entire Share client in the iPad app. But I do think that some creation/editing would be helpful, even in very basic use cases. For example, right now, the app cannot:

  • Edit metadata, including the folder name of a folder you just created (argh!)
  • Add tags to an object
  • Upload new versions of an object

I’ve created a thread in the new mobile sub-forum on forums.alfresco.com to discuss this topic. If you feel strongly about it one way or the other, join the discussion.

There are some other limitations that I imagine will be resolved in the upcoming releases such as the ability to search by tag and displaying additional metadata (both out-of-the-box and customer-specific content models).

Don’t get me wrong–I’m not slamming our new mobile app. I’m extremely excited about this first release and I know it is going to evolve quickly. There are lots of businesses, schools, and universities doing massive iPad rollouts right now. I really think we have an opportunity here to help add value to these rollouts by extending their Alfresco-based content to the devices in a secure way.

A lot of people I’ve talked to about the app have asked, “What about Android?” and “What about HTML5?”. In short, the answer is that we’ve only got so many resources so we decided to go native on iOS as a first cut to get something to market quickly. If you are looking for an Android client for Alfresco there are some already in the community. Check out JM Pascal’s Alfresco Content Center Android app, for example.

We’ll be making the source of our app available as open source so you can use it as the starting point for your own apps. You can get more detail on that as well as a technical deep dive at our up-and-coming DevCon. Marc Dubresson, who comes to us from Apple, owns mobile for Alfresco and he’ll be giving a talk in San Diego and London.

Book Review: Alfresco 3 Cookbook by Snig Bhaumik

I finished reading Alfresco 3 Cookbook, by Snig Bhaumik, a while ago and I’ve been remiss in getting my review posted. Disclosure: Packt sent me the book for free.

Alfresco 3 Cookbook is the latest entry in what is now a fairly voluminous catalog of Alfresco-related titles. So I was excited to read Snig’s book in the hope that there would be new information being shared, particularly on the latest 3.4 release. Unfortunately, I was a bit disappointed from that perspective–the book does not have much information you can’t find in other books. However, what I do like about the book is that the author covers each use case in very clear, step-by-step instructions. And the book makes use of informative screenshots throughout–I could tell a lot of effort went into that.

The biggest thing missing from the book, in my opinion, is the complete lack of coverage of the Share client. Share has been available since 3.0 and has been the client of choice (over the old Explorer client) for at least a year now, maybe longer, so it is time for authors to shift from Explorer to Share when covering the platform.

Leaving Share out means that some topics, which are most commonly used in Share, get left out as well, such as the Alfresco FTS syntax and “linked rule sets” to name two. But, perhaps more importantly, it means that readers who want to follow along have to use the old client even if their organization is primarily using Share. And, it means there is still no definitive guide available for those who want more technical information on how to customize Share. (As a side-note, I’ve heard one is in the works–I hope the authors of that book will delay publication until they’ve had a chance to incorporate the changes in Alfresco 4 because a lot of work has been done on Share customization in Alfresco 4).

I found a few technical mistakes with the book and I’ve discussed them with the author. Mistakes happen in every book and I normally wouldn’t call them out in a review, but two are important enough to mention here:

  • At the bottom of 271 the author is talking about the name space associated with workflow jPDL. It says, “wf is the workflow namespace defined for jBPM, thus it is pretty fixed, you would use wf namespace prefix in your process definitions,” which is incorrect. This should read, “you would NOT use wf namespace prefix in your process definitions”. The way it reads currently it sounds like the recommendation is to use “wf” as the type namespace, like “wf:someCustomType”, which you should not do.
  • On page 337 it says that Alfresco is GPL, which isn’t accurate. It’s actually LGPL v3.

Still, overall I like the book. The coverage is broad enough to hit just about everything, and deep enough to get most people pointed in the right direction. It should be a good read for those new to the platform. The first four chapters are for end-users or administrators. Topics include things like installing, creating spaces, uploading content and setting metadata, securing content, searching, and creating rules. The author then moves into more technical topics like exporting content, using the node browser, and managing users and groups. The middle of the book is a bit more developer-oriented: Customizing the Explorer client, extending the content model, writing JavaScript and web scripts, and creating and deploying workflows.

One of the last chapters in the book is on integrating Alfresco with Microsoft Office. I thought it was strange that the chapter didn’t mention how to install and configure the SharePoint Protocol module and instead chose to cover the older Office plug-ins.

Bottom-line: If you are new to the platform and are looking for step-by-step instructions for implementing a variety of use cases in Alfresco, grab a copy of Alfresco 3 Cookbook. If you are an experienced Alfresco developer looking for deeper discussions, or you need help with Alfresco Share, look elsewhere.