It's all about the answers!

Ask a question

Custom RTC plug-in not loaded when adding com.ibm.team.*.client dependency to manifest.inf


Michael A. (15813) | asked Oct 16 '13, 12:13 p.m.
We are currently developing custom RTC plug-ins to realize custom work item save operations.

If I add service and common dependencies to manifest.inf everything works fine. I can add action (IOperationAdvisor) as  a Precondition for "Save Work Item (server)".

As soon as I add a single com.ibm.team.*.client dependency the plug-in is not listed in the Preconditions anymore. Does anyone have an idea why? To my understanding I need the client libraries to access custom attributes (IWorkItemClient).

Require-Bundle: com.ibm.team.workitem.common;bundle-version="3.1.800",
 com.ibm.team.workitem.service;bundle-version="3.1.600",
 com.ibm.team.workitem.service.process;bundle-version="3.1.400",
 com.ibm.team.process.common;bundle-version="1.2.2000",
 com.ibm.team.process.service;bundle-version="1.2.2000",
 com.ibm.team.repository.common;bundle-version="1.3.2000",
 com.ibm.team.repository.service;bundle-version="1.2.2000",
 com.ibm.team.workitem.client;bundle-version="3.1.600",
 com.ibm.team.process.client;bundle-version="1.2.2000",
 com.ibm.team.repository.client;bundle-version="1.2.2000"

Would be great if someone could help me with that issue.

Thanks
Michael

Accepted answer


permanent link
Ralph Schoon (63.4k33646) | answered Oct 16 '13, 12:22 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can' add a Client Library dependency to a server side extension, which I assume you are doing. You have to use the server API instead. There are several examples here: https://rsjazz.wordpress.com/
All should mention which APi they use. On the server you can use WorkItemCommon and WorkItemServer. See for example https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ as opposed to the client API in https://rsjazz.wordpress.com/2012/10/01/adding-approvals-to-work-items-using-the-plain-java-client-libraries/

Search for work item on the blog for more examples.
Michael A. selected this answer as the correct answer

Comments
Michael A. commented Oct 16 '13, 2:48 p.m.

Thank's Ralph for your reply. You are right - I got confused with the libraries. It's good to have the Create Approval Sample Source Code here so that I can dig into that sample and adapt it to what I need. Great Job.


Michael A. commented Oct 17 '13, 3:04 a.m.

After further investigations I saw that the "Create approval work item save participant" server extension depends on client extensions too. When trying to load the plugin to RTC 4.0.4 exactly the same happens as with my previous experiment - the "Follow-up action" is not available. After removing the client dependencies the action is available.


I also discovered an interesting phenomena regarding server startup up. If a plug-in requests a client dependency the server startup takes about 2.5 times longer than if all plug-ins only request server extensions. In my case this is an interesting indicator whether I included an invalid dependency or not.

Hope this helps some people to solve those problems.


Ralph Schoon commented Oct 17 '13, 3:09 a.m. | edited Oct 17 '13, 3:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Thanks for the feedback, I will try to find time to look into my code and remove dependencies that should not be there. The issue is, if you run on the SDK, you see client and server code and can potentially mix things up.

You would notice the issue only if you really deploy on a server environment.

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.