automation : how to find a way to access real document linked to a proxy document

In nuxeo automation, I don't see a way using the api to get, from a Document published in a section (this document is a Proxy document) how to get the identifier of the associated document stored in the workspace.

Any idea to solve this problem

0 votes

2 answers

5523 views

ANSWER



You can try to use getSourceDocument:

coreSession.getSourceDocument(proxyDocument.getRef());

This way you get the original document. Once you achieve that, you can retrieve its identifier.

0 votes



doc.getVersionSeriesId() should give you that.

0 votes



Thank you for your interest to my question and your answer.

Unfortunately I think it's not workng in my context as I used the api of automation and .getVersionSeriesId() (accesible from DocumentMode)is not accessible from org.nuxeo.ecm.automation.client.model.Document instance !

any other sugestion ?

09/21/2013

Please, will the future GetLiveDocument operation available in "content automation" 5.7.1 be the solution to get the real document from a proxy document ?

If yes, I will have to wait 5.8 release to use this feature

09/22/2013

Yes GetLiveDocument will do that for you.
09/23/2013