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

Why can't I see oslc links added to a requirement through the api on a view?

I have written some Java code to add links to requirements artifacts that already exist in the project.  The links are created internally which I understand didn't work before but looks to have been added as an enhancement for version 5.  I am on 502

The code works successfully to add a "Elaborates/Elaborated By Link"  between requirement types x & y.

The code updates the xml for req x.

I can see this in the tool when I open up req x, I see a "Elaborates" link to req y.  I open req y and can see req x linked using "Elaborated By".   So the directional link is working.

I set up a view to show req x with a column for "elaborates" and req y is shown with the id and title of the requirement so all appears well.  When I set up a view for req y with a "Elaborated By" column, nothing appears in the column.

It's strange as it appears when req y is opened.

The other odd thing I can now see is that there are two link types for "Elaborates/Elaborated By".  i.e. I have two choices for "Elaborates" if trying to apply a filter to requirements.   I can also see this in the "Link Types" page in the project properties.

Is this even possible?  Do I need to add the reverse link to get it to work?



0 votes



3 answers

Permanent link
Hi Matthew,
The behaviour you described here looks normal. RDNG does not create bidirectional links. However, when you navigate to either x or y requirement URL you see the relationship to each other. This is possible because RDNG queries on the fly all the service providers associated a given project in order to fetch and show all the links in the links widgets.
For exemple,  you could try with Design Manager. Make few links to a requirement. Then fetch the RDF representation of this requirement using a REST plugin (I use POSTER with Firefox or Chrome). You will NOT see the link to the Model element in RDM despite this link is displayed in an Internet browser.
I hope it helps.

Best regards,
JLJ

1 vote

Comments

I need this to link between specific requirement artifacts e.g. Business requirement and a funcitonal requirement. 

I tried adding the bidirectional link and the same issue persisted so I can't see the reverse link in the view.


Permanent link
Hi,   You do not have to add the reverse link for RDNG ( RM) defined links ( that is only needed for cross app links like ValidatedBy ).
Having two link types with same ( or similar names is odd ) try by adding both link types in the grid and verify that your link appears.

Best Regards.

0 votes

Comments

Even though I am just adding the elaborates link from x to y, I can see elaborated by (the opposite link) from y to x if I open the artifact.  I cannot see this however on the view I have set up?  Is this what you would expect to happen?

http://open-services.net/bin/view/Main/RmSpecificationV2

Which link types from the list on the link above are best for adding programmatically to internal rm artifacts.  I can work with any just need to be consistent?


Permanent link
I can see the same behavior and I believe this is due to the choice of link type. The "Elaborates / Elaborated By" is a standard OSLC one, and should be used in integration between RDNG and Focal Point only. OSLC links are considered "external" if I'm not mistaken, and should be recorded in the affected RNDG artifacts regardless the link direction. By saying that, it appears that you need to put the link of the opposite direction in "req y". But...RNDG should normally have one direction of OSLC links only. For example, if an RDNG requirement has an "Elaborates" link to a Focal Point artifact, the "Elaborated By" link is in Focal Point, not RDNG. I don't know whether there are any ill effects if you put both direction of the OSLC links in RDNG.
For "internal" links (for example those in the namespace http://www.ibm.com/xmlns/rdm/types/), only one direction is recorded in the artifacts.
My advice would be avoid using the links this way.

0 votes

Comments

Even though I am just adding the elaborates link from x to y, I can see elaborated by (the opposite link) from y to x if I open the artifact.  I cannot see this however on the view I have set up?  Is this what you would expect to happen?

http://open-services.net/bin/view/Main/RmSpecificationV2

Which link types from the list on the link above are best for adding programmatically to internal rm artifacts.  I can work with any just need to be consistent?

On second thought, I believe the behavior is by design and probably for performance consideration, regardless what link type you choose. When you add a bidirectional link to an artifact, a property with the link type is added to the "subject/source" artifact, and a separate link relationship "subject-predicate-object" is also recorded. When you open the "object/target" artifact, the link relationship is queried, and all links, whether the current artifact is the subject or the object, are shown. In a view, I believe the link relationship is not queried, as it can be done only in a one-by-one way, and will be very slow. I believe only the "property" part is read and displayed.
If you think the behavior should be changed, an RFE is probably the best way.

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,944
× 516
× 480
× 139
× 137
× 60

Question asked: Jul 20 '15, 11:41 a.m.

Question was seen: 6,696 times

Last updated: Aug 02 '15, 8:46 p.m.

Confirmation Cancel Confirm