It's all about the answers!

Ask a question

Hello, I want to query the modules and artifacts in a RM Baseline/Stream irrespective of the folders they are present in.


Asha U S (113) | asked Aug 19 '21, 2:35 a.m.

I want to query the modules and artifacts in a RM Baseline/Stream irrespective of the folders they are present in. Though I was able to query for some of the baselines, some modules are missing in the result. Suppose if there are 3 modules when viewed from browser, only 2 are showing up in the query result(only in few cases). Not able to figure out the root cause for this inconsistency on why this is happening in some cases. Please help. Thanks in advance.


Comments
Ian Barnard commented Aug 19 '21, 9:36 a.m. | edited Aug 25 '21, 1:07 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

What version+ifix are you using?

What method are you using to query - give details of the query you're making?

3 answers



permanent link
Asha U S (113) | answered Aug 25 '21, 2:02 a.m.

 Hello , 

Thanks for the response.
DNG  version-6.0.6.1, iFix018
Query- https://server:port/rm/publish/modules/*  
with VVCCONFIGURATION and OSLCCONFIG headers.


permanent link
Ian Barnard (1.9k613) | answered Aug 25 '21, 5:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 25 '21, 5:05 a.m.

The reportable REST query you're using works irrespective of the folder the module is in. It's possible the server wants to return more than one page of results and the "missing" modules are in subsequent pages you're not retrieving.


with VVCCONFIGURATION and OSLCCONFIG headers.

Those aren't valid header names.

The correct way to specify the configuration is:

Either 1.. Using a parameter oslc_config.context=the config url

You must URL-encode the configuration URL as for any parameter specified in a url, i.e. this is a requirement of general http URLs not a DOORS Next or ELM requirement.

This method can be very convenient because you can put the url with the parameter into a browser tab and you will get the first page of the XML result - so it's a good way to check that you're building the URL correctly.

For example, for configuration https://jazz.ibm.com:9443/rm/cm/stream/_3TPS4NcJEeqXpuBdEolY7w which is url encoded to https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fstream%2F_3TPS4NcJEeqXpuBdEolY7w%0D%0A
Or 2.. Using a header Configuration.Context=the config url

For example:
The returned XML is paged if there are many results (I've seen this when there are more than 100 results, but AFAIK the actual number at which paging is started is server-decided) - use the href attribute in the opening tag as the URL to retrieve the next page, until it isn't present or result from it is empty.
<?xml version="1.0" encoding="UTF-8"?>
                 xmlns:rrm="http://www.ibm.com/xmlns/rrm/1.0/"
                 xmlns:attribute="http://jazz.net/xmlns/alm/rm/attribute/v0.1"
                 xmlns:comments="http://jazz.net/xmlns/alm/rm/comments/v0.1"
                 xmlns:field="http://jazz.net/xmlns/alm/rm/field/v0.1"
                 xmlns:history="http://jazz.net/xmlns/alm/rm/history/v0.1"
                 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/"
                 xmlns:term="http://jazz.net/xmlns/alm/rm/term/v0.1"
                 xmlns:text="http://jazz.net/xmlns/alm/rm/text/v0.1"
                 xmlns:view="http://jazz.net/xmlns/alm/rm/view/v0.1"
                 xmlns:xhtml="http://www.w3.org/1999/xhtml"
                 appId="RRC"
                 rel="next"
                 rrm:totalCount="11"
                 vMajor="60"
                 vMinor="06">
    <ds:artifact attribute:itemId="_4II6kNcJEeqXpuBdEolY7w">
        <rrm:title attribute:itemId="_3tK10dcJEeqXpuBdEolY7w">AMR System Requirements Specification</rrm:title>


permanent link
Asha U S (113) | answered Aug 25 '21, 12:48 p.m.

Headers are given the right way like you mentioned(Sorry I happened to mention in short form above). And in the result I see rrm:totalCount="1" with the details of that single module alone whereas I'm able to query all modules in some cases where all the modules are present at same level. So please suggest if there is any alternate way to do this.


Comments
Ian Barnard commented Aug 25 '21, 1:06 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I don't understand how your query can return selectively modules from different folders because the reportable rest query like "https://server:port/rm/publish/modules/*" doesn't have any folder limitation or specification of the folder - it's got nothing to do with folders.

What are you varying in the query when you say you sometimes see one module and sometimes see other modules? If it's the configuration then presumably those configurations have different numbers of modules in different folders; that's perfectly valid. If you're somehow hoping the result should somehow return all modules in all configurations, well it won't.

The only way to get results with modules in different local configurations is when you use a global configuration and then you'll see results from all local contributions to that global configuration; is that what you're trying to do?



Ian Barnard commented Aug 25 '21, 1:06 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Some tips for debugging:

1. Try moving to the style #1 where the configuration is a parameter in the URL and then you can get the result directly in your browser, save to a file and examine in an editor.
2. Also try tracing exactly what your code sends to the server using a man-in-the-middle proxy like Telerik Fiddler Classic.

Good luck!


Asha U S commented Sep 09 '21, 2:03 a.m.
I tried with both styles you have mentioned but did not work.
And yes, I'm changing local configurations with the same global configuration and expecting the modules from each local configuration associated to the GC(as shown in browser), that's the requirement.

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.