It's all about the answers!

Ask a question

Why are my custom attributes not saving in my OSLC post?


1
2
Kenny Smith (302614) | asked Jan 29 '16, 5:44 p.m.
 I have 4 custom attributes on my DNG artifact. All but these four attributes I can update. 

Here is my REST payload:

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:public_rm_10="http://www.ibm.com/xmlns/rm/public/1.0/"
xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/"
xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/"
xmlns:acp="http://jazz.net/ns/acp#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:nav="http://jazz.net/ns/rm/navigation#"
xmlns:oslc_rm="http://open-services.net/ns/rm#"
  xmlns:j.0="https://com.widgets/attributes/">
<rdf:Description rdf:about="">
<j.0:CCBStatus rdf:resource="https://com.widgets/types/dataTypes/ccbStatusLevels/Approved"/>
 <j.0:fileName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">UPDATE THE FILE NAME</j.0:fileName>
 <j.0:memberState rdf:resource="https://com.widgets/types/dataTypes/memberStateList/TX"/>  
<rdf:type rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<dc:description rdf:parseType="Literal">OSLC Creation Second Example</dc:description>
<dc:title rdf:parseType="Literal">OSLC Created Requirement</dc:title>
<oslc:instanceShape rdf:resource="https://myserver.local.net/rm/types/_geanwcOnEeWQu9K-KClhUQ"/>
<nav:parent rdf:resource="https://myserver.local.net/rm/folders/_6f41751c0ccb4314a22894d8f453921c"/>
</rdf:Description>
</rdf:RDF>

The items in bold, will NOT save at all. I'm using RDF URI's on this. I do get a 200 return code, and can see the artifact in DNG. It does not have any of these custom attributes listed. Note that one is a simple String, the others are Enumerated. 

Ideas anyone?

Comments
1
Donald Nong commented Jan 31 '16, 8:08 p.m.

I can see the same symptom. The custom attributes are ignored during creation - the XML parser seems to not recognize them at all. I can update the custom attributes (using PUT) though. If you believe this is a defect, you'd better contact Support.

One answer



permanent link
Kenny Smith (302614) | answered Feb 16 '16, 1:50 p.m.
 I have confirmed, that the artifact MUST be saved before it will allow saving the custom attributes. Thus, when writing a new artifact from some other data source, it is a two step process. First create it with a POST, then save it again with a PUT.

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.