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

How Do I Write an RM OSLC Query to Fetch Artifacts in Module by GUID and Identifier

This question may warrant some background explanation.

We are developing an RPE report to publish our modules to Word. One of the things we'd like to be able to do is convert an exported hyperlink to a Word cross reference instead (provided that the hyperlink points to an area within the same document that is being exported. For example, if a link points to another artifact in the same module). Our first instinct for doing this was to export the URI of the artifacts. The hyperlink contains the URI that the link points to so we had hoped to be able to match up hyperlinks with artifacts in post-processing.

Unfortunately, an artifact may have more than one URI. The hyperlink points to the module-context-independent URI, but the view that we are exporting includes the Module-Context URI. As a result, the URIs don't match.

We aren't ready to give up on the idea just yet and are thinking that the next step would be to execute an RM OSLC query that will fetch a list of all artifacts within the module and return those artifact's IDs and URIs so that we can create a mapping or lookup table.

I've been trying to get the OSLC query formulated for RM, but it doesn't appear to be working. I've followed the guidelines outlined in Using OSLC capabilities in the Requirements Management application without success. I was able to successfully discover the project area's query base URL, but appending the example queries from the aforementioned article to my base URI produces an error about an unrecognized or unexpected character or something along those lines. I've done various experiments with URL encoding different characters hoping that was the issue, but haven't had any luck. I've successfully queried RTC on the CCM side using OSLC queries, but I don't seem to be able to do the same thing on the RM side.

Note that none of this would be necessary if the XML schema that we are exporting in RPE included the module-agnostic URI for the artifacts rather than the module-context-dependent URI, but we don't think we have a choice where that XML schema is concerned. We initially tried to export our modules by iterating through the module one artifact at a time and fetching the necessary report data, but doing it that way exhibits prohibitively bad performance. The report may run for hours and that's on a relatively small module. Instead, we use the "views" resource that is used in one of the built-in reports (Print Module Table or something like that). That resource doesn't seem to be documented (although I note that "views" is part of the OSLC query base).

If there is an alternative to what we are trying to do other than the direction this question has headed, we'd appreciate hearing those alternatives as well.

0 votes

Comments

Hi, Which RM Version are you using ?

We are using RM 4.0.6



One answer

Permanent link
I believe you are hitting the problem with the difference and relationship between a module artifact and a base artifact (or binding vs core). See below post for similar discussions.
https://jazz.net/forum/questions/136269/rrcrpe-how-to-get-the-uri-of-the-base-artifact-when-the-artifact-is-included-in-a-module
So now with RM 5.0, the "modules" view (I have not checked others) will produce something like below, where <rrm:about> is the URI for the module/binding artifact, and <rrm:core> is the UUID for the corresponding base/core artifact. The "views" view does not seem to have the <rrm:core> attribute though.
<rrm:contextBinding>
<rrm:about>
https://clm5:9443/rm/resources/_c078dfe18a5448528e6d2a20b41db51f
</rrm:about>

<rrm:identifier>253</rrm:identifier>
<rrm:title>The purpose of writing Use Case</rrm:title>
<rrm:format>Text</rrm:format>
<rrm:core>_d233253031154a09a9c2dd801d2291a0</rrm:core>
<rrm:moduleUrl>
https://clm5:9443/rm/resources/_473aa3611bec42939389c413388bdb46
</rrm:moduleUrl>
<rrm:parentBindingUrl>
https://clm5:9443/rm/resources/_4f20de0c838c49288d149738c55f8243
</rrm:parentBindingUrl>
<rrm:section>1.1.0-1</rrm:section>
<rrm:bookOrder>3</rrm:bookOrder>
<rrm:depth>3</rrm:depth>
<rrm:isHeading>false</rrm:isHeading>
</rrm:contextBinding>

0 votes

Comments

Donald, what if I need to go the other direction? From the base/core artifact to the module instance of the artifact?


This is the situation when exploring a DOORS Next artifact's traceability link ..Links/Link/Relation

The link provided there is to the base artifact. I need module-related information, like what the section number is for the linked artifact, which I can only access if I have the handle to the module instance of the linked artifact. 

Bob - please create a new question .

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
× 10,930
× 515
× 332
× 201

Question asked: Jun 16 '14, 10:43 a.m.

Question was seen: 7,199 times

Last updated: Sep 05 '22, 7:54 a.m.

Confirmation Cancel Confirm