It's all about the answers!

Ask a question

Creating OSLC Links across multiple components in the same global configuration

Diogo Curto (113) | asked Dec 13 '20, 9:57 a.m.
edited Dec 13 '20, 9:58 a.m.


In my current setup I have several components that belong to the same global configuration.
I'm currently using DNG 7.0.
I want to create a link from an artifact (inside a module) to another artifact inside a different module living in a different component.

I'm always getting a server error [403]: CRRRS4510W  The link was not created because it does not meet defined link constraints

However, I can create the link manually without any issue, and if I perform the exact same request (with the manually added link already present), the request is successful (it adds same component links, for instance). 
I even tried to perform a GET, remove the read-only attributes and perform a PUT request with the same data coming from the GET without any luck.

In short, adding the link manually and then performing the PUT request, it works and the item gets updated. If I remove the link and perform the PUT request I get the 403 error mentioned above.

as headers, I'm using:
vvc.configuration = componentStream
oslc_config.context = global configuration URI (I also tried without this)
Content-Type = application/rdf+xml
OSLC-Core-Version = 2.0
If-Match = etag (from a previous get)
(also tried with a private header)

I hope the question is clear enough.

Best Regards,

EDIT: I tried using the method described here: 

Creating links between requirements across multiple components using OSLC

Ian Barnard commented Jan 19 '21, 1:35 p.m. | edited Jan 19 '21, 1:37 p.m.

 I've never tried this:

1. You're trying to create a link in a GC context so don't use vvc.configuration = componentStream - you should only provide the oslc_config.context = global configuration URI - and presumably you have ensured this GC has contributions from the components that contain both ends of the link you want to create?
2. The user doing the PUT need permission to modify the artifact at the outgoing/'from' end of the link. Not sure, but you might have to do the PUT to this artifact, i.e. not at the incoming end of the link. The 'from' end artifact has to be in a stream, because that's where the link is stored it must be mutable.
3. If you have any link constraints, try removing them all at both ends

Ian Barnard commented Jan 19 '21, 2:44 p.m.

Which link type are you creating? iirc you can only create OSLC links using the OSLC API. the UI allows you to create any link type, of course.

Diogo Curto commented Jan 20 '21, 6:36 a.m.

Please see my answer bellow. The character limit on this box was too small to answer properly.

One answer

permanent link
Diogo Curto (113) | answered Jan 20 '21, 6:36 a.m.

 Hello Ian, thanks for your support.

The components have been created using the same template.

Regarding the first points, I tried also several combinations of oslc_config.context and vvc.configuration. As I said before, if I add the link manually via UI following the link constraints (even a system defined link type), it works fine. 

What I've tried.
1. Create manually via UI a system defined link compliant with the link constraints.
2. Perform a GET and retrieve the application/rdf+xml representation
3. Remove the link via UI
4. Adapt the application/rdf+xml to comply with OSLC specification (removing for instance read only fields)
5. Perform a PUT operation (with the link there)
6. RESULT: Error 403.

If I repeat the steps 1-6 without removing the link via UI, meaning not executing step 3, it works fine. the link is kept. If I remove the link from the OSLC representation sent in step 5, then, the link is deleted (as expected).

On another note, I'm able to create the links now using a workaround (the same as the browser does.) it just takes 3 minutes per link.

What I'm doing now is the following:

{'DoorsRP-Request-Type': 'private', 
'Content-Type': 'application/rdf+xml', 
'oslc.configuration': '<GC_SERVER_ADDRESS>/gc/configuration/145', 'net.jazz.jfs.owning-context': '<RM_SERVER_ADDRESS>/rm/rm-projects/_IrrUYfOtEealZ_zm_SstCA/components/_na2ccCWuEeu1LM6pSS3uxg', 'Referer': '<RM_SERVER_ADDRESS>/rm/web', 
'X-Requested-With': 'XMLHttpRequest'}

    <rm:Link rdf:about="">
        <rdf:subject rdf:resource="<RM_SERVER_ADDRESS>/rm/resources/BI_Jcr7ADaCEeuKQpyRg7GYdQ"/>
        <rdf:object rdf:resource="<RM_SERVER_ADDRESS>/rm/resources/BI_lFAdMDypEeuKQpyRg7GYdQ"/>
        <rdf:predicate rdf:resource=""/>
        <rdf:type rdf:resource=""/>
        <rdf:value rdf:datatype=""/>
        <rm:hasAttrVal rdf:parseType="Resource">
            <rm:hasAttrDef rdf:resource=""/>

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.