It's all about the answers!

Ask a question

How do you get the name of the module of a linked item in DNG with RPE?

David Clark (234847) | asked May 06 '20, 5:26 p.m.

 I have a basic trace matrix built, but curious how to get the name of the module containing the artifact that is linked in the <LInks> section of the URI?

David Clark commented May 07 '20, 11:53 a.m.

This is very frustrating... I have spent hours trying to figure out how I can follow a Link from Artifact_1 to Artifact_2 and then discover the Module Artifact_2 is in.

There appears to be NOTHING in the URI for Artifact_2 that references the module it is in. HOW is this done?

How is the module information appended to the DNG UI such that when I display a link "Satisfies" I get  "1234: artifact_2 (module it can be found in)"

I can automate trace matrices and even can follow multiple levels, but I can NOT figure out how to get the module they are in!...

2 answers

permanent link
Subramanya Prasad Pilar (4.6k14) | answered May 07 '20, 1:18 p.m.
Hi David,
You can get the URL of linked artifact using ataSource/artifact/traceability/links/Link/relation, on which you have to make another data request. Then you should be able to print dataSource/artifact/moduleContext/contextBinding/moduleDisplayName
I am attaching a simple template for your reference.

David Clark commented May 07 '20, 4:59 p.m.

 This does not work.

  - ...Link/Relation when cast as a resource data configuration returns the artifact in question, that is easy.
I do not understand how you can post the relation without replacing the 
/resources/ with "/publish/resources?resourceURI=" - I'm I missing something?
I have: Module_A ><requirement_High> --> linked to <requirement_Low> (that lives in Module_B)
I get <req_High> as a resource, look at it's XML, it has: 
    <traceability><links><Link><satisfied By><relation>

I data configure <relation> with /resources?resourceURI=(relation URI) and I get <req_Low>  GREAT! But <req_Low> has no <module context> to use in order to retrieve the module information. req_High req_Low

Subramanya Prasad Pilar commented May 08 '20, 1:18 a.m.

You can GET the relation without replacing the 

/resources/ with "/publish/resources?resourceURI=". For this, you need to use Extra Header (POX Profile).
Probably you are using core version instead of module version of the artifact. To showcase this, I have used 2 different approaches to configure data source configuration elements. You can compare Data Source Configuration element (having ID 18) with Data Source Configuration element (having ID 186). I have not tested the template, but one of the approaches should work.

David Clark commented May 08 '20, 9:26 a.m.

 Prasad, thank you for the response, but I am still having difficulty.

The Extra Header works IF you are not using configurations. I am so I append oslc_config to the URI.
The relation attribute returns the CORE URI or base artifact URI, I do not see how to get to the module version of the artifact from the core version.

permanent link
Bob 3 (1481363) | answered Sep 03 '22, 7:31 p.m.

I wanted to follow up on this thread. I am having the same problem and I am using PUB 7.0.2.

I need to navigate a traceability link from one artifact to another. Then I need module-related information about that linked artifact, like the artifact's section number within the module. 

When I follow the Link/Relation URI, it takes me to the base artifact. How do I pivot to the module instance of that artifact?

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

Bob - you should create a new questoin 

Your answer

Register or to post your answer.