I got a requirement to retrieve the document object id(content engine doc id) from the workitem retrieved from process engine. And we obtain the document id we need to extract the corresponding document from content engine. I have created PE session and retrieved the workobject by using queuequery. I dont know how to proceed further.Is there any api code available for this?
How can i retrieve the document object id from the workitem
759 Views Asked by Salman At
3
There are 3 best solutions below
0
On
Use the below method to get doc id from version series id from vwattachment.
VersionSeries versionSeries = (VersionSeries)objectStore.getObject("VERSIONSERIES", "versionseriesid");
Property pp= versionSeries.fetchProperty("CurrentVersion", null);
System.out.println(pp.getIdValue());
Document doc = Factory.Document.fetchInstance(objectStore, pp.getIdValue(),null );
System.out.println("document is "+doc.get_Name());
I'm not 100% sure exactly what you're asking, but WorkItems do not have Document Ids. A WorkItem's unique identifier is a "WorkObjectNumber". To retrieve that, you can execute
If you are looking to retrieve the document Id of the attachment for a WorkItem, that is different. And you can retrieve that with the following