Seilevel
Seilevel Home
Back to Blog Home - Requirements Defined

Thursday, October 11, 2007

Borland SDK from .NET

I spent some time this month working on a requirements modeling application based on a connection to the Borland CaliberRM database using the Caliber SDK. This was a lot of fun, since I don't usually get a chance to write a lot of code, and I wanted to share some of what I learned. I did my work using C#, but this would be applicable to any other .NET language.



Borland has provided a COM library that gives you access to the CaliberRM database. You connect to it using References, the way you would any other COM library.



Connecting to the database basically involves creating a CaliberServerFactory object, and using this to get a CaliberServer. You then log in to the CaliberServer object to get a Session object. The Session object is the heart of your connection to the database.



There's a small bug in the Session object that manifests itself when you have deleted users from CaliberRM, but those users are still listed as being in Groups. The error occurs when you try to access a Property of the Session object. When you do this, you'll get a scary looking COM error:



com.starbase.caliber.server.RemoteServerException: Unable to find the following IDs in call to getAllFromServer():\n\t[com.starbase.caliber.UserID[idNumber=3263840,objectClass=class com.starbase.caliber.User,remoteObjectType=Caliber.eObjectType@15ed659,hashCode()=3263840]]



Don't sweat this. Just go to the Framework Administrator and make sure that you don't have deleted users hanging out in groups. One of the reasons I'm blogging this is that I spent some time looking for the answer and didn't find it, but google will catch this and file it away for others who run into this!



Once you have a Session object, you can access the Projects property to get a list of Projects and get your particular Project object. From the Project object, grab a Baseline, and you have full access to the Requirements hierarchy.
Requirements Defined Newsletter Bookmark and Share

4 Comments:

Anonymous Anonymous said...

Wah! Been working with the SDK for years... and it's a nasty piece of software. You can live with it for very basic operations, but once you go broad and deep, you'll have to do some very heavy lifting and workarounds in many, many places.

10/11/2007 3:54 PM  
Blogger Anthony C. said...

This post is being discussed here: http://www.seilevel.com/messageboard/showthread.php?t=722

10/11/2007 3:57 PM  
Anonymous Anonymous said...

One more thing - you only get the correct hierarchy-# using the baseline's requirementtree object, checking the root nodes there whether you are in the correct requirement type and from there on you can dig deeper.

using the standard .requirements propery and from there on using .children will -not- give them to you back in the correct order.. but rather their sequential numbering within this particular level.. which means hierarcy != position in the .children requirements-collection...

moreover, these deleted items (users, attributes, values) will raise exceptions all over the place... they always still exist, but are either hidden or not tagged as being somewhat removed at all...

10/11/2007 3:58 PM  
Blogger Anthony C. said...

This comment is being discussed here:

http://www.seilevel.com/messageboard/showthread.php?p=3301#post3301

10/15/2007 3:57 PM  

Post a Comment

<< Home