It's all about the answers!

Ask a question

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

Nate Decker (37814461) | asked Jun 16 '14, 10:43 a.m.

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.

Gabriel Ruelas commented Jun 16 '14, 1:58 p.m.

Hi, Which RM Version are you using ?

Nate Decker commented Jun 16 '14, 2:17 p.m.

We are using RM 4.0.6

One answer

permanent link
Donald Nong (14.5k414) | answered Jun 16 '14, 9:34 p.m.
edited Jun 16 '14, 9:35 p.m.
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.
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:title>The purpose of writing Use Case</rrm:title>

Bob 3 commented Sep 03 '22, 9:16 p.m.

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. 

Ian Barnard commented Sep 05 '22, 7:54 a.m.

Bob - please create a new question .

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.