Can not make validateRequirements link from Jazz QM to artifact in custom OSLC Adapter
Hello, I'm trying to create a validation requirement link from DNG to my Testplan app (TestCase), but unfortunately, "ID CRRRW7255E The link from this server to the other server could not be created." is returned with no errors in rm.log
I'm using DNG v7.0.3.
RDF returned from API is:
< HTTP/2 200
...
< content-type: application/rdf+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc_qm="http://open-services.net/ns/qm#"
xmlns:oslc_rm="http://open-services.net/ns/rm#"
xmlns:oslc="http://open-services.net/ns/core#">
<oslc_qm:TestCase rdf:about="https://localhost:8080/section/5502">
<dcterms:title>TestPlan Section 5551</dcterms:title>
<dcterms:identifier>TP_5551</dcterms:identifier>
<oslc_qm:validatesRequirement rdf:resource="https://localhost:8081/rm/resources/TX_06uQQ3xBEfCWNodLYUECTQ"/>
</oslc_qm:TestCase>
</rdf:RDF>
headers:
etag: "_mSmKsbrhEeG3OKR6fZ1svQ"
oslc-core-version: 2.0
As i understood from other thread a put API call will be called after Get, I already supported PUT API beside GET, but unfortunately as i said the GET request fails with error ID CRRRW7255E The link from this server to the other server could not be created.
so Am i making something wrong, or missing anything?
so Am i making something wrong, or missing anything?
Accepted answer
A GET can't create a link it just gets the current state (and etag) of the thing. basically you should be doing GET then modify the xmlrdf and then to create the link do a PUT with the If-Match header set to the complete etag (including those "" you show if they're part of the received etag header) from the GET.
The OSLC links like Validated By are always directional; a Validated By link is always from a test plan or test case to a DOORS next requirement.
Links from apps other than DOORS Next itself are always stored in the other app, so you must GET/PUT to the test plan/test case to create the link.
For convenience (i.e. so you can create the link from either end) the user interface hides this so you appear to be creating the link from a requirement and what the UI does is GET/PUT on the testing artifact to create the link.
For the GET you must use header Accept: application/rdf+xml, and for the PUT you must use header Content-Type: application/rdf+xml
If using configuration management you must provide the relevant configuration with the GET/PUT.
If not using configuration management you'll have to create the backlink too, a Validates link from the requirement to the test artifact.
2 other answers
Hi Ian, First of all appreciate your reply!!
I tried what you said and unfortunately, same error appears.
Let me check if I'm missing something.
- When Receiving a "GET" Request to (https://localhost:8080/section/5502) (The testcase resource url), then I should do the following:
- Send a "GET" request to the DNG resource url (https://localhost:8081/rm/resources/TX_06uQQ3xBEfCWNodLYUECTQ) and I will receive a response containing the resource rdf (and Etag).
- After That I should send "PUT" request with the updated rdf with validatedBy to the DNG resource url (https://localhost:8081/rm/resources/TX_06uQQ3xBEfCWNodLYUECTQ) to update it with the new link (I should include "if-match" header with "ETag").
- returns RDF I already shared in the main post, but same error appears in DNG UI "ID CRRRW7255E The link from this server to the other server could not be created"
I did the previous steps and this showed the link in UI but only after refreshing the page, due to the same error. how can I get rid of it and show the link directly without refresh?
One more thing I found while deleting this link it throws the following error:
- ID CRRRW7254W The link from the other server to this server could not be deleted because the other server is not available or communication with it has failed.
- Is there something else that should be supported for deletion to work ?
Comments
In my answer I said "Links from apps other than DOORS Next itself are always stored in the other app, so you must GET/PUT to the test plan/test case to create the link."
So doing GET/PUT on the rm artifact won't (can't) work.
Are your RM and QM projects opted in for configuration management? If they are then links are ONLY stored in ETM so you will only PUT to update the ETM thing (test plan, test case) with the link to doors next artifact. so GET the test case, and PUT to the test case with modified rdf xml containing the validated by link.
Try manually creating a link from a test case to a requirement, then GET that test case to see how the link appears - that's what your code will be adding to the rdf of the test case.
1 vote
Ok I understand what you said now, my last question when the link is created in the qm tool, how does DOORs know about it? if there is documentation. Thanks