How do you get the name of the module of a linked item in DNG with RPE?
2 answers
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.
I am attaching a simple template for your reference.
Regards,
Prasad
Comments
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:
<moduleContext><...binding><...displayname>
<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.
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.
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.
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?
Comments
David Clark
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.