cancel
Showing results for 
Search instead for 
Did you mean: 

Document assembly aspects

bjorn_r
Champ in-the-making
Champ in-the-making
Hi,

I have developed a solution where the users can compose composite documents by choosing content items in a drag 'n’ drop UI. The selected documents are automatically converted to PDF by the JODConverter in Alfresco. The resulting PDFs are then processed by my portlet, which uses iText to create a single document with cover, TOC, etc.

In the current version, the composition data is stored in a separate database and Alfresco is only used as a content store. I would prefer to have the model in Alfresco, but I do not know how.

My thinking goes something like this:
* Create an aspect for nodes that can constitute a part.
* Create an aspect for nodes that can act as containers.
* Use a multi-value property in the aspect for the containers to handle the Many-to-Many relationship.

Am I on the right track?


Cheers,
Björn
2 REPLIES 2

bjorn_r
Champ in-the-making
Champ in-the-making
I have done some further investigation today and I will try a solution with OrderedChildren, similar to http://wiki.alfresco.com/wiki/Forums_Design

bjorn_r
Champ in-the-making
Champ in-the-making
In the POC version of the solution, the space structure shown in the AJAX UI and the space structure in Alfresco was the same. This made things simple, I just created a Freemarker template that made one of the sample web scripts produce JSON on the form I needed. As I have mentioned previously in this thread, information on how the modules were composed were handled by a separate DB.

Now the structure supports several clients, languages, WIP modules, Released modules, etc. This new structure is no longer suitable for the UI, so I created a custom secondary structure with references to the main structure. To make the extra DB redundant, I created another secondary structure with a space hierarchy describing part composition. The non-primary structures are updated, by scripts triggered by rules, when new material is released in the main structure.

I have a simple aspect that adds a releasable property which is set to true when some conditions are met. The script that handles the release process can be run on the nodes with the releasable property set to true. I also use aspects to add extra properties to the containers in the secondary structures.

Some comments on my approach would be appreciated since I have been unable to find any samples or guidelines on how to model non-trivial relations. Am I doing things the right/intended way?