Category: Alfresco

Alfresco open source content management

Alfresco tutorial: Advanced Workflows using Activiti

In 2007, I wrote a tutorial on Alfresco’s advanced workflows which I later used as the basis for the workflow chapter in the Alfresco Developer Guide. It showed examples using jBPM and the old Alfresco Explorer web client.

Then, in April of 2011 I posted a short article comparing Alfresco workflows built with jBPM to the same workflows built with Activiti, the new advanced workflow engine embedded in Alfresco 4. The article provided a quick glimpse into the new Activiti engine aimed at those who had heard about the Alfresco-sponsored project.

Today I’m making available the 2nd edition of the advanced workflow tutorial. It combines the SomeCo whitepaper example from 2007 with a few hello world examples to show you how to use the Activiti Process Designer Eclipse plug-in and the Activiti engine to design and run the example workflows, including how to configure your workflows in the Alfresco Share web client.

The accompanying source code builds on the workflow model and associated customizations created in the 2nd editions of the custom content types and custom actions tutorials.

UPDATE 7/18/2013: Thanks to a user on #alfresco who reported a bug in the sample workflows that have a UI. None of those workflows could be started in Alfresco Community Edition 4.2.c. I have corrected the bug. So if you are using 4.2.c, please use this zip instead.

Special thanks go to Joram Barrez and Tijs Rademakers for reviewing the tutorial and providing valuable feedback. Both are on the Activiti team. In fact, Tijs has been working on an Activiti book called Activiti in Action which should be out soon, so keep an eye out for that.

Anyway, take a look and let me know what you think.

9 Things You Must Do to Have a Good Meetup

I spend a fair amount of time encouraging the formation of local community meetups around Alfresco and, when I can, attending many of these in all parts of the world. Alfresco meetups are especially fun because I get to meet people I’ve previously only known through the forums, IRC, or twitter.

I’ve started to identify characteristics of successful meetup groups. I thought I’d share them here and maybe others will add their ideas to the list.

Set an (interesting, relevant) agenda

Some meetups are staunchly anti-agenda. They exist because it is fun for people in the same or similar profession to get together to socialize. These have their place. For Alfresco meetups, however, I think it makes more sense to have a set agenda for each meeting. Sure, the agenda can have a “socializing” item on it, but I don’t think an Alfresco meetup that is based purely on socializing will last.

It’s also important that the agenda be interesting and relevant to your local community. I can’t tell you what that agenda is. You as a local community organizer should know. If you don’t, ask your attendees. Your attendees might be mostly technical. If so, you may have a code-filled agenda. Or, you might be completely non-technical so your agenda will be about end-user issues and solving business problems with Alfresco. I’ve been to some meetups that have a mix of both, so they start with a general interest topic and then split into technical and non-technical breakouts. The key is to know your group and what is going to work for them.

It shouldn’t be up to you to set the agenda for every meeting anyway. Make it a group effort. Or maybe rotate the responsibility.

Share responsibility

Speaking of that, find ways to get more people involved. A lot of these groups start out because one person is particularly passionate about a topic. That’s fine in the beginning, but look for ways to get others involved. It’s less work and it forms a stronger nucleus when others share the burden of the work that goes into consistently providing a quality meetup on a regular basis.

Provide food and drinks

It’s an easy win. A lot of times these meetings happen over lunch or dinner. Providing something to eat and drink helps people make the decision to come to your meetup when they are torn between their usual lunch spot and your meetup. Plus, pizza and beer are cheap crowd pleasers. Of course not everyone drinks beer so it’s a good idea to have something else on-hand, but you get the point.

In small groups, depending on the makeup, you might rotate refreshment duties. Or, try to get someone to sponsor your group and let them pick up the bill.

Foster connections

One of your roles as a community organizer is to act as a connector. You have a unique insight into each of your attendees’ motivation for attending the meetup so when you see two or more people that can help each other meet their goals make that introduction. The more connections you can make the more likely it is those people will return.

You might also consider setting up a channel for collaboration that can happen between meetings.

Publicize your meetup

Once you’ve set a time and a place for your meetup, you’ve got to get the word out. Many local Alfresco communities use meetup.com but there are alternatives. Regardless of where you host information about your meetup, make sure you are listed on the Local Communities wiki page.

If you are a partner and you are hosting or helping organize the meetup, contact your clients that are in the area and give them a personal invitation. You might even follow up on the day of the meetup to make sure they are coming.

If you let me know about your meetup I can help get the word out by inserting a blurb about it into Alfresco’s “Event Roundup” that goes out each month. I can also tweet about your meetup on my account and Alfresco’s.

I think sending out tweets a week prior, the day before, and the day of works pretty well.

Prohibit hard sales/recruiting pitches

If it turns out that your meetup is just an excuse to sell people your products or services, or people are descended upon by packs of rabid recruiters the minute they walk in the door, you’ll kill any chance you have of building something cool and long-term. No one wants to take time out of their personal schedule to hear a sales pitch. If you are a partner hosting the meetup, pay particular attention to this. People may walk in the door skeptical–you don’t want to confirm their fears with a hard sell.

I’m not saying you shouldn’t mention who donated the space or who paid for the sandwiches. If you want to keep getting free space and sandwiches you’ve got to do that. Just be cool about it. I think giving a sponsor two minutes to talk about what they do while everyone is grabbing a drink is reasonable.

As the meetup organizer it is your job to work with the rest of the group to establish ground rules about acceptable behavior and to swiftly (but professionally) deal with people who act outside the norms of your group.

Pick a central location

I live in Dallas, which isn’t just a city, it’s a “Metroplex”, which, roughly translated means, “No matter where you decide to have your meetup, someone’s going to drive an hour or more to get there.” That can make picking a meetup spot tough.

Especially when you are starting out, look at who’s coming and where they are coming from and try to pick a central location. You can try a different location for each meeting, but I’ve found that you will end up just getting a different set of attendees each time based on where the meeting is. There’s no easy answer. The best advice is to pick a central location, near main arteries and mass transit, make sure your start time comprehends traffic patterns at that time of the day, and make your agenda compelling enough that someone will want to make the journey.

Welcome everyone

It is important that everyone feel welcome at our meetups. This idea of inclusiveness is comprehensive. It covers everything from your relationship with Alfresco (Enterprise customer, Community user, partner, employee) to your demography (age, race, religion, sex, orientation). Everyone shares in the responsibility of fostering a welcoming atmosphere and raising the issue with the group its leaders if something is out-of-line.

Have fun!

Last, your meetup has got to be fun. We all sit in mind-numbing meetings as part of our day job. Why would we want to spend  personal time in yet another one? Part of this is about encouraging interactivity. Don’t just have presentation after presentation. Ask the attendees to share short stories about their projects or implementations. Maybe set a common goal to develop an add-on for the community and challenge another local community to do the same.

If you are organizing local community groups around Alfresco and you haven’t yet introduced yourself to me, please do so. I can also hook you into our community of community organizers, which we call Team LoCo (I stole the name from Jono Bacon). And, if you have additional thoughts on what makes a great meetup, please share them in the comments.

Tech Talk Live Lives: Join us on the 1st Wednesday of each month

They say good habits are like fine crystal: Hard to make and easily broken. We resurrected the Tech Talk Live series a few times last year and then DevCon rolled around and obliterated any hope of continuing the monthly webinar in the last quarter of 2011.

So after a brief hiatus, it is time to get it going again. We do these on the first Wednesday of each month and that means this Wednesday is the day. Our topic will be “Packaging and Deployment Best Practices” and with the panel we’ve put together it should be lively and entertaining. Joining me will be Richard McKnight, Gabriele Columbro, Jared Ottley, and Richard Esplin. We’ll be talking about the new Add-Ons directory, AMPs, Maven, and all sorts of good stuff around packaging and deploying extensions for Alfresco.

Register here. The session will be recorded, so if you miss it, you can catch up later.

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?