As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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?
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.
Context.RunScript
<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.
<param ...>expr:@{list_of_versions}</param>