12-18-2009 07:04 PM
// find the appropriate record folder
var filePlan = companyhome.childByNamePath("Sites/rm/documentlibrary");
var recordFolder = filePlan.childByNamePath("Civilian Files/Case Files and Papers/Gilbert Competency Hearing");
// create document in the record folder for uploaded file
record = recordFolder.createFile(filename);
record.properties.content.write(content);
record.properties.encoding = "UTF-8";
record.properties.title = title;
record.properties.description = description;
record.save();
Now, when I create a file in the record folder, RecordsManagementServiceImpl.onFileContent(..) is called by policy and the record aspects are added. This is good. However, when I go to view the created record in the node browser, the title and description are null. I can't figure out how to set those in my script.record.addAspect("cm:versionable")
The effect of this is putting Alfresco into an infinite loop somewhere deep in its bowels. If I'm "lucky" enough to use a database that does table locking, it just bombs after a timeout period. (H2 bombs, H2 with MVCC enabled loops, PostgreSQL loops.)12-18-2009 07:19 PM
12-24-2009 02:19 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.