Hello,
I'm trying to create a custom operation for the first time with nuxeo IDE.
This operation aims to duplicate current workspace hierarchy as a section hierarchy in the parent domain.
With provided studio operations, i managed easily to create a matching section as a workspace is created in the domain (Each of my domains have a sections root and a workspace root)...
But here i get a "transaction failed" error in the UI though what I get in the logs seems to assert my document hierarchy is somehow created.
This is how i try to create my sections hierarchy :
for(int i = nodes.size()-1; i >= 0; i --){
nodeName = nodes.get(i).get(0);
try {
logger.warn("--"+nodes.get(i).get(0)+"--"+nodes.get(i).get(1));
sectionRoot = session.getChild(ref, nodeName.trim());
} catch (ClientException e) {
sectionRoot = session.createDocumentModel(sectionRoot.getPathAsString(), nodeName.trim(), "Section");
logger.warn("--Section root Path : "+sectionRoot.getPathAsString()+"--");
sectionRoot.setPropertyValue("dc:title", nodeName);
sectionRoot = session.createDocument(sectionRoot);
}
ref = sectionRoot.getRef();
}
session.save();
return sectionRoot;
}
And here is what i get in the logs :
2013-02-18 16:40:49,235 WARN [fr.univlille2.ecm.automation.MirrorSectionHierarchy] --MirrorSectionHierarchy --under test--
2013-02-18 16:40:49,237 WARN [fr.univlille2.ecm.automation.MirrorSectionHierarchy] --First parent bound is test--
2013-02-18 16:40:49,239 WARN [fr.univlille2.ecm.automation.MirrorSectionHierarchy] --workspaceName has value : Zone de fouilles--
2013-02-18 16:40:49,244 WARN [fr.univlille2.ecm.automation.MirrorSectionHierarchy] --sectionRoot has value : Zone de publications
2013-02-18 16:40:49,245 WARN [fr.univlille2.ecm.automation.MirrorSectionHierarchy] --Commandes--Folder
2013-02-18 16:40:49,247 WARN [fr.univlille2.ecm.automation.MirrorSectionHierarchy] --Section root Path : /Université Lille 2/SI/GED - SI/Sections/Zone de fouilles/Commandes--
2013-02-18 16:40:49,253 WARN [fr.univlille2.ecm.automation.MirrorSectionHierarchy] --test--OrderedFolder
2013-02-18 16:40:49,254 WARN [fr.univlille2.ecm.automation.MirrorSectionHierarchy] --Section root Path : /Université Lille 2/SI/GED - SI/Sections/Zone de fouilles/Commandes/test--
Can someone please help me with what is missing here ?
Thanks!