Background
Today we have had some discussions on the overall project architecture. Basically we would like to make documents in the Alfresco repository available from SugarCRM. This is easy with the webscript toolbox provided by Alfresco out-of-the-box. What is more intriguing is how to identify a specific document as belonging to a specific object in SugarCRM. With “object” I mean things like “an account”, “a lead” or “a project” in Sugar-lingo. One document might be referenced from multiple objects in SugarCRM.
In SugarCRM the new functionality is contained within a module, referred to as “documents”. From within the documents module itself it should be possible to search (using Alfrescos search engine). All other functionality that the documents module provides is available from the documents sub-panel in other modules.
To communicate with the Alfresco repository, SugarCRM will use the CMIS webscript API. Communication from Alfresco to Sugar (yes, it will be there primarily to fetch metadata about Sugar modules) SOAP based web services are used.
Share and the repository will use webscripts to present SugarCRM data in Share. Typically we imagine listing the current users projects in SugarCRM and referenced documents. There will be not direct communication between Share and SugarCRM, Share will instead use services (webscripts) in Alfresco that might look-up information in SugarCRM if necessary.
A last point is authentication. This is not the primary goal to solve in this project but a very “nice-to-have” feature.

System integration
Hard vs weak references
The first consideration is whether SugarCRM needs hard references to document nodes in Alfresco. This implies that an account-object has a table keeping id-references to the documents. These ids are later used to look-up information about the document; name, version, url etc. The module-framework in SugarCRM would probably favor this option because it makes some assumption about the “child” objects (aka documents) in a module.
- Hard referenced documents from SugarCRM
With weak references on the other hand SugarCRM would have no connection to the documents inside Alfresco. Instead each document will be tagged with the objects it are referred by. When SugarCRM needs to list documents for an object it simply asks Alfresco for “all objects with this tag”. In this way the systems are much more loose-coupled.
Whats next?
Tomorrow we hope to actually write some code
Maybe listing documents in Alfresco from SugarCRM.
