It's all about the answers!

Ask a question

Traceability Matrix with DNG and RPE


Don Cooper (16211) | asked Dec 18 '16, 10:54 a.m.
edited Dec 18 '16, 11:00 a.m.
How do you follow links in DNG for N-number of module artifacts linked together?

Example: A --> B --> C--> .. --> N  The number and names of the modules are known apriori but the number of artifacts in each module is not.

I simply want to start at A and walk each link to the next module artifact and so on all the way to N in order to build a traceability matrix.

I can do it between any two module artifacts but I don't see the necessary information being returned in the response in order to walk the entire length.

In other words, if I request artifact info for module A I see the 'satisfied by' link info and can go directly to that artifact in module B. But there's nothing in the response that tells me it's module B or if the artifact in module B is 'satisfied by' an artifact in module C. It just says 'satisfies' the artifact in module A. So I'm stuck in this loop between modules A and B.

Artifact B in DNG shows me both the 'satisfies' and 'satisfied by' links but I don't seem to be able to get them via the API except using the module URI which I don't get by following the link from module A to module B.

Obviously, I'm missing something.

Accepted answer


permanent link
Subramanya Prasad Pilar (4.6k16) | answered Dec 18 '16, 1:13 p.m.
The solution could be to use a data source configuration element to pull details from the base artifact (core version). As you might know already, under dataSource/artifact/moduleContext/contextBinding, "about" property provides URL information about the artifact version included in the module and "core" property provides URL information about the base artifact.
You can get the URL using script expression:
var uri = about;
var pos = about.indexOf("/rm/resources");
if (pos >= 0)
{
    uri=about.substring(0,pos);
    uri=uri+"/rm/publish/text?resourceURI=" + core;
}
uri;
Don Cooper selected this answer as the correct answer

Comments
Don Cooper commented Dec 18 '16, 2:31 p.m. | edited Dec 18 '16, 2:39 p.m.

I don't understand how that addresses my problem.

I start with module A and iterate through all the requirements artifacts. If an artifact has a link then I want to follow it to the target module artifact it's linked to. Then I want to see if the target is linked to another module artifact and if so I want to follow it and so on.

I don't see any URLs in the http responses to work with that allow me to do that.

I need at least a module URL of the target artifact in order to dynamically configure the module data source for the next module to query or all link information.

But although the target artifact has 'satisfies' and 'satisfiedby' links, only the 'satisfies' link information is being returned.

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.