Archive for November, 2012

CMIS and Apache Chemistry Workbench

Wednesday, November 28th, 2012

The Apache Chemistry Workbench is a very cool tool for exploring a CMIS accessible content repository.  I really liked the Groovy console for quickly experimenting and validating code, but be careful.  One for the included sample scripts that I was modifying included this:

    OperationContext oc = session.createOperationContext();
    oc.setFilterString("cmis:objectId,cmis:contentStreamLength");
    oc.setIncludeAllowableActions(false);
    oc.setMaxItemsPerPage(10000);

The setFilterString limits the properties that are returned – I spent about an hour trying to figure out if Groovy had a bug that was preventing all the properties from coming back.

One other note – here’ s the connection string for an Alfresco CMIS  AtomPub binding that I used:

http://HOST:PORT/alfresco/service/cmis

 

Alfresco DevCon Day 0 – Various Notes

Wednesday, November 14th, 2012

I’m surprised at the the number of people who’ve mentioned using Drupal and Alfresco together using CMIS.  It seems to be a pretty popular option.  Also, I learned that Acquia released customized Drupal, Commons, for community/intranet sites that we might want to explore.

Ran into Peter Monks who wrote a very handy extension that allows you to use Groovy to dynamically test out code.  It’s a developer tool only due to security concerns, but should save developers a lot of time.  He also talked to me about the cloud APIs and future plans for extending Alfresco with “out-of-process” calls via HTTP.  The latter sounded very interesting especially for making development easier.

Also, I have to thank Daryl Quinn (?) from Alfresco for being a good sport.  At lunch, Richard and I spoke with a guy from Pearson who had an interesting question about how to use Alfresco to integrate with various existing content repositories.  I suggested he ask the guy in the Alfresco shirt sitting near us.  That was Daryl and he gave a good answer that I want to file away for future use – create the meta-data in Alfresco via a “content-less” object, storing a reference to the content in the other repository.  He said you could even index the object in Lucene/SOLR, but you’d need to write some custom code to pull it in.

Overall, it was a good day.

Alfresco DevCon – Activiti in Action

Wednesday, November 14th, 2012

Carlos Miguens gave a whirlwind tour of how to create custom workflows in Alfresco using the Activiti workflow engine.  It was a lot of material.  And it was really too much to cover in three hours, but I have the finished code and a good understanding of how it fits together from Carlos.   Overall, I should be able to create a decent Alfresco-Activiti workflow from what I learned today.

Alfresco DevCon – Application Development from the Ground Up

Wednesday, November 14th, 2012

This was a good training session from Rich McKnight that covered steps to think about when implementing a new custom project in Alfresco.  He based the discussion on something IT people have direct experience with – a client support ticketing system.   As a group we discussed the content and users of the the system, and how they would map into Alfresco from  information architecture, security/role and lifecycle/operation perspective. Rich led the discussion into different implementation options and discussed why he would choose one over another.

He also offered lots of nuggets of knowledge about Alfresco, e.g.,recommended: no more than 5000 direct descendents of a folder; consider using a ContentPolicy instead of rules/actions for global actions on content plus the ContentPolicy is transactional; consider using AttributeService to help enforce unique meta-data

The AttributeService offers a key-value mapped to the database.  It allows up-to-3 segment for the key (e.g., application-ticket-number) and one value (e.g., node ref).

And these are some development best practices, Rich offered.

  • Think deliberately about namespacing, extensions package names to prevent conflict; guidelines to prevent conflicts
  • Use AMPs (share and repo): no way to uninstall AMPS – point of time, not progression; go back in time to previous WAR; careful – AMPs change repository
  • Use Tomcat shared area for configuration type issues; AMP for application (ContentModels, WebScripts)
  • Automated build with Ant (in dev mode; no backups and force no version number)

Rich also provided some code samples for the whole support ticket system.