Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get a list of modules using an RM OSLC query?

My query worked which gives me list of collections where requirement is used.But doesn't show the modules where same requiremt artifact used. Is it possible to get list of Modules as similar to Collections. Please post query if you know to fetch modules.

One Weird thing I observed is when I query for collections in a project , it lists all collections and Modules.(conclusion for me we dont have mechanism to query for modules alone  :(   )
Query:
 https://lcm.$$$$.de:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Flcm.$$$$.de%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_hYm_Qh9QEeWFK7vjMUdUyg&oslc.prefix=rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns%23>&oslc.prefix=dcterms=<http://purl.org/dc/terms/>&oslc.select=*&oslc.where=rdf:type=<http://open-services.net/ns/rm%23RequirementCollection>

But why doesnt Modules show up when I query for collections where requirement artifact used.
=> I guess answer for this is Modules uses Module artifact which are bound to base artifact where as collections use base artifact itself.

I also tried querying for Modules by replacing Base artifact URL with Module artifact URL in query, response has no list of  modules.
Is this a Kind of defect/Bug ?(Theoretically it should work similar to collections)

Is  there  a way I can get Module details from Module artifact.?(I dont see any info regarding Module where it is used)

0 votes


Accepted answer

Permanent link
Since it's a follow-up question, I converted it into a new post.

I can see similar symptoms in my own RDNG 5.0.2 environment. It's probably up to debate whether this is a defect. At least I would say it's not well implemented. The below work item will tell you there is some way to go for the OSLC API to work well with modules.
https://jazz.net/jazz03/resource/itemName/com.ibm.team.workitem.WorkItem/67748

Since both collections and modules are of type "RequirementCollection", if you use "rdf:type" as the filter, you will get both, as you have found out. Given the "Collection" and "Module" are actually artifact formats, I suggest you use "instanceShape" instead. BUT, there may be more than one "instanceShape" for the artifact format "Module" (there are at least three in my own environment, even I can see only one "Module" in the artifact format allowed value list, and I cannot explain why). It means that when you filter on only one "instanceShape", you may not get all the modules in the project area.

Apart from "instanceShape", the other filter that I can use to get a module is the ID, apparently.

If you want to get the details of a module, you'd better use the reportable REST API.
https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI
vijayakumar ramesh selected this answer as the correct answer

0 votes


One other answer

Permanent link

 If we look at the rdfs:member entries for an OSLC Query for general Requirements, we can spot the Module-type RequirementCollection instances in the result set. If we compare these to non-Module Requirements and non-Module RequirementConnections, we can pick out the effective discriminates for a more refined query that selects just Module RequirementCollections.

    <rdfs:member>
      <oslc_rm:RequirementCollection rdf:about="https://some-rm.jazz-server.com:9443/rm/resources/_prXREYXzEeeRNOGjA-yqTA">
        <dcterms:description/>
        <rt:_RzyHYXeOEeeoZrT-a32lmA rdf:resource="https://some-rm.jazz-server.com:9443/rm/types/_RmstoXeOEeeoZrT-a32lmA#9fa948cf-d978-49b4-aac8-ab7cf73c0b70"/>
        <oslc:instanceShape rdf:resource="https://some-rm.jazz-server.com:9443/rm/types/_SJB-oXeOEeeoZrT-a32lmA"/>
        <dcterms:title>LookSee RM Module Specification</dcterms:title>
        <dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2017-08-20T22:06:04.287Z</dcterms:modified>
        <dcterms:creator rdf:resource="https://some-rm.jazz-server.com:9443/jts/users/patricia"/>
        <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2017-08-20T22:05:17.878Z</dcterms:created>
        <f1:accessControl rdf:resource="https://some-rm.jazz-server.com:9443/rm/accessControl/_RLZ4wHeOEeeoZrT-a32lmA"/>
        <nav:parent rdf:resource="https://some-rm.jazz-server.com:9443/rm/folders/_RSO5gXeOEeeoZrT-a32lmA"/>
        <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">182</dcterms:identifier>
        <rmTypes:ArtifactFormat rdf:resource="https://some-rm.jazz-server.com:9443/rm/types/_RTTQgXeOEeeoZrT-a32lmA#Module"/>
        <dcterms:contributor rdf:resource="https://some-rm.jazz-server.com:9443/jts/users/patricia"/>
      </oslc_rm:RequirementCollection>
    </rdfs:member>
Here, we can see that it is the ArtifactFormat with the #Module URI that is the useful discriminate.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 144

Question asked: Aug 26 '15, 5:55 a.m.

Question was seen: 6,226 times

Last updated: Aug 20 '17, 6:54 p.m.

Confirmation Cancel Confirm