AnsweredAssumed Answered

Bugfix for acp export

Question asked by graspanti on Jul 5, 2015
Latest reply on Jul 5, 2015 by graspanti

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… :D).

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 … view:pathref="cm:SubmissionSet01[1]/cm:Document01[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…

Giuseppe Raspanti