It's all about the answers!

Ask a question

QueryCapability in Rational Model Manager (v7.0.2)


Dmitry A. Lesin (24825896) | asked Sep 19 '22, 9:53 a.m.
edited Sep 23 '22, 2:25 p.m. by David Lafreniere (4.8k7)

Hello!

I can not query resources from RMM v7.0.2 deployed in CCM application. Does it work in this version?

The query capability was discovered by next way:

1. Set JKE Banking (CCM) project area from samples as architectural enabled

CCM DM activated

2. Run HTTP GET for oslc_am catalog discovered in rootservices of CCM application to get available service providers

Get catalog

3. HTTP GET for required service provider from the catalog

Get service provider

4. Detect query capability in service provider details

Get service provider details

5. HTTP GET for discovered query capability

HTTP 404

As if something isn't implemented yet and waiting for next releases? Or I did something wrong?

Thank you!

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Sep 23 '22, 2:20 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 23 '22, 4:07 p.m.

Side Note:
Rational Design Manager (RDM) is End of Service (EOS), and does not ship with ELM 7.0.2. You are actually talking about Rhapsody Model Manager (RMM).
To avoid confusion for readers, and make this thread more discoverable for users looking for RMM topics vs DM topics, I have updated the question/title to mention RMM instead of DM.


Answer:
RMM currently provides very limited support for Query Capabilities (only specific OSLC queries that DNG and DOORS are running against RMM)

Ex:
/am/oslc-am/query/_db8iYNNZEeerUJltAj9C5Q?oslc.where=*%3D%3Chttps%3A%2F%2Flocalhost%3A9443%2Frm%2Fresources%2F_dO_yAdRKEeehXdBOsttb4Q%3E&oslc.select=*


We do not support:
-oslc.searchTerms
-oslc.orderBy
-oslc.properties

and only support * for:
-oslc.select
-oslc.where


The request to expand on the OSLC query support is tracked in: Support query capabilities in the OSLC AM API. (62419)
Also see this related work item: 62269: RMM OSLC AM provider for third party tools

Dmitry A. Lesin selected this answer as the correct answer

Comments
Jim Amsden commented Sep 23 '22, 3:47 p.m. | edited Sep 23 '22, 4:02 p.m.

 David, look like your answer got messed up some how. The example query looks incomplete, as does (other than ).


I think you are saying that RMM only supports OSLC query where and select clauses sufficient for DNG/DOORS to query for incoming Architecture Management links?



David Lafreniere commented Sep 23 '22, 4:13 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Thanks for noticing that. Looks like the asterisk character needs to be escaped (with a backslash).

But yes, the current OSLC query support only works with 'oslc.select' and 'oslc.where' to the extend that DOORS/DNG <-> RMM use cases work.

The two work items might have more information (or may be an additional/different place to have further discussions, etc.).


David Honey commented Sep 26 '22, 4:43 a.m. | edited Sep 26 '22, 4:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You should probably include at least the Oslc-Core-Version: 2.0 header, and an Accept header for an RDF media type, such as text/turtle or application/rdf+xml . https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html#using-a-query-capability says:

oslc:queryBase neither specifies oslc.where nor oslc.searchTerms , the server MUST return a query response describing all the resources that have one or more of the RDF types specified by the oslc:resourceType of the oslc:QueryCapability that defines the oslc:queryBase .[QUERY-10]


If a GET or POST on a query base without oslc.where is not accepted, I think you should submit a defect against RMM since it is not compliant with the specification. It is acceptable to not support olsc.searchTerms or oslc.paging because these are optional.


Dmitry A. Lesin commented Oct 05 '22, 4:04 a.m.

Thank you David L. and everybody who was participating in this discussion! It seems that David's sample definitely works. 

3 other answers



permanent link
David Honey (1.8k17) | answered Sep 20 '22, 4:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Your request is missing an oslc.where query expression. Perhaps the server requires it. It would be bad practice to attempt to query for all resources by omitting a query expression.


Comments
David Honey commented Sep 26 '22, 4:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The OSLC Query specification says that the OSLC query parameters are optional. So while it should be valid to omit all parameters such as oslc.where , I think this should be discouraged. Effectively trying to query for every resource in the scope of a query capability may not be scalable or performant. Having said that, if RMM doesn't accept such a query, I would submit a defect against RMM because it is not compliant with the OSLC Query specification.


permanent link
Jim Amsden (29337) | answered Sep 19 '22, 10:46 a.m.
Rational Design Manager (RDM) is End of Service (EOS), and does not ship with ELM 7.0.2. Do you mean Rhapsody Model Manager (RMM)?

Get on the queryBase resource is not defined in OSLC Query. Some servers do implement this, often by returning the URLs of all available resources. But servers are not required to support this. This behavior may have changed between RDM and RMM. Try an actual OSLC Query.





Comments
Ralph Schoon commented Sep 20 '22, 2:29 a.m. | edited Sep 20 '22, 2:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Jim, I find that surprising. According to https://docs.oasis-open.org/oslc-core/oslc-query/v3.0/csprd01/oslc-query-v3.0-csprd01.html#using-a-query-capability the server MUST support a GET on the query base.


 a GET on the query base URI of a query capability, with zero, one or more query parameters shown in the table below.
Servers must support a GET on the query base URI of a query capability. [query-6]

However, the error message seems to suggest that the query is interpreted as "in" and it is missing a parameter.


permanent link
Ralph Schoon (63.1k33645) | answered Sep 19 '22, 10:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 19 '22, 10:26 a.m.

 Dmitry I would suspect you did not provide the correct request headers. The OSLC header is missing. 


Comments
Ralph Schoon commented Sep 19 '22, 10:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I would try OSLC-Core-Version: 2.0 


Dmitry A. Lesin commented Sep 19 '22, 10:26 a.m.

 Hi Ralph,
I'm sorry, sent a wrong screen shot from initial GET where I really made a mistake. The correct screenshot:


Fixed screen shot


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.