It's all about the answers!

Ask a question

RTC-ClearCase Bridge API ?


Arun Batra (14612427) | asked Jan 29 '12, 7:23 a.m.
Hi,
We wanted to use RTC for change management and CC for configuration management. Hence we considered a solution involving RTC-CC bridge. Using this, one can associate a UCM activity from the CC perspective to an RTC existing/new workitem.
But we wanted to perform a reverse action. For Example:
While inside a workitem we want to automatically lock/unlock an associated activity depending on the state of the workitem.

Hence the question: Is there ClearCase Bridge API available (or already provided in RTC's API) so that these actions can be performed programmatic-ally/manually?

If not is there a REST API for ClearCase which could be used alternatively?

I would be grateful if someone could point me in the right direction.

Thanks,
Arun

10 answers



permanent link
Yuhong Yin (25123) | answered Jan 30 '12, 8:28 p.m.
JAZZ DEVELOPER
Hello Arun,

First it is good that you are considering RTC-CC bridge - it does seem a right choice for you. Just curious, are you migrating from a ClearQuest-enabled UCM environment to a RTC-enabled CC/UCM environment?

As you mentioned, most of the RTC-CC operations are currently CC-driven - in other words, you can only initiate the integration use cases from the CC/CCRC side. We are considering to provide a more seamless RTC-CC integration with support of use cases from either sides.

Please read and comment on this related RTC story (and its child stories)
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/164043

To answer your questions,
- No, there is no CC Bridge API available today to accomplish what you want. You can consider adding RTC extensions which call into RTC Java APIs and ClearCase CM APIs (also a Java API) to implement this. However, it is not very easy.
- No, there is no REST API for clearcase today to do this.

Hope this helps and feel free to post additional questions or comments,

Yuhong

Yuhong Yin

ClearCase-RTC, ClearQuest-RTC Connectors Team
Email: yyin@us.ibm.com

permanent link
Arun Batra (14612427) | answered Jan 31 '12, 2:11 a.m.
Hi Yuhong,

Thank you for your quick reply.

Yes, we are migrating from a ClearQuest-enabled UCM environment to a RTC-enabled CC/UCM environment.

I did develop a solution to perform creation of a new UCM activity from an RTC workitem + performing the linkage once it is created + locking and unlocking actions on linked UCM activity using the CMAPI and RTC Java APIs. It is not so stable and it takes a lot of time to perform any action and hence I was hoping for an alternative. I guess we will continue to use this till a seamless integration is released.

But there is another issue which we need to solve desperately.
Every time I use the CMAPI (in the back-end) to perform an action on an activity, I have to provide a CC password. (For this we have used the E-signature attribute in the edtor presentation.)

Question 1:
I am in the RTC Client, I am connected to the RTC, I am connected to CC, is it possible to retrieve the current CC user and Password filled for the connection to CC?

If the answer to the above question is no,
Question 2:
Is is possible to retrieve the RTC username and password for the current user. (This can be a considerable workaround provided that the user has his/her CC password same as his/her RTC password.)

Thanks,
Arun

permanent link
Masabumi koinuma (46115) | answered Jan 31 '12, 4:50 p.m.
JAZZ DEVELOPER
Hello Arun,

It's probably not available to access CC userId/password that is used to access CCRC WAN server, but RTC-side is available with something like this ( I assume your solution is a client-side plugin) :
import com.ibm.team.repository.client.ILoginInfo2;

import com.ibm.team.repository.client.ITeamRepository;
import com.ibm.team.repository.client.TeamPlatform;
import com.ibm.team.repository.client.login.UsernameAndPasswordLoginInfo;

String repoURI; // something like 'https://yourhost.com/ccm'
ITeamRepository repo = TeamPlatform.getTeamRepositoryService().getTeamRepository(repoURI);
if (repo.loggedIn()) {
ILoginInfo2 loginInfo = repo.getLoginInfo();
String userId = loginInfo.getLoginProperties().getProperty(UsernameAndPasswordLoginInfo.USERNAME);
String password = loginInfo.getSecuredLoginProperties().getProperty(userId);
}


Masa Koinuma

permanent link
Arun Batra (14612427) | answered Feb 02 '12, 6:40 a.m.
Hello Masa,

Thanks for providing a solution. But we are writing a server side plug-in. How can this information be retrieved on the server end.

Regards,
Arun

permanent link
sam detweiler (12.5k6195201) | answered Feb 02 '12, 8:58 a.m.
The server side plugin does not run in the context of a 'user'. All actions are the same.

For my RemoteRepository server plugin, I had to create a special userid to connect with my remote system. I can pass the userid of the person CAUSING the change, but I cannot impersonate them (as I don't have, and can't get their password)..

Sam

permanent link
Arun Batra (14612427) | answered Feb 06 '12, 10:19 a.m.
Hi Sam,

Following the advice, I am now trying to implement a client side plug-in.

The Idea is: A client side operation advisor will fetch the password and fill it in an attribute. After this a server side operation advisor will run and read this attribute and use it to perform the CC stuff.

Question 1: Can the above solution be realized?

I tried to create a client side operation advisor for a work item save event.

extension id="cc.password.attribute.clientside.fill.client.extnid" point="com.ibm.team.process.client.operationAdvisors">

operationAdvisor class="cc.password.attribute.clientside.fill.client.AutoPassFillImpl" id="cc.password.attribute.clientside.fill.client.extnid" name="Auto Password Fill" operationId="com.ibm.team.workitem.operation.workItemSave">
</operationAdvisor>
</extension>


But when I save a workitem. I get the error that the plugin it not installed (I have checked "Fail If Not Installed").

Question 2: Is this happening because "com.ibm.team.workitem.operation.workItemSave" is a server side event?

If this is so then,
Question 3: Is there a client side event I can use for this idea. If not, How can I create a new client side event and event listener, What are the extension points I can/should use for realizing this?

I am sorry for asking so many questions at once but we desperately need to get a direction here.

Arun

permanent link
sam detweiler (12.5k6195201) | answered Feb 06 '12, 10:39 a.m.
com.ibm.team.workitem.operation.workItemSave is definitely server side.

I do not know if there are any client side operations, I do not think so..

I had to change the Eclipse client source code to implement a client side function we needed.. Not deployed, cause I cannot do the same function in a web client as I can in an Eclipse client.

Sam

permanent link
Masabumi koinuma (46115) | answered Feb 06 '12, 10:57 p.m.
JAZZ DEVELOPER
Hi Arun,

Just curious - how important is it for you to run 'lock' or 'unlock' command as the developer's account? If it is a server-side operation advisor, can you just store CC admin's account and password in a text file on the server host and run CC commands through CM-API as the admin account? You may wonder it would lose the information that 'who resolved this?', but it is traceable by RTC's work item, isn't it?

permanent link
Arun Batra (14612427) | answered Feb 07 '12, 1:29 a.m.
Hi Masabumi,

I could have used the solution you mentioned if I were only performing 'lock' and 'unlock' operations on a linked UCM activity. However, I am also creating a new UCM activity from inside of an RTC workitem and creating the required linkage. If I want the user to be able to see that newly created activity in his/her CC view, the creator of the activity has to be him/her. Hence I am lost.


Hi Sam,

We want this functionality to work only from the eclipse client.
In RTC eclipse client, there do exist client side operation listeners (such as com.ibm.team.scm.client.deliver and com.ibm.team.process.client.acceptTeamInvitation).
Question: Can't a new operation listener be created similar to the ones mentioned above. What would be required to be done to achieve this?

permanent link
sam detweiler (12.5k6195201) | answered Feb 07 '12, 6:32 p.m.
>Hi Sam,

We want this functionality to work only from the eclipse client.
In RTC eclipse client, there do exist client side operation listeners (such as com.ibm.team.scm.client.deliver and com.ibm.team.process.client.acceptTeamInvitation).
Question: Can't a new operation listener be created similar to the ones mentioned above. What would be required to be done to achieve this?
>

got no idea.. I suppose u could read the source code and figure out what they did, and see if u can replicate it.. knowing that it could change and u might be out of luck..

I am just another user, with no inside knowledge of the system (that I didn't get from reading the code)

Sam

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.