08-08-2012 06:45 AM
I am using nuxeo automation client API to retrieve the list of documents. Document.Query always return the latest version of the document.
How can I retrieve all or specific version of a particular document?
08-09-2012 07:30 PM
using a Context.RunScript
operation quickly comes to my mind. I'm not sure if it's "the way" but something in those lines should work to get versions of the current doc.
<operation id="Context.RunScript">
<param name="script" type="string">
versions = Document.getSession().getVersions(Document.getDoc().getRef());
Context.put("list_of_versions", versions);
</param>
</operation>
then you would access in further operations using the <param ...>expr:@{list_of_versions}</param>
syntax. There is also the getDocumentWithVersion() method on CoreSession if you know which version you want.
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.