Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Queried for a Single Requirement with Two Requirements in the Response

 Hi,


I have queried for a single requirement in Doors NG with the query:  "... oslc.where=dcterms:identifier=xyz".

The response, however, contains two member results, both with the same identifier, though they seem to be located apart from each other, see below

member 1:
<oslc_rm:Requirement rdf:about="https://.../rm/resources/CA_685b0b6ac75f4b1a8b0f0fd0ec12a510">   

member 2:
<oslc_rm:Requirement rdf:about="https://.../rm/resources/_9mJ9gIi1Eeuc2f2NAwVSqg">

Someone having an idea of why this is happening?

Also,  the ETag in the HttpResponse is null, is this due to a result including more than one requirement? 

Regards 
Magnus 

  

0 votes



One answer

Permanent link
Hi Magnus,

Easiest way to check is copying resource URL and putting into the web browser.

In Your case You are getting two members because one requirement seems to be added to a module and you are getting one like to base artifact and second one to the module context.

If the artifact would be in two modules then you would get 3 members.

Hope it is answering Your question.

Bartek

0 votes

Comments

Thanks for the answer!


Yes you are right,  there is one member reference to a module and one member reference to a base artifact for the same identifier. 

Do you think that the query responding in two members for the same identifier also leads to the missing ETag ?

(That is, the server is not able to uniquely identify a requirements instance by the supplied identifier in the query)

Magnus   

Query doesn't retrieve the artifact (in the sense of retrieving something you could update), it returns URIs of artifacts matching the query, optionally with properties specified in oslc.select.

If you want to update a requirement (which is when you need the etag) then you should GET the requirement URI, the result will include the current etag.


If you need to identify which query result is the core artifact and which the artifact in a module, include rm_nav:parent in the oslc.select then you can check for a result with a value for rm_nav:parent (which is the core artifact) or without rm_nav:parent (which is the artifact in a module)

 Thanks again Ian!


Problem solved  

Regards
Magnus

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Apr 04 '21, 7:50 a.m.

Question was seen: 1,300 times

Last updated: Apr 08 '21, 4:13 a.m.

Confirmation Cancel Confirm