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 (38419) | 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 (17814) | answered Mar 15 '16, 7:07 a.m.
JAZZ DEVELOPER
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

Comments
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.
JAZZ DEVELOPER

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
Donald Nong (14.5k614) | answered Mar 11 '16, 4:47 a.m.
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");



Comments
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");
requirement.getExtendedProperties().put(RMConstant.PROPERTY_ARTIFACT_FORMAT,formatURI);

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 (106354) | 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.
Thanks
Vaibhav

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.