Hi,
we did a bulkimport and the documents doesn't have versionable aspect set on them. Now for some of documents i have to add versions using CMIS 1.1. I am doing checkout and checkin, the checkin call with contentstream, the document is not versioned. I tried adding cm:versionable object but got unknown type error. Please advice on how to make the existing document versionable and checkin new version.
With only CMIS at hand it is not possible to just add the versionable aspect to documents in Alfresco. That aspect is part of the base domain type for documents in CMIS which is why Alfresco filters it out as an aspect via the CMIS APIs, so you cannot set it e.g. via secondaryObjectTypeIds.
The most reliable option would be to do some patching / batch processing with Alfresco means, i.e. using Repository-tier Java code or some scripts via the JavaScript Console. There you can add the aspect to all the documents that are missing it.
Thanks for the Response Axel, could you please advice what would the best and reliable option to do this on large amount of documents.
It's not a question of what I would recommend - it's a question of what you are capable of doing / familiar with. There would be no point in recommending you to use the Java-based batch processing and patching functionalities of Alfresco if you have not yet developed anything within Alfresco using Java API yet, as you would be easily overwhelmed. Also "large amount of documents" can be very variable. For me, a "large amount" is anything more than 100.000 or even a million documents.
So, with that in mind:
a) Have you ever programmed an extension to Alfresco using its Java APIs?
b) Have you ever worked with the Script API of Alfresco or the JavaScript Console addon?
c) How many documents are we talking about in general?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.