Digging a canal [Updated]

This is less a post about a particular solution than it is about future work I’m excited about.

Though many of the sessions I attended at DevCon were really useful, the one that got me bouncing in my seat was the session where Jared Ottley demoed the Dropbox synchronization capabilities he’s been working on.

Why did this get me going so much[1]? Simply because I see this work, along with the social publishing capabilities in Alfresco 4, being incredibly useful to our goal in using Alfresco to create what we’re calling the “Research Hub” on our campus and as one of the “workspaces” for Project Bamboo.


At a rather simplistic, abstract level, it’s possible to look at the scholarly process as the following sequence of steps:

  1. Discover and gather information.
  2. Collaborate with others to synthesize that information and turn it into something useful (a paper, a talk, a book, etc.).
  3. Make the product of the work available to others, for use when they’re in step #1.
  4. Lather, rinse, repeat.

Around here, we commonly refer to the steps above as “Gather,” “Create,” and “Share.” Traditionally: First (gather), you go to the library and haul a stack of books back to your office. Next (create), you toil with your collaborators to write a new paper or book. Finally (share), you submit that work to a publisher. In fact, this workflow is one of the reasons that universities first came into being centuries ago. By bringing together the scholarly materials (the library) and many scholars (the colleagues and collaborators), universities enabled a much richer and more rapid development of ideas and knowledge.


In my—admittedly unoriginal—opinion, one of the coolest things about the rise of the internet is that this same workflow is now entirely possible without being in the same physical place. Essentially, if you have a decent internet connection, you can be a part of the “global university,” and it doesn’t matter if you’re in Alaska or Zimbabwe or someplace in between.

There are increasing numbers of online tools available that do really nice things in each of these steps in the academic workflow. For example:

  • Gather: The Project Bamboo Collections Interoperability team is doing some really interesting work to make it quite easy to get access to end-user-selected content from the inter-university HathiTrust repository; selected content from the Perseus Digital LIbrary; and 400-years of english texts from the Text Creation Partnership (TCP) in a very standards-compliant (using CMIS) way.
  • Create: Alfresco already does a more-than-decent job of providing an environment for people to create and collaborate around scholarly materials, and some of the upcoming enhancements such as the Google Docs integration will make this even better.
  • Share: Scholarly publishing services like the University of California’s eScholarship repository do a really nice job of making scholarly materials available. Digitial preservation repositories such as the California Digital Library’s Merritt Repository do a great job of making sure that these materials are around over the long term, for future generations of scholars.

The future

Where we still see a hole, though, is in tying this Gather-Create-Share workflow together [2], and that’s precisely why I’m so excited about what I’m seeing with Alfresco’s new integrations with Dropbox and social publishing. I think it’s pretty easy to imagine how the Dropbox synchronization capabilities might be adapted to make it really easy to import materials from places like Project Bamboo’s Collections Interoperability service. Similarly, you can see how the social publishing capabilities might be adapted to make it easy to share finished work via publishing and preservation repositories; as well as being useful in their own right to better publicize new work.

As I’m sure you can tell, I’m really eager to see where we can take this in the coming months and years. One of the cool parts is that because we, Alfresco, and Project Bamboo are all committed to open source, we’ll be able to—and will—share whatever we develop.

[1] – That is, excited to the point where I was a little bit of a blithering idiot when I talked to Paul Holmes-Higgin at the end of the session. Sorry about that, Paul!

[2] – Pulling this together is one of the major thrusts behind Project Bamboo’s Research Environments effort. We’re an active participant in this work. Alfresco, along with HUBzero, is one of the two prototype research environments that the Project Bamboo team is working with.

Update 11/16/2011: Added link to Jared Ottley’s presentation now that Alfresco has posted it.

Posted in Vision | Leave a comment


I’m back from the Alfresco DevCon in San Diego last week. One of the neatest things about DevCon is that Alfresco brings a very large chunk of their staff to attend the conference, giving us all an opportunity to meet them face-to-face. It was a particular pleasure for me to meet/see and get a chance to chat with (in no particular order):

  • Antonio Soler*
  • Dave Ward
  • Gretchen Miller
  • Jeff Potts
  • Jennie Soria*
  • John Newton
  • Jonathon Geiger
  • Mike Farman
  • Mike Hatfield
  • Paul Holmes-Higgin
  • Peter Monks
  • …and many more who I should be remembering but am not at the moment (check back for an update!)

And all that completely ignores all the great non-Alfresco folks I got to have interesting chats with, including:

  • Amy Currans
  • Bully Soares
  • Harrison Watts
  • Jim Zordani
  • Michael McCarthy
  • Ray Gauss

Lest you think that this is completely a name-dropping post (OK, it’s a bit of one), it really was a genuine pleasure to meet or see you all and learn from you. I look forward to doing it again next year.

Also a big, big thanks to Jeff Potts and all the other folks who made the conference happen! It was incredibly valuable to us.

*-It’s especially cool that Alfresco brought much of their support staff along, giving me a chance to meet the people that are SO essential to my work. In addition to attending the conference, they were holed up in a room continuing to respond to support requests. Yet again, I find myself bowing down to their awesomeness—thank you, all!

Posted in Uncategorized | Leave a comment

Bailing Hay

As you can tell from looking through the other posts on this site, we’ve made a number of customizations (cosmetic and otherwise) to our Alfresco instance.

In order to make it easier to deploy these customizations on different servers (e.g., both our dev and production tiers), we use AMP files in order to bundle up all of our customizations into one easy package that we can deploy quickly.

The Alfresco wiki page on AMP Files gives an overview of how to create an AMP file, but there are two issues with that page. First, it’s a little non-specific on how to set up the structure of the AMP file for this sort of customization use in the first place, and second, it doesn’t give much guidance on how to actually bundle everything up into an AMP file once you’re done. This post will try to address both those issues.

Continue reading

Posted in Scripts, Tweaks | 1 Comment

Taking a snapshot

I think it’s the case for many people that stuff you learn at work becomes useful at home too. Surprisingly enough, that’s turned out to be true for me as an Alfresco admin. A couple of months ago, my wife started her own business, and needed an online space to share files and collaborate with colleagues, consultants, and contractors. It of course immediately occurred to me that Alfresco CE would be the perfect solution for this, so I spent a weekend getting that set up for her.

At work, we have an pretty sophisticated infrastructure set up to easily handle live backups of our Alfresco server, but doing something equivalent for my wife’s little company was complete overkill.

So, I needed a way to back up her Alfresco instance (a pretty vanilla install of 3.4CE running on CentOS) to an FTP server. The way we do that is to shut down the Alfresco server at 2:30 each morning, back everything up to the FTP server, then start Alfresco back up again. Not surprisingly, I don’t want to be awake every morning at 2:30, so I wrote the shell script below to be executed by cron at the right time.

Continue reading

Posted in Scripts | Leave a comment

Rebuilding the fence [Updated]

We’ve noticed two things about the default Alfresco login screen that cause issues for our users:

  • It’s not particularly informative–folks that have never visited our site before often don’t know what it’s about
  • It’s essentially impossible to log in to the Share interface from a mobile device such as an iPad or iPhone

So, with the help of a couple of consultants from Cignex (thanks Sanket and Rajesh!), we’ve turned the login screen from:

Default Alfresco Login Screen


New Research Hub Login Screen

This post explains how to make this change in Alfresco EE 3.4.2, but it should give you an idea how to do it for other versions. Diff-ing the code below with the slingshot-login.ftl in your version might help point out the changes you need to make.

Update 7/14/2011: Updated this post to clean up some of the code and fix a few bugs, including making it look more like the share interface that appears once the user logs in. Also:

  • Added the include-navigation.html for the text that now appears in the blue bar.
  • Added a snippet of javascript so that people get a message that reads “To access [URL], please log in first.”whenever they land on the login page after following a link to a particular asset on the site (e.g., https://alfresco.company.com/page/site/test/dashboard).

Continue reading

Posted in Tweaks | 3 Comments

Staking a claim [Updated x2]

[Update March 2, 2012] The script below has been radically updated and simplified with thanks to Antonio Soler. This makes it much quicker and more reliable.

One of the biggest problems we had with the out-of-the-box implementation of Alfresco is that it can only assign quotas to individual users, not sites.

With thanks to several members of the Alfresco team at the last Developer’s Conference, especially Jared Ottley, I developed a workaround to essentially fake site quota functionality. In short, you use a rule to assign ownership of anything placed in a given site to the user that created that site. At that point, the storage space for an item will be debited against the site owner’s quota, not the quota of the user who uploaded it.

This has a couple of uses:

  • An individual user might use it to make sure that they own any content that is in one of their sites. For example, a professor may wish to make sure he owns anything created by his grad students in one of his Alfresco sites, so that the content remains even after the grad students graduate.
  • An Alfresco administrator may wish to use it to be able to assign a quota to a specific site on the system so that items placed in that site are debited against the site’s quota, not a user’s personal quota.

Here’s how you set up the latter example:

  1. Place the changeowner.js file (below) in Company Home/Data Dictionary/Scripts on your Alfresco instance
  2. Change the {tomcat}/webapps/share/WEB-INF/classes/alfresco/share-form-config.xml file to suppress the display of the “Owner” field, so that other users can’t arbitrarily change it and bypass the intent of this script. This is done by commenting out the <show id="cm:owner" /> line in the cm:ownable aspect section of that file. (Ideally, we’d want to have it visible, but not editable in the document details screen, but I haven’t figured out how to do that yet.)

    Update (7/8/2011): At least in EE 3.4.2, it is possible to have it visible but not editable by changing the line from <show id="cm:owner" /> to <show id="cm:owner" for-mode="view" /> instead of commenting it out.

  3. Create a new user to own the site for which you want to have a site quota, and assign the quota you want for the site to that user. I’ll refer to this user as “site-owner” below.
  4. Create the site for which you want to have a site quota (I’ll call it “demo-site”) using the site-owner user.
  5. Use the repository view to set a rule on Company Home/Sites/demo-site that will run the changeowner.js script for any item entering or created in that site, that DOES apply to subfolders, and will NOT run in the background. That’ll reassign the ownership–and quota usage–to site-owner.

Continue reading

Posted in Scripts | 1 Comment

Exploring the woods

In the past couple of months, I’ve come to realize that having a template for a script that shows how to do walks around the tree that is the Alfresco repository is a really useful thing.  So, as a first go, I wrote a simple javascript that dumped as much as it could find about a node and all the nodes below it.  It was an incredibly useful exercise.  Before I did this, I didn’t really know that (as of 3.4EE, at least):

  • Comments on a document and forum threads are really the same thing, just with different sorts of objects forming their root node.  Each comment/forum post is its own node in the repository.
  • Tags are their own separate nodes in the repository.  Each item only stores a link to the tag it’s associated with, not the actual tag text.
  • Something that appears to be as simple as a word processing document or a JPEG image can also be a container, containing preview images, comment threads, workflows, etc.

It’s also allowed me to write several subsidiary scripts, including one that allows me to dump metadata to a tab-delimited text file, suitable for importing into something like Excel.  Others take advantage of the results of a lucene search rather than a brute-force approach to find what nodes to examine. I’ll post the most basic one tonight, and some of the more interesting derivatives later.

This script simply walks the tree and follows every node  link to see what’s on the other side.  The output is quite verbose, and not formatted to be machine-readable.  As you can see, though, it is pretty easy to rework the script to select the fields you really want and format them in whatever way.

Here’s what you do with the code when you get it:

  1. Save it as a .js file
  2. Put that file within /Company Home/Data Dictionary/Scripts on your Alfresco instance
  3. Log into the Alfresco Explore interface
  4. Navigate to the node where you want to start dumping the node information.  I’d STRONGLY recommend only choosing a single fairly small site or user home to start with–the output can get pretty lengthy.
  5. Click into the details screen of that node, then click “Run Action”
  6. Choose “Execute Script” from the pop-up, and then select the .js file you uploaded.
  7. A file with your metadata in it will be dumped to your User Home folder after a few seconds.

So, on to the code:

Continue reading

Posted in Scripts | Leave a comment