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

while creating a requirement in DOORS NG through lyo client project,how to set the value of ArtifactFormat

 how do i set the value of attribute ArtifactFormat while creating requirement in lyo client project.

0 votes


Accepted answer

Permanent link
Hello
The DNG OSLC implementation only supports artefacts whose format is "Text", "Collection" and "Module".  Other formats would require a standardization of their representation at OSLC - currently there are no plans to reach such standardization at OSLC.

I suggest you raise an enhancement request on the DNG product.

cheers
-ian

Amit Kumar selected this answer as the correct answer

1 vote

Comments

 Hi Ian,


I tried creating Requirement collection with artifactformat value as "Module".But by default the value get set to "Collection".

Is there any way I can create Module Artifact through OSLC lyo Java client 

Hi Amit
no, I'm afraid the HTTP API doesn't support Module creation.This is something we're hoping to address in upcoming work.  You can track this at OSLC API for modules (67748).

regards
-ian


2 other answers

Permanent link
Have you checked the sample code, namely org.eclipse.lyo.client/org.eclipse.lyo.client.java.sample/src/main/java/org/eclipse/lyo/client/oslc/samples/RRCFormSample.java? The related code is shown below.

    //Get Feature Requirement Type URL
    ResourceShape featureInstanceShape = RmUtil.lookupRequirementsInstanceShapes(
            serviceProviderUrl, OSLCConstants.OSLC_RM_V2,
            OSLCConstants.RM_REQUIREMENT_TYPE, client, "Feature");
......
    if (( featureInstanceShape != null ) && (requirementFactory != null ) ){

        // Create REQ01
        requirement = new Requirement();
        requirement.setInstanceShape(featureInstanceShape.getAbout());
        requirement.setTitle("Req01");


0 votes

Comments

 Hi Nong, thanks for your prompt response.

Above method only guarantee that requirement "Artifact Type" value is set correctly.
What i am interested is in how to set value of " Artifact Format".
By default sample code set the value of "" Artifact Format" to "Text".
I tried putting following code but no luck.
URI formatURI=URI.create("https://server:port/rm/types/_s8WhgWynEeWNWa-3-YEVeg#Storyboard");
requirement.getExtendedProperties().put(RMConstant.PROPERTY_ARTIFACT_FORMAT,formatURI);

but this value not getting persisted.

Oh sorry, must have misread what was required. When using OSLC, I think you can only use the "TEXT" Artifact Format, no? "Storyboard" (and other similar types) artifacts are graphical artifacts, and you can only create a placeholder at best. Or is this exactly what you are trying to do?

 Hi Nong ,


We do have use case to create requirement with correct value of Artifact Format through lyo java client.Is this the limitation with OSLC ?. if   so  then do we have any other rest API available which will help me to populate artifact format value other then default.


Permanent link

Hi, Adding existing artifact from one module to another. Have you achieved this by any chance. Please let me know.
Thanks
Vaibhav

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

Question asked: Mar 11 '16, 12:58 a.m.

Question was seen: 3,317 times

Last updated: Nov 14 '17, 6:50 a.m.

Confirmation Cancel Confirm