Home
Extended ECM
API, SDK, REST and Web Services
How do I find out the VolumeID?
Robert_Davies_(unlondonadmin_-_(deleted))
Ok, I am TRYING to use the Java API to add a document but I'm getting very frustrated.Because I cannot find an API to locate an object by name (e.g. "Enterprise:Project:Folder:Document") I am using an object id that I get by looking at a livelink URL for the container.So now I can call AddDocument? Not quite: What is the VolumeID? And is the NodeID the same thing as the ObjectID?Please can someone illuminate what is become a very couple of hours...Best regards/matt.
Find more posts tagged with
Comments
Arlene_Elder_(GlaxoWellAdmin_(Delete)_1421884)
Been There and done that.You can hard code some of the stuff. If it is in the enterprise workspace than the VolumeID is -2000. You can perform SQL queries to find out for sure. The Database contains OwnerID, DataId and ParentID. DataID is the NodeID and OwnerID is the Area it is in. Enterprise is -2000, Workflows are -2055, LiveReports are something else.There is no API for this, so I did eventually hard code the values after determining that they didn't change. I called OT and they said SQL was the only way to know.
Trevor_Sharpe_(trevor_(Delete)_309647)
There are two LAPI calls, AccessPersonalWS and AccessEnterpriseWS, which return an assoc which contains the VolumeID of the respective workspace. You can get that value (an integer) from ll_assocgetinteger. I believe that each project is a separate volume, and that what sets a volume ID apart from other IDs is that they are negative values. For example, the (data)ID of the Enterprise Workspace is 2000, while the (owner)VolumeID of the Enterprise Workspace is -2000.This understanding is the result of working backwards from the dtree table. Try "select * from dtree where dataid=2000" to see the OwnerID (volume), and Object id.The way I would explain it (and I may be less than 100% accurate, since I did not have anything to do with the design) is that each object in LL gets a unique ID. This is the DataID for the object. This is stored in DTREE, and may even be considered by the system as the "primary key".Most objects have a parent (typically a folder, although tasks likely get their parentID from the tasklist object ID). This is also stored in DTREE.The ownerID represents the volume that holds the parent and the children. So, a project in the Enterprise Workspace could conceivably have a parentID of 2000, a VolumeID of -2000 and a dataid of 2039 (made up). In turn, a folder inside that project would have a volume ID of -2039, a parentid of 2039 and a dataid of 3897 (again fabricated, for illustrative purposes only). A document in that folder would have a volumeID of -2039, a parentID of 3897 and a dataid of 7846.From my limited experience you'll need the parentID and the VolumeID for many LAPI functions. Realizing that this little tirade doesn't address your questions specifically, it may shed some light on the various IDs that are used, and their respective purposes.Hope I have helped in some small way.
Trevor_Sharpe_(trevor_(Delete)_309647)
Having just re-read my comment, it might be useful to add that the volumeID doesn't necessarily change all that often. The objects that have volumeIDs apprear to be the EnterpriseWS, PersonalWS, Projects, System Objects area (where the dataflow objects, slices and indices are referenced), LiveReports, and perhaps others that I can't think of or don't know about.Therefore many of folders and documents in the EnterpriseWS will derive their OwnerID from the EnterpriseWS itself (-2000). Similarly, each LiveReports stored in the LiveReports volume will have the same OwnerID, which is the LiveReports volume's volumeID.
Simone_Oettinger_(SOettinger_(Delete)_177592)
Although, as Trevor said, the volumeIDs should not change, they might, and without notice. Therefore, we highly recommend using the LAPI calls AccessPersonalWS and AccessEnterpriseWS (which return an assoc whichcontains the VolumeID of the respective workspaces), rather than hardcoding numbers such as -2000, as suggested in another posting.
Arlene_Elder_(GlaxoWellAdmin_(Delete)_1421884)
What I needed to do was return the VolumeID of an executing workflow. The template workflow resides in the Enterpride Workspace (-2000), but once you start the workflow a copy gets made of it and put into an inprocess Worflow Volume. Now, how do I find the VolumeID?The only solution I know aside from hardcoding, is to take the DataID of the created workflow, and then do a SQL statement to return OwnerID.All I am saying in that Access Personal WS or Enterprise WS doesn't give you very much, and it is an aweful pain in the **** to get more.
Arlene_Elder_(GlaxoWellAdmin_(Delete)_1421884)
SELECT OWNERID, DATAID, NAMEFROM DTREEWHERE (DATAID = - OWNERID)ORDER BY OWNERIDThe recordset returned should be self explanitory.Hope this helps
Trevor_Sharpe_(trevor_(Delete)_309647)
A quick look at the LAPI docs shows that there is a function called "ListSystemVolume". Intuitively it sounds like it is going to be the Enterprise Workspace, but may actually reference whatever volume you happen to be in (Project, LiveReports, Workflow, etc.)Not sure if this does the trick or not, as I have never used it. But on the off chance that you missed it...
eLink User
Your previous discussions mention that the volumeID for the Enterprise workspace is -2000. A quick search on our system shows that the enterprise WS is 2001. Why is this so? Are the ID's produced dynamically on installing LL and creating the tablespace/tables etc, or is it hardcoded into the system?Regards,Steve
Peter_Weiss_(pweiss_(Delete)_804472)
ID's may be different on LL-DBs migrated from elder versions (like 7.3) to 8.x versions.In LL 8.x - DBs from the scratch, the EnterpriseWS DataID is 2000.
Yaser_Jouhar
Dim lID As Long Dim lVolumeID As Long Dim lNodeType As Long Dim lSubNodeType As Long Dim tmp1 As Long Dim tmp2 As Long Dim tmp3 As Long Dim tmp4 As Long Dim lLen As Long '//* Allocating the Memory for Object Handles *//' lStatus = LL_ValueAlloc(tmp1) If (lStatus <> LL_OK) Then Call AgentLog("LL_ValueAssoc(tmp1) failed.... {" & lStatus & " = LL_ValueAlloc(tmp1)}, File {" & sRandom & "}") lStatus = LL_ValueAlloc(tmp2) If (lStatus <> LL_OK) Then Call AgentLog("LL_ValueAssoc(tmp2) failed.... {" & lStatus & " = LL_ValueAlloc(tmp2)}, File {" & sRandom & "}") lStatus = LL_ValueAlloc(tmp3) If (lStatus <> LL_OK) Then Call AgentLog("LL_ValueAssoc(tmp3) failed.... {" & lStatus & " = LL_ValueAlloc(tmp3)}, File {" & sRandom & "}") lStatus = LL_ValueAlloc(tmp4) If (lStatus <> LL_OK) Then Call AgentLog("LL_ValueAssoc(tmp4) failed.... {" & lStatus & " = LL_ValueAlloc(tmp4)}, File {" & sRandom & "}") '//* Searching for Expected Item *//' lStatus = LL_ListObjects(lSession, lVolumeID, lID, vbNullString, "Name='" & sFolderName & "'", LL_PERM_CREATENODE, tmp2) lStatus = LL_ValueGetLength(tmp2, lLen) '//* If Folder Exist *//' If lLen > 0 Then lStatus = LL_ValueGetIndexValue(tmp2, 1, tmp3) lStatus = LL_ValueGetFieldValue(tmp3, "Type", tmp4) lStatsus = LL_ValueGetInteger(tmp4, lNodeType) lStatus = LL_ValueGetFieldValue(tmp3, "SubType", tmp4) lStatsus = LL_ValueGetInteger(tmp4, lSubNodeType) '//* Object is a folder Type *//' If lNodeType = 0 And lSubNodeType = 0 Then lStatus = LL_ValueGetFieldValue(tmp3, "VolumeID", tmp4) lStatsus = LL_ValueGetInteger(tmp4, lVolumeID) lStatus = LL_ValueGetFieldValue(tmp3, "ID", tmp4) lStatus = LL_ValueGetInteger(tmp4, lID) '//* If IDs recieved *//' If (lStatus = LL_OK) Then bAddDocument = True Else '//* Item exist on the on the same space with different Item type *//' If (lStatus = LL_OK) Then bAddDocument = False End If Else '//* Folder does not exist, Create one *//' lStatus = LL_CreateObject(lSession, lVolumeID, lID, LL_VERSIONOBJECTTYPE, LL_FOLDERSUBTYPE, sFolderName, tmp3) '//* If folder created successfully *//' If (lStatus = LL_OK) Then bAddDocument = True End If If bAddDocument = True Then '//* Getting IDs *//' lStatus = LL_AssocGetInteger(tmp3, "ID", lID) lStatus = LL_AssocGetInteger(tmp3, "VolumeID", lVolumeID) '//* Adding Compound document to the folder *//' lStatus = LL_CreateObject(lSession, lVolumeID, lID, LL_VERSIONOBJECTTYPE, LL_COMPOUNDDOCUMENTSUBTYPE, sDocumentName, tmp3) Else Msgbox "Error occur in LAPI... Err.Number = " & lStatus Endif*========================*Siddique Khan - Technical ConsultantMSKhan@ITQAN.CO.AE
Eric_Slaghuis_(sasoladmin_-_(deleted))
I am not quite convinced that this code will solve the problem. I have adapted your code slightly to list all the items in a folder, and write out the objectID and the VolumeID of the found objects. The code works correctly in that it returns the correct ObjectID's, but all the VolumeID's are -2000. This can be expected, as the objects do exist on the enterprise volume. We are however looking the volumeID whereby one can address the objects inside a project.Does anyone have a suggestion?
Goldman_Opentext_KC_Generic_#1_(GOLSAC02User1_(Del
If you just use 0 as the volumeID, you'll get back objectinfo with the correct volume set. The snippetLLValue val = new LLValue();instance.GetObjectInfo(0, 2000, val);System.out.println("VolumeID = " + val.toInteger("VOLUMEID"));Will output -2000 on my systems, both 8.1.5 and 9.0.0.1. Of course this isn't documented, so take with a grain of salt.