It's all about the answers!

Ask a question

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

Amit Kumar (386) | asked Mar 11 '16, 12:58 a.m.
 how do i set the value of attribute ArtifactFormat while creating requirement in lyo client project.

Accepted answer

permanent link
ian green (16314) | answered Mar 15 '16, 7:07 a.m.
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.


Amit Kumar selected this answer as the correct answer

Amit Kumar commented Apr 01 '16, 7:50 a.m.

 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 

ian green commented Apr 05 '16, 2:04 p.m.

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).


2 other answers

permanent link
Donald Nong (14.3k211) | answered Mar 11 '16, 4:47 a.m.
Have you checked the sample code, namely org.eclipse.lyo.client/ 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();

Amit Kumar commented Mar 11 '16, 5:49 a.m.

 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");

but this value not getting persisted.

Donald Nong commented Mar 13 '16, 8:15 p.m. | edited Mar 13 '16, 8:28 p.m.

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?

Amit Kumar commented Mar 15 '16, 12:56 a.m.

 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
Vaibhav S (635) | answered Nov 14 '17, 6:50 a.m.

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

Your answer

Register or to post your answer.