Alfresco Java backed webscript for creating folders does not create folders -
i working on java backed webscript alfresco needs create folder structure based on path sent it. of folders have been sent may exist , may not. code i've got:
for( int = 0; < folderpathparts.length; i++){ createdfolder = serviceregistry.getfilefolderservice().searchsimple(contextfolder, folderpathparts[i]); if( createdfolder == null){ try{ fileinfo subfolderinfo = serviceregistry.getfilefolderservice().create(contextfolder, folderpathparts[i], contentmodel.type_folder); contextfolder = subfolderinfo.getnoderef(); }catch(fileexistsexception fee){ contextfolder = serviceregistry.getfilefolderservice().searchsimple(contextfolder, folderpathparts[i]); } } }
debugging script can see new node refs created, there nothing being created when go share.
i read might need use transactions since script accessed multiple threads, , have tried using retrying transaction helper have same result.
Comments
Post a Comment