cancel
Showing results for 
Search instead for 
Did you mean: 

How to get CMIS ObjectId using Alfresco Java API

charlie_k
Champ in-the-making
Champ in-the-making
Hello,

We are using Alfresco 5.0.d and Activiti workflows. Our application uses CMIS mostly. For workflow task list we use REST API.

When creating a workflow via Java API we need to set the CMIS ObjectId of the object associated with the workflow - is that possible?

I could not find a correct way to do these actions for Alfresco 5.0.d:
a) Java API: Convert NodeRef to CMIS ObjectId
b) Java API: Convert CMIS ObjectId to NodeRef
c) CMIS API (also Java): Convert NodeRef to CMIS ObjectId

Charlie
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Off the top of my head, I think the cmis object id is the UUID from the noderef.

charlie_k
Champ in-the-making
Champ in-the-making
Thank you for a quick answer.

So the best way would be to simply parse the noderef?

I am wondering if that won't break anything if we are working with some version of a document. When using CMIS (for versionable documents) ObjectId looks like this: <UUID>;1.0 or <UUID>;1.1 and so on..