Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is there any way by which we can set values in custom attributes for creating artifacts in RRC?

We have a few custom attributes that we want to have default values while creating artifacts in RRC. Is there any ways that we can set the values for the same?

0 votes



One answer

Permanent link
The artifact's Type can be used to define the default vale of new artifacts.

But if users wants to setup an initial value at artifact creation time, OSLC allows to specify the initial value in the request body.  Doing a get to the artifact Instance shape will expose the artifacts attributes and each artifact attribute will have an entry similar to :

<oslc:Property>
        <oslc:valueType rdf:resource="http://open-services.net/ns/core#Resource"/>
        <oslc:allowedValues>
            <oslc:AllowedValues>
                <oslc:allowedValue rdf:resource="https://gradev.ibm.com:9444/rdm/types/_84r34ucBEeGTAYdIle28Lg#9fa948cf-d978-49b4-aac8-ab7cf73c0b70"/>
                <oslc:allowedValue rdf:resource="https://gradev.ibm.com:9444/rdm/types/_84r34ucBEeGTAYdIle28Lg#5f25f5ae-5100-47a0-9913-a950498106db"/>
                <oslc:allowedValue rdf:resource="https://gradev.ibm.com:9444/rdm/types/_84r34ucBEeGTAYdIle28Lg#3e9db9f1-3d5c-4716-aae0-f48d49260a8b"/>
                <oslc:allowedValue rdf:resource="https://gradev.ibm.com:9444/rdm/types/_84r34ucBEeGTAYdIle28Lg#217b0cc2-9b72-4753-954a-effc3cd335cb"/>
                <oslc:allowedValue rdf:resource="https://gradev.ibm.com:9444/rdm/types/_84r34ucBEeGTAYdIle28Lg#6f8bd7c7-fc78-413f-8240-36628727d196"/>
            </oslc:AllowedValues>
        </oslc:allowedValues>
        <oslc:propertyDefinition rdf:resource="https://gradev.ibm.com:9444/rdm/types/_9AkBgucBEeGTAYdIle28Lg"/>
        <oslc:range rdf:resource="https://gradev.ibm.com:9444/rdm/types/_84r34ucBEeGTAYdIle28Lg"/>
        <oslc:allowedValues rdf:resource="https://gradev.ibm.com:9444/rdm/types/_84r34ucBEeGTAYdIle28Lg#9fa948cf-d978-49b4-aac8-ab7cf73c0b70"/>
        <oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
        <dc:title rdf:parseType="Literal">Status</dc:title>
        <oslc:name>_9AkBgucBEeGTAYdIle28Lg</oslc:name>
    </oslc:Property>

From there users can check which is the default vale (oslc:allowedValues) and if needed specify a different one based on the oslc:allowedValues list.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 45

Question asked: Sep 11 '12, 8:42 a.m.

Question was seen: 5,422 times

Last updated: Sep 11 '12, 10:40 a.m.

Confirmation Cancel Confirm