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 (212328) | 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!...

One answer

permanent link
Subramanya Prasad Pilar (4.2k14) | 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.

Your answer

Register or to post your answer.