It's all about the answers!

Ask a question

LQE Query to pick up all requirements collected from DOORS


Richard Good (872158) | asked Nov 24 '16, 1:18 p.m.
edited Nov 24 '16, 2:24 p.m.

Apologies if this is a stupid question. I have created a LQE query that has collected some data from a doors database,  I just want to figure out what it is and debug it. Some sort of SPARQL query to return all the DOORS requirements (not interested in Design Manager requirements, only DOORS classic ones)

RELM ->Custom Artifact -> Requirement Management -> Requirements

gives me a start, but nothing is collected from running this, meaning my query is running against a ton of modules/ requirements, but nothing is available for analysis, very confusing.

Thanks for any help

Richard

Accepted answer


permanent link
John Carolan (71616) | answered Nov 25 '16, 8:06 a.m.
Hi Richard,

I don't think RDF distinguishes between requirements tools by type, so I think you'd need to parse the URI to get a list of artifacts from just one data source, like DWA.  Here's a really basic example which parses the URIs of all resources of type oslc_rm:Requirement and filters on just those which have "/dwa/' in the resource URI path (of course you might have your DWA set up with a different context):

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX oslc: <http://open-services.net/ns/core#>
PREFIX oslc_rm: <http://open-services.net/ns/rm#>

SELECT ?resource
WHERE {
   ?resource a oslc_rm:Requirement.
FILTER regex(str(?resource),'/dwa/')
}

The same query with a filter for "/rm/" would catch DOORS NG requirements using the default /rm context root.
If you don't care about the type of object (requirement, collection, etc.) you could just replace oslc_rm:Requirement with a variable ?x.

I hope that helps,

John


Richard Good selected this answer as the correct answer

Comments
Richard Good commented Nov 25 '16, 8:23 a.m. | edited Nov 25 '16, 8:31 a.m.

Yes it helps, thanks. I figured out the forum has mangled the prefix bit of your SPARQL

The query returns only one DOORS object, which would explain why the Requirement SPARQL hasn't been doing what I think it should ;-(

I added all the modules in the test doors database to the working set in DOORS and initialised it. reindexed several times, I've even added some attributes to the mappings and added vocabularies to LQE. Still all I get is one measly requirement, I get a load of extra user records with the ?x, but no more meaningful records.

I hoped LQE would return all DOORS objects in the working set are there some hidden criteria I am missing somehow?

More words of wisdom please!

Cheers

Richard


John Carolan commented Nov 28 '16, 3:55 a.m.

I have seen where sometimes you need to make a change to a module (something as simple as adding and removing a space at the end of a requirement to update a timestamp) in order for the indexing to pick it up.  That might be worth a try.  If that doesn't help, then I'd recommend opening a support ticket for it as the best way forward.

Cheers.

John


Richard Good commented Nov 28 '16, 10:13 a.m.

Thanks. If I add an attribute then use the properties box to add a value to all objects in the module, then I get all those objects the next time I update content in LQE. Must be some flag somewhere which is incorrectly set to say that LQE is up to date, any idea what? Adding a module with a new requirement and adding it to the working set also works.

Useful advice, but I think this behaviour constitutes a bug, certainly a nice hole to fall down ;-)

Your answer


Register or to post your answer.