It's all about the answers!

Ask a question

Consuming Requirement Information in IBM DOORS Next Generation


Sudhakar Kamat (826) | asked Jan 10 '15, 1:43 p.m.
edited Jan 10 '15, 1:44 p.m.
I want to read the requirements information(like description, created by etc) from IBM Doors NG tool from external client.
I am able create the requirements in IBM Doors by external oslc client.
Please let me know how to read the requirements details from doors.

Thanks in advance.

Accepted answer


permanent link
Donald Nong (14.5k614) | answered Jan 12 '15, 1:13 a.m.
It's interesting that you know how to "create" but not "read" the requirements. Most people will have the other way round. Anyway, all the information should be in this article.
https://jazz.net/library/article/1197
If you are still struggling, you need to elaborate how you have tried and how it does not work for you.
Sudhakar Kamat selected this answer as the correct answer

Comments
Sudhakar Kamat commented Jan 12 '15, 7:57 a.m.

Hello Mr Donald,

Thanks for the quick reply.

I am not able read the particular requirements from a project in DOORS. Say for example I have Project P1 in doors. It has requirements R1 and R2. Now  i want to read the requirements contents like description , attributes etc. How i can get these details.

I am able to get the details if i pass the complete URL for the requirement(http link).
Ex:https://myserver.com:9443/rm/resources/_V8bgQZffEeSBXNj_MnKquA
But i would like query the information based on requirement title.
Is there any possibilty of the same.

Thanks in Advance.


Donald Nong commented Jan 12 '15, 7:50 p.m.

Using the resource URI is the right way to get the details of an artifact. So you can actually "read" artifacts, but want to find ways to "search" and "filter" them. It is also mentioned in the article linked above, just take a closer look at the section "Using the query capabilities".


Sudhakar Kamat commented Jan 19 '15, 6:21 a.m.

Hello Mr.Donald,

As i could not follow the "Using the query capabilities" completely i tried the below method.
But still i could not get any results.
OslcQueryParameters queryParams = new OslcQueryParameters();
queryParams.setPrefix("oslc_rm=<http://open-services.net/ns/rm#>");
queryParams.setWhere("oslc_rm:implementedBy=<https://myserver.com:9443/rm/web#action=com.ibm.rdm.web.pages.showFoundationProjectDashboard&projectURI=https://myserver.com:9443/rm/process/project-areas/_CkC8Ems5EeSW6JaIEQdsVA>");
queryParams.setSelect("*");
OslcQuery query = new OslcQuery(client, queryCapability, 10, queryParams);
OslcQueryResult result = query.submit();
int resultsSize = result.getMembersUrls().length;
System.out.println("\n------------------------------\n");
System.out.println("Number of Results for SCENARIO 08 = " + resultsSize + "\n");




Sudhakar Kamat commented Jan 19 '15, 6:22 a.m. | edited Jan 19 '15, 6:24 a.m.

Sudhakar Kamat commented Jan 19 '15, 9:02 a.m. | edited Jan 19 '15, 9:03 a.m.

The below code from org/eclipse/lyo/client/oslc/samples/RRCFormSample.java looks perfect. But what "dcterms" recembels here.
queryParams = new OslcQueryParameters();
queryParams.setPrefix("dcterms=<http://purl.org/dc/terms/>");
queryParams.setWhere("dcterms:title=\"Req04\"");
query = new OslcQuery(client, queryCapability, 10, queryParams);
result = query.submit();
resultsSize = result.getMembersUrls().length;
processAsJavaObjects = false;
processPagedQueryResults(result,client, processAsJavaObjects);
System.out.println("\n------------------------------\n");
System.out.println("Number of Results for SCENARIO 03 = " + resultsSize + "\n")


Donald Nong commented Jan 19 '15, 6:07 p.m.

You need to understand all the attributes mean by studying the RDF+XML presentation when you GET the artifact resource. "dcterms" is the name space prefix for "http://purl.org/dc/terms/", defined just one line above. It's the same as "oslc_rm", which your used without knowing exactly what it was. Also, if you examine the XML presentation of a resource the contains the "implementedBy" link, you will see the the linked resource URI is in a different and basic form, whereas you incorrectly used the project dashboard  web link in that place and it would give you no result.


Sudhakar Kamat commented Jan 29 '15, 8:32 a.m.

Hello Mr.Donald,
I am able to search a particular requirement in doors by using the sample code in below link by title and id.
http://git.eclipse.org/c/lyo/org.eclipse.lyo.client.git/tree/org.eclipse.lyo.client.java.sample/src/main/java/org/eclipse/lyo/client/oslc/samples/RRCFormSample.java
I changed the url specific to my environment.
Now I could read the basic attributes related to requirement like title,desc, created and created by etc. I want read addittional attributes like Priority, Requirement Type and also some user defined attributes. I could see method getExtendedProperties() in Requirement object. Any idea about this method. Also any idea how i can fetch additional attrbutes.
Thanks in advance.


Donald Nong commented Jan 29 '15, 10:26 p.m.

Sorry I'm not familiar with Eclipse Lyo. The below article should give you an idea of the particular API (at the very bottom of the page).
https://jazz.net/library/content/articles/rrc/4.0/oslc-consumer-eclipse-lyo/

showing 5 of 8 show 3 more comments

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.