Retrieving a list of requirements directly from the DOORS database

Hi everybody,

Please let me first say that I am not a DOORS user, so my knowledge is zilch. At the company I work at, we develop software products for hardware tests, and we have customers that use DOORS and we ourselves are Telelogic partners.
OK, now that I have this cleared, I'd appreciate some help with the following issue.
Recently, some of our customers asked us to interface with DOORS.
Now, if I'm not mistaken, there is the DOORS database, located for example on the machine "DoorsServer", and then there is the DOORS DXL Server, located for example on my client machine "MyMachine".
So, first things first.
Initially, we would like to be able to retrieve a list of requirements directly from the DOORS database.
I took a brief look at the documentation of DOORS (not the documentation on DXL) and found that a database has a hierarchy of items, such as projects, folders and so on. My question is if it's possible to get a list of requirements, just like the dxl server does on the client, directly from the DOORS database. And if it is possible,
can it be read by code written in C#? If not, do I need to get this list from the dxl server instead? (I did manage to send a string to it and get a string back using just sockets in C#, without the C API).

Thank you,
Abraham Shilon
SystemAdmin - Thu Feb 05 11:59:57 EST 2009

Re: Retrieving a list of requirements directly from the DOORS database
Tony_Goodman - Fri Feb 06 06:35:30 EST 2009

Forget it.
The only way to get data from doors is via a DOORS client - you cannot access the database directly.
The most efficient (and easiest) way to integrate with DOORS is to use DXL.

Re: Retrieving a list of requirements directly from the DOORS database
mcnairk - Fri Feb 06 08:27:27 EST 2009

Tony_Goodman - Fri Feb 06 06:35:30 EST 2009
Forget it.
The only way to get data from doors is via a DOORS client - you cannot access the database directly.
The most efficient (and easiest) way to integrate with DOORS is to use DXL.

I'm not quite sure what you mean by "retrieve a list of requirements directly from the DOORS database" It's possible to run DXL using a DOORS client on the the same machine as the DOORS server (this is how it is done using Citrix). Why do you need to access it "directly"; what do you plan to do with it next? Using DXL you can export data to an intermediate format such as CSV that can be used by other applications, if that is what you require.

Ken.

Re: Retrieving a list of requirements directly from the DOORS database
SystemAdmin - Sat Feb 07 05:05:19 EST 2009

mcnairk - Fri Feb 06 08:27:27 EST 2009
I'm not quite sure what you mean by "retrieve a list of requirements directly from the DOORS database" It's possible to run DXL using a DOORS client on the the same machine as the DOORS server (this is how it is done using Citrix). Why do you need to access it "directly"; what do you plan to do with it next? Using DXL you can export data to an intermediate format such as CSV that can be used by other applications, if that is what you require.

Ken.

Well, I can think of several reasons why I would want to talk directly to the database.
Firstly, the I noticed that the database is a Windows service, so it will always be running,
even when no one is logged in, and it doesn't have a GUI to be shut down accidentally.
I will always know where to find the database and not searching for running client app (dxl server) instances.
Secondly, if I communicate directly with the db, I don't need to learn dxl, c api or whatever
APIs the dxl server uses to retrieve the list of requirements himself.
My only concern in this regard is of course that the database's schema might change, forcing
me to change my code too.
I guess that the by your replies guys that the dxl server communicates with the database via a proprietary
communication channel or something like that, so it's "no soup for me" right? :)
BTW, I saw a list of integrations with DOORS. They all did the same thing? They all did their integration
via the dxl service on the client?

Re: Retrieving a list of requirements directly from the DOORS database
kbmurphy - Tue Feb 10 16:23:42 EST 2009

SystemAdmin - Sat Feb 07 05:05:19 EST 2009
Well, I can think of several reasons why I would want to talk directly to the database.
Firstly, the I noticed that the database is a Windows service, so it will always be running,
even when no one is logged in, and it doesn't have a GUI to be shut down accidentally.
I will always know where to find the database and not searching for running client app (dxl server) instances.
Secondly, if I communicate directly with the db, I don't need to learn dxl, c api or whatever
APIs the dxl server uses to retrieve the list of requirements himself.
My only concern in this regard is of course that the database's schema might change, forcing
me to change my code too.
I guess that the by your replies guys that the dxl server communicates with the database via a proprietary
communication channel or something like that, so it's "no soup for me" right? :)
BTW, I saw a list of integrations with DOORS. They all did the same thing? They all did their integration
via the dxl service on the client?

No soup for you.

Not exactly. Maybe cold soup. Very very cold.

DOORS is proprietary through and through. You can control it somewhat through COM, but you connect to a DOORS server with a DOORS client through and through.

The DXL documentation talks about something called a DXL Server. You still have to use DXL (hint, DOORS is DXL), but you can write something in C and talk to it. The manual you want is called "doors_api_manual.pdf." The documentation for this is a joke with a HORRIBLE example, but if you're as good at programming as you say you may be able to come up with something. And if you do, please share what you find--I haven't seen any good tutorials for this at all.

Re: Retrieving a list of requirements directly from the DOORS database
SystemAdmin - Sun Feb 15 07:56:54 EST 2009

kbmurphy - Tue Feb 10 16:23:42 EST 2009
No soup for you.

Not exactly. Maybe cold soup. Very very cold.

DOORS is proprietary through and through. You can control it somewhat through COM, but you connect to a DOORS server with a DOORS client through and through.

The DXL documentation talks about something called a DXL Server. You still have to use DXL (hint, DOORS is DXL), but you can write something in C and talk to it. The manual you want is called "doors_api_manual.pdf." The documentation for this is a joke with a HORRIBLE example, but if you're as good at programming as you say you may be able to come up with something. And if you do, please share what you find--I haven't seen any good tutorials for this at all.

OK, so it's not gonna be a "walk in the park".
BTW, I didn't say I was a good programmer :)
So now seriously, if the only (reasonable) way to retrieve a list
of requirements from DOORS is via dxl, is there an example or some dxl functions that
perform this? That's all I need ATM.

Thanks.

Re: Retrieving a list of requirements directly from the DOORS database
kbmurphy - Mon Feb 16 18:06:36 EST 2009

SystemAdmin - Sun Feb 15 07:56:54 EST 2009
OK, so it's not gonna be a "walk in the park".
BTW, I didn't say I was a good programmer :)
So now seriously, if the only (reasonable) way to retrieve a list
of requirements from DOORS is via dxl, is there an example or some dxl functions that
perform this? That's all I need ATM.

Thanks.

Your question is too generic.

Define a requirement. Define where you want to look (projects, modules, etc.)

Define your export format.

Think about what it is you are really wanting to do and be detailed about it. You can find DXL to open a module, create a filter, and export to a CSV file. That's not too hard....

Re: Retrieving a list of requirements directly from the DOORS database
SystemAdmin - Thu Feb 26 11:18:01 EST 2009

kbmurphy - Mon Feb 16 18:06:36 EST 2009
Your question is too generic.

Define a requirement. Define where you want to look (projects, modules, etc.)

Define your export format.

Think about what it is you are really wanting to do and be detailed about it. You can find DXL to open a module, create a filter, and export to a CSV file. That's not too hard....

Sorry for the delayed post. I was assigned on some other tasks.
OK, so to try to be more specific, I'll use the example that is provided with doors, the one called Example Data.
This sample has a project named "Sports utility vehicle 4x2" that has several folders underneath it, one of which is called Requirements, and this folder contains some other stuff too, including a module called "User Requirements". So, in order to keep things simple, lets say that I just want to get a hierarchical list of rows and columns, or as they are called in doors, objects and attributes.
So, in the end, what we want is to get a list of columns and rows (sort of like a matrix) from the User Requirements module, located under the "path"
Training/Example Data/Company Programs/Vehicle projects/Light Trucks/Prototypes/Copy of Sports utility vehicle 4x2/Requirements/User Requirements.

You mentioned earlier that I should define my export format. Is there another way to get this information without using external files? Can't doors return xml or some other hierarchical format? Perhaps using some object model?
And judging by door's docs, I think I need to use batch mode, as this is door's way I guess to not depend on open client instances. Maybe :)

I hope that it is now clearer, what I want to accomplish.

Thanks,
Abraham.

Re: Retrieving a list of requirements directly from the DOORS database
llandale - Sun Mar 01 16:35:05 EST 2009

The DOORS service runs on a Server, and it would be rediculous if the DOORS database folder hierarchy was not also on that same Server. The Service listens to a port, default 36677. There is DOORS client software that runs on user's machines, and displays the GUI and requests data from the DOORS service via configured port and server, port@server. DOORS client's won't work unless they first retrieve a floating license, from FlexLM.

When they say the database is 'hierarchical', they mean as seen in the DOORS client. The folder hierarchy is tough to navigate and things are related by their internal ID, not who they relate as seen in the GUI.

The DOORS database is proprietary, meaning its NOT SQL or anything else, and you cannot use generic DB access languages to get at it. I suppose you could embark on a 4-year project to write your own database-access-GUI program to access the DOORS database 'directly', but that really wouldn't be directly, you'd be using your massive custom program you wrote.

That's silly, just use the DOORS client. Yes, you'll need to learn and write DXL to do such things as find all the 'shall' statments in all modules under your /Project/Requirements folder, and export such objects with their relevant attributes.

> Louie

Re: Retrieving a list of requirements directly from the DOORS database
kbmurphy - Mon Mar 02 14:25:41 EST 2009

SystemAdmin - Thu Feb 26 11:18:01 EST 2009
Sorry for the delayed post. I was assigned on some other tasks.
OK, so to try to be more specific, I'll use the example that is provided with doors, the one called Example Data.
This sample has a project named "Sports utility vehicle 4x2" that has several folders underneath it, one of which is called Requirements, and this folder contains some other stuff too, including a module called "User Requirements". So, in order to keep things simple, lets say that I just want to get a hierarchical list of rows and columns, or as they are called in doors, objects and attributes.
So, in the end, what we want is to get a list of columns and rows (sort of like a matrix) from the User Requirements module, located under the "path"
Training/Example Data/Company Programs/Vehicle projects/Light Trucks/Prototypes/Copy of Sports utility vehicle 4x2/Requirements/User Requirements.

You mentioned earlier that I should define my export format. Is there another way to get this information without using external files? Can't doors return xml or some other hierarchical format? Perhaps using some object model?
And judging by door's docs, I think I need to use batch mode, as this is door's way I guess to not depend on open client instances. Maybe :)

I hope that it is now clearer, what I want to accomplish.

Thanks,
Abraham.

Here's a quick sample to print to CSV using some DXL. This is just a sample, may not work, etc. Some topics you need to research in the DXL manual include streams, modules, and objects. Note since I just hacked this together, I may have one too many quotation marks. You also have to copy and paste the output to Excel, or a text file.
//Code begin

Module m = read("/Training/Example Data/Company Programs/Vehicle projects/Light Trucks/Prototypes/Copy of Sports utility vehicle 4x2/Requirements/User Requirements", true)

Object o

for o in m do
print identifier o "," o."Object Heading" ",\"" o."Object Text" "\"\n"

close m

//Code end

Re: Retrieving a list of requirements directly from the DOORS database
fed239 - Mon Jan 18 10:55:17 EST 2010

kbmurphy - Mon Mar 02 14:25:41 EST 2009
Here's a quick sample to print to CSV using some DXL. This is just a sample, may not work, etc. Some topics you need to research in the DXL manual include streams, modules, and objects. Note since I just hacked this together, I may have one too many quotation marks. You also have to copy and paste the output to Excel, or a text file.
//Code begin

Module m = read("/Training/Example Data/Company Programs/Vehicle projects/Light Trucks/Prototypes/Copy of Sports utility vehicle 4x2/Requirements/User Requirements", true)

Object o

for o in m do
print identifier o "," o."Object Heading" ",\"" o."Object Text" "\"\n"

close m

//Code end

test

Re: Retrieving a list of requirements directly from the DOORS database
fed239 - Mon Jan 18 10:57:09 EST 2010

I faced with similar task and problems.

I am able to retrieve requirements using some DXL code I wrote. And currently I'm running this code using doors.exe in batch mode (something like doors.exe -data 36677@somesever -batch export.dxl -user User -password PSWD -W).

It's OK, but for some reason DOORS produces extra console which pops up as a new window when there is some output (either an error message or user prints from DXL code). I can avoid printing my DXL code, but if user or password is incorrect (or some error inside DXL which is generated from template) then anyway console window appears.

So I thought that possible solution is to write my own executable which would execute my DXL code. Is it possible to implement it using C API and dxlapi library? How do I connect to DOORS database from DXL code?

Any support would be useful! Thank you!

Re: Retrieving a list of requirements directly from the DOORS database
llandale - Mon Jan 18 14:58:01 EST 2010

fed239 - Mon Jan 18 10:57:09 EST 2010
I faced with similar task and problems.

I am able to retrieve requirements using some DXL code I wrote. And currently I'm running this code using doors.exe in batch mode (something like doors.exe -data 36677@somesever -batch export.dxl -user User -password PSWD -W).

It's OK, but for some reason DOORS produces extra console which pops up as a new window when there is some output (either an error message or user prints from DXL code). I can avoid printing my DXL code, but if user or password is incorrect (or some error inside DXL which is generated from template) then anyway console window appears.

So I thought that possible solution is to write my own executable which would execute my DXL code. Is it possible to implement it using C API and dxlapi library? How do I connect to DOORS database from DXL code?

Any support would be useful! Thank you!

Write your own doors.exe? Right.

I overload the standard print(string), ack(string), confirm(string) etc functions to do what I want in Batch mode, which is to return the default response and send all that to a batch-log file. Thus, that window doesn't come up.

  • Louie

Re: Retrieving a list of requirements directly from the DOORS database
fed239 - Tue Jan 19 03:02:24 EST 2010

llandale - Mon Jan 18 14:58:01 EST 2010
Write your own doors.exe? Right.

I overload the standard print(string), ack(string), confirm(string) etc functions to do what I want in Batch mode, which is to return the default response and send all that to a batch-log file. Thus, that window doesn't come up.

  • Louie

Hi Louie. Thank you for response.

Yes, i was thinking about writing something like doors.exe in batch mode.

And i guess i understand what overloading of standard functions means. I should use something like apiInstall("void print(string)", myPrint), right?

But how would correct main routine look like? I saw TDS example, but I don't exactly understand how it works. I guess tds.exe (or txl.exe as it named in documentation) is a language interpreter only. How do I make it to be able to connect to DOORS database server?

Could you be so kind to give me some tips?

Re: Retrieving a list of requirements directly from the DOORS database
llandale - Tue Jan 19 18:04:16 EST 2010

fed239 - Tue Jan 19 03:02:24 EST 2010
Hi Louie. Thank you for response.

Yes, i was thinking about writing something like doors.exe in batch mode.

And i guess i understand what overloading of standard functions means. I should use something like apiInstall("void print(string)", myPrint), right?

But how would correct main routine look like? I saw TDS example, but I don't exactly understand how it works. I guess tds.exe (or txl.exe as it named in documentation) is a language interpreter only. How do I make it to be able to connect to DOORS database server?

Could you be so kind to give me some tips?

Run this DXL:

string A()
{ return("In first A")
}
string A()
{ return("In second A")
}
print (A()) "\n"

Notice the two A functions are defined identically; same output parameter (string) and same input parameters (none).
It prints 'In second A'. That's because it was defined last.

Don't know anything about TDS or API etc. sorry.

  • Louie

Re: Retrieving a list of requirements directly from the DOORS database
Mathias Mamsch - Wed Jan 20 03:49:44 EST 2010

fed239 - Tue Jan 19 03:02:24 EST 2010
Hi Louie. Thank you for response.

Yes, i was thinking about writing something like doors.exe in batch mode.

And i guess i understand what overloading of standard functions means. I should use something like apiInstall("void print(string)", myPrint), right?

But how would correct main routine look like? I saw TDS example, but I don't exactly understand how it works. I guess tds.exe (or txl.exe as it named in documentation) is a language interpreter only. How do I make it to be able to connect to DOORS database server?

Could you be so kind to give me some tips?

The problem conntecting directly to the database server is, that most of the functionality of DOORS is built into the DOORS client (doors.exe->8MB) rather than the DOORS Server (doorsd.exe->500kb). For example if you archive and restore DOORS modules from/to the database the client (not the server) will read and preprocess the archive files and then just tell the server to store them to the database. The license mechanism is also built into the client. It is not clear which mechanisms of DOORS are built into the client (access control? the data structure on the server?) - fact is:

Without the DOORS client the database server is not usable. This problem haunts every interface developer since the only online interface to the DOORS client is the DOORS COM API. This COM API unfortunately only supports 3 functions (runFile, runString and getResults) which allow you to run DXL code and afterwards return a string. This means that every data transfer from and to DOORS has to marshal its data through these functions which is slow and annoying to program.

There is a BUT:

Telelogic/Rational have always been very aware of this design problem and tried to introduce new mechanisms to DOORS to implement web access which were not successful: They started with "DOORS NET" (i think with DOORS 7) which was a web server connecting to the DOORS DXL interface. It was not successful and they buried the DOORS NET components with DOORS Version 8 (i think). The new idea was running the DOORS client as a service (so it can be seen as the DOORS server you wish you had) and it is called "DOORS Interop" mode. I don't know of any documentation about how to use the interop mode, but it seems to enable switching the user context at runtime allowing to implement a real webserver. Finally DOORS 10 will come based on the Jazz platform which (at least I hope so) will enable you to transfer data from and to DOORS without the DOORS client. I am not sure about the details but you can find information on the rational web site.

I hope this clears up why you cannot use the DOORS server directly.

Regards, Mathias

Re: Retrieving a list of requirements directly from the DOORS database
fed239 - Wed Jan 20 04:43:19 EST 2010

Mathias Mamsch - Wed Jan 20 03:49:44 EST 2010
The problem conntecting directly to the database server is, that most of the functionality of DOORS is built into the DOORS client (doors.exe->8MB) rather than the DOORS Server (doorsd.exe->500kb). For example if you archive and restore DOORS modules from/to the database the client (not the server) will read and preprocess the archive files and then just tell the server to store them to the database. The license mechanism is also built into the client. It is not clear which mechanisms of DOORS are built into the client (access control? the data structure on the server?) - fact is:

Without the DOORS client the database server is not usable. This problem haunts every interface developer since the only online interface to the DOORS client is the DOORS COM API. This COM API unfortunately only supports 3 functions (runFile, runString and getResults) which allow you to run DXL code and afterwards return a string. This means that every data transfer from and to DOORS has to marshal its data through these functions which is slow and annoying to program.

There is a BUT:

Telelogic/Rational have always been very aware of this design problem and tried to introduce new mechanisms to DOORS to implement web access which were not successful: They started with "DOORS NET" (i think with DOORS 7) which was a web server connecting to the DOORS DXL interface. It was not successful and they buried the DOORS NET components with DOORS Version 8 (i think). The new idea was running the DOORS client as a service (so it can be seen as the DOORS server you wish you had) and it is called "DOORS Interop" mode. I don't know of any documentation about how to use the interop mode, but it seems to enable switching the user context at runtime allowing to implement a real webserver. Finally DOORS 10 will come based on the Jazz platform which (at least I hope so) will enable you to transfer data from and to DOORS without the DOORS client. I am not sure about the details but you can find information on the rational web site.

I hope this clears up why you cannot use the DOORS server directly.

Regards, Mathias

Mathias, thank you for reply!

I understand that it's impossible to connect to DOORS database server (doorsd.exe) directly without using DXL, but i thought there is a mechanism in DXL language to connect to the DOORS database server so i can write a client on DXL and execute it using dxlapi library. Probably it was false assumption :(

I prefer DOORS batch mode rather then DOORS COM API because batch mode allows to select which DOORS database server to use (-data parameter) and automatically logs in with specified user name (-user and -password parameters).

Thank you for idea with interop mode, but i haven't found any proper documentation :( so i will probably keep my current solution with batch mode.

Fedor