It's all about the answers!

Ask a question

RTC API - linking changesets to workitems on deliver - serverside


Zaid Al-Khishman (351115) | asked Jan 30 '15, 5:05 p.m.
edited Feb 02 '15, 11:55 a.m.
Hi,

I'm trying to link workitems to changesets in an operation participant on a deliver but I'm getting this problem:

Links of this type may only be modified by the defining component.
    Link Type: com.ibm.team.filesystem.workitems.change_set
    Defining Component: com.ibm.team.filesystem.workitems
    Requesting Component: testparticipant.extensionService2

using the method at https://jazz.net/forum/questions/82384/serverside-create-link-from-a-workitem-to-a-changeset

And when trying a different approach I ran into a very similar problem that looked something like this

Links of this type may only be modified by the defining component.
    Link Type: com.ibm.team.filesystem.workitems.change_set
    Defining Component: com.ibm.team.filesystem.workitems
    Requesting Component: com.ibm.team.workitem          

except I'm unsure about what the last line looked like. If it helps It was caused in the saveWorkItem2 method of the WorkItemServer class.

You can find the second method here:

rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/

From the looks of it I need to use a method in the 'Defining component' in order to the save the link. But I'm clueless as to how I would go about getting access to this component.

I tried the scm service

IScmService scmService = getService(IScmService.class);

but the CreateLinks method says that it is "experimental" when highlighted.

Any help is appreciated.

Thanks!.

RTC:4.0.7

One answer



permanent link
Ralph Schoon (63.1k33646) | answered Feb 02 '15, 3:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As described in https://rsjazz.wordpress.com/2014/12/03/creating-custom-link-types-for-rational-team-concert/ a component can request a link type to be exclusively usable by the defining component.

If you try to create that specific link type and the component ID you bind your extension to is not the one of that defining component, the API will refuse to create the link.

Comments
Zaid Al-Khishman commented Feb 02 '15, 12:02 p.m.

Hi Ralph,

"If you try to create that specific link type and the component ID you bind your extension to is not the one of that defining component, the API will refuse to create the link"

I'm doing this in an operation participant. Binding an extension to a component ID is either a new concept to me, or perhaps I'm just not used to the terminology.

So is there a service that I can use to create this link? How can I be explicit about the component to which I'm binding my extension service?


Ralph Schoon commented Feb 03 '15, 1:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Components are described in the Extension Workshop. See https://jazz.net/library/article/1000 . A component is basically a plugin that registers an ID. Other plugins declare the component they belong to using this ID.

Usually you declare your own component ID e.g. to be able to see your component got loaded. However, you can limit some operations to a component e.g. creation of links. In that case, if some extension does changes and that does not declare to be part of the component that is allowed to do changes, the changes are prevented.

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.