creating a Project Association programmatically does not create link back
![]()
In RTC, when creating Project Associations programmatically using the Java client API, it does not create the link back.
The Association is successfully created in RTC, but the correspondent Association is not created in the other system. In this case, RQM. The funny thing is, deleting the project association in RTC will display a error: 'Failure to delete back links'
If we create the association manually, the link back is created. And no error will be displayed when deleting it.
My thoughts:
- I expected the same behaviour in the API than in the RTC client. To a strict observer, it may look like we can corrupt RTC by using the API.
- I guess we need to create the corresponding link back in RQM to set up the association successfully. I was wondering if somebody can point me to an example or a section in the RQM OSLC API.
Thank you.
|
Accepted answer
3 other answers
![]()
I don't have experience in using Java API but OSLC API to add a link won't create a back link automatically and you will need to create a back link manually or using OSLC API as well. There are some good reference in this blog for RQM API:
http://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/ Comments Thank you all for your responses,
but Ralph, Don, I'm afraid that is not what I was asking about.
We are not trying to automate the creation of links between artifacts, but to automate the creation of the Project Associations themselves (Project Area setup).
I have been looking for this in the RQM OSLC and REST APIs without luck.
I guess the only option is, as Sam says, to read the source code. But I guess that can be a daunting task.
In any case, thank you all for your help. I understand this was a tricky question.
1
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
My naive assumption is that the same restrictions apply to creation of these references. Especially because I have seen the same issue with deleting links in the past and it happened to be a link that was created the wrong way (with the wrong location information) which resulted in a URL that was equivalent to the other in the UI, but apparently not for the application.
|
![]()
Ralph Schoon (62.7k●3●36●43)
| answered Dec 02 '14, 4:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please also refer to this post: https://rsjazz.wordpress.com/2013/11/06/creating-clm-links-with-back-link/ this is about work item CLM links.
If you use the RTC Java API, you need to understand that there are also various ways how to create the links e.g. for work items. Different link types require different information to allow linking. If the links are of a wrong format you will experience problems with links not showing up on one end or with errors when trying to delete the links. It is important to figure out which format the links on both ends have and to recreate that format when creating them with the API. |
![]()
@danchirillo, please have a look at below code. Feels like ages since I did this. In the end, I created the backlink using also the RTC Java API to avoid using dodgy internal code. See below:
//Create the backlink RQM -> RTC
//Create the link RTC -> RQM
|
Comments
>I expected the same behaviour in the API than in the RTC client.
but you don't know what the RTC client actually did when you requested this action. it might have called 50 apis.
you could find and read the source code to know exactly. all the source is in the SDK download for each release.