cancel
Showing results for 
Search instead for 
Did you mean: 

Bugfix for acp export

graspanti
Champ in-the-making
Champ in-the-making
Hello,

I have a bugfix for the implementation class org.alfresco.repo.exporter.ViewXMLExporter.

The patch corrects a wrong behaviour during the creation of the XPath references between associations.

The occurrence of the error is rare since it happens only under certain conditions (which my system punctually met… Smiley Very Happy).

In particular if you have a data structure with children that are saved in the system with the same name and a series of associations
in the data model, the original export routine failed to recreate the correct indexing of the XPath to use in the <view:reference … viewSmiley Tongueathref="cmSmiley FrustratedubmissionSet01[1]/cmSmiley Very Happyocument01[12]"> tag and in its children tags.
The problem arise since the paths are scanned dynamically at each new recursion through the associations and without the proper regard to the already saved elements that need to be referenced.
To correct the behaviour the patch saves the correct paths in an in memory data structure during the first recursion through the children of the acp root.

I developed the patch originally for the 3.4.e release, and subsequently ported it to the 4.0.e and 5.0.d .

The attached file is for the 5.0.d.


Since the references are searched in memory the patch also improves the execution speed of the export in the case of presence of associations.


Hope it helps someone…

Regards,
Giuseppe Raspanti
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Please consider submiting your code change to issues.alfresco.com

graspanti
Champ in-the-making
Champ in-the-making
Thanks Mrogers,
I'll do that shortly.

Regards,
Giuseppe Raspanti