How to add artifacts in collection using OSLC
Need to add artifacts in a collection. Tried the following steps:-
1) Did a get on the artifact 2) Updated the RDF with the following line :- <oslc_rm:uses rdf:resource="https://clm20124.accenture.com/rm/resources/_wtD10IYxEeKDfYJELFVegw"/> But this didnt update the artifact. |
2 answers
Make sure you have the following headers:
OSLC-Core-Version=2.0
Accept=application/rdf+xml
If-Match= "_C9-QgYZ2EeKEQsxslOt1-g"
If-Match header is the etag header you get by doing a GET on the artifact.
Also check the RDF like you add is inside the
<rdf:Description rdf:about="https://server:port/rm/resources/_Ef2S1HbnEeK9wNdPpoPpMw"> ... Comments
Sanitha Pillai
commented Mar 06 '13, 10:25 p.m.
Hi, Yes, I had used the above mentioned headers and added the tag inside the <rdf:description> tag. But still i am unable to add the artifact in the collection. |
Hi,
a couple of questions ? Which is the HTTP rc returned from the PUT ? When you do a GET to the Collection ( your step 1 ) Does the body returned contains other oslc_rm:uses ( assuming your Collection contains other artifacts.? Comments
Sanitha Pillai
commented Mar 06 '13, 10:33 p.m.
Hi,
I am doing a GET on the artifact and not on the collection . I updated the RDF content and added the content :-<oslc_rm:uses rdf:resource="https://clm20124.accenture.com/rm/resources/_wtD10IYxEeKDfYJELFVegw"/>;
These steps are given in the article :- https://jazz.net/library/article/1197/ Section 7 :- 7. Adding artifacts to and removing them from a collectionRequirements that belong to a collections are exposed as entries of the "oslc_rm:uses" type. A complete sample entry is as follows: <oslc_rm:uses rdf:resource="https://grarrc.ibm.com:9443/rm/resources/_mLHpsbrhEeG3OKR6fZ1svQ"/> To add artifacts to or remove artifacts from a collection, follow these steps:
1
Gabriel Ruelas
commented Mar 07 '13, 9:56 a.m.
Hi,
|
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.