How can I get the module related to a requiment artifact, using OSLC in IBM Doors NG ?
Hi,
We can fetch all desirible requirements using a OSLC query in IBM Doors NG, like this:
For each requirement artifact, I would like to know the module that contains it.
How can I get the module related to a requiment artifact, by OSLC ?
Thanks !
Accepted answer
Hi Carlo
Technically speaking, core artifacts are never "in" modules, but they can be used in one or more modules, so what you're asking should correctly be stated as something like "Which modules use this artifact?".
Using OSLC Query:
That said, I don't think there's a direct way to find this out using OSLC query, but maybe you can try:
1. get the uris of selected/all modules you're interested in, e.g. using an OSLC query like oslc.where=rdf:type=oslc_rm:RequirementCollection or oslc.where=rdm_types:ArtifactFormat=jazz_rm:Module
2. for each module GET from the module URI with headers OSLC-Core-Version=2.0 and Accept=application/rdf+xml and in the RDF there are entries oslc_rm:uses for each "used" artifact
3. now GET from each of these artifacts (using the same headers) to find the id or any other info you need
Using Reportable REST:
The reportable REST API can give you the content of a module using a query like:
replace the module URI with your module URI.
To work in a configuration-managed project add a configu URL like
https://SERVER:PORT/rm/publish/resources?moduleURI=_c1cm0L3VEeCPFbe791FOoQ&oslc_config.context=https://SERVER:PORT/rm/cm/stream/_XYZ
replace _XYZ with the URI of your configuration.
More on the Reportable REST API: https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI
Also see https://jazz.net/forum/questions/276811/is-there-any-oslc-query-to-get-all-module-artifacts-in-dng
HTH
Ian