Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Service API remove generation types from references

Status
Not open for further replies.

LivelinkHELP

Programmer
Aug 29, 2012
10
GB
Hi,

Hope someone can help with this, using the Livelink web services in C# have wrtitten a simple little program to clean up users workspaces, it's fine until it encounters a node that has a Generation, if the generation itself is deleted it retains a link in the references to this in the GUI. Yet in the code the ListReferences returns null.

I am trying to find some way via the API to delete the reference on the node to the Generation. I can delete the Generation itself but not the node until I remove the generation in the references section which I can do in the GUI, but can find no way in the API to get the Generation reference and delete it.

Heres the code to access refernces which is fine I can delete the reference ID, but it leaves a generation on the current node which I can not delete via the API (not that I have found anyway)

LivelinkDocumentManagementWS.Node[] nReferences = _docManager.ListReferences(authenticate, node.ID);

Any help please
 
Do you know oscript that you can write the webservices stub yourself. The ground rule in livelink is basically this

1)A generation is to a particular version of a object
2)You cannot delete the versions/rendition unless and until the generation that it references to is removed.
3)you cannot delete a version which is "locked"
4)You cannot purge a livelink version to have 0 versions.

many other rules exist if major/minor versioning was enabled.

The webservices layer in livelink is written with the intent that OT will provide commonly needed functions.Its framework is "easily"
extended to include missing calls/customization.
If the call is indeed not there I would either extend it or ask OT or a private vendor to write one.


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
sounds like a bug in how the code works, if you delete the generation then the reference link should also go, have you spoken to OT support who may have a fix for this ?

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Sorry no I haven't used oscript yet, it's something the company is thinking about currently as to buying the builder module, for developing extra functionality. Any idea how much that module is btw?

Okay so if I delete the generation in the GUI the reference is still there but I can on the references for this generation click the function menu and on the generation sub menu delete or restore the generation. I just cannot delete the generation link via the API only the reference which still leaves a link in the reference section of the original node. And then the following call just returns null.

LivelinkDocumentManagementWS.Node[] nReferences = _docManager.ListReferences(authenticate, node.ID);

It does seem as though the API (for web services anyway) doesn't have any information on removing the Generation link.

So it seems my only avenue is to add this functionality via oscript then?
 
I think what you are encountering is this

You are deleting a generation -No bug in Webservices api
Unknown to you the Generation moves into Recycle Bin or something you have in your org
That is why you see Restore etc.
If you call a second delete on that object it should complete what you are looking for.
Remember the first delete in livelink is actually a 'Move' into the 'Recycle Bin ' area.The object can still be found in dtree.

so do this when you do the first delete run this

select ownerid,parentid,name,subtype from dtree where dataid=<dataid in gui of the generation subtype>
Before delete capture the data
after the GUI delete capture again you will see ownerid change which means that is in another volume probably recyclebin's volume
then if you dlete or purge the object it will be gone form livelink,unless it was kept for RM reasons

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top