06-25-2013 07:02 PM
What needs to be done in order to avoid the following error from a operation event handler?
org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentVersion$VersionNotModifiableException: Cannot set property on a version:
My code works correctly when documents are created from the UI -- it sets additional metadata based on web service call results, similar to the external web service example on the Nuxeo blog.
However when I attempt to use cmislib's createDocument call, the VersionNotModifiableException
error is returned when Document.Save is called on the modified object.
Is there something I should be doing in my Operation, or some special property or set of properties I should be setting on the createDocument call?
06-26-2013 10:37 AM
I solved this issue by filtering the event in Nuxeo Studio to only fire when "Current document is: Mutable Document."
I guess the CMIS createDocument must fire off multiple events for document creation, one containing a live document and one containing a version? Is this expected behavior?
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.