Can any code access RTC30 project configuration data
We are extending the RTC30 client. Part of our custom code requires some configuration data. One example might be the location of our simulation test repository. So it's nothing related to the process.
It appears you can extend the configuration using extensions for the configuration data (i.e. com.ibm.team.process.service.configurationPoints). Question: Is it possible to for any code to access the project area's configuration? We would want the client code to have access at any time ... not necessary as part of a server operation like saving a defect. Some of my reading (https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide) appeared to indicate only code that extended IOperationAdvisor could access the configuration data. |
7 answers
We are extending the RTC30 client. Part of our custom code requires some configuration data. One example might be the location of our simulation test repository. So it's nothing related to the process. Another way that you can get configuration data information is via the ProcessService, chich has a getConfigurationElements method and getServerProcess method(IServerProcess has a get getProjectConfigurationData method). |
Jared Burns (4.5k●2●9)
| answered Mar 08 '11, 11:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Question: Is it possible to for any code to access the project area's configuration? We would want the client code to have access at any time ... not necessary as part of a server operation like saving a defect. You can access configuration data on either the client or the server. Thomas is right about the server API: IServerProcess serverProcess = IProcessServerService.getServerProcess(processArea); There is also a corresponding client API: IProcessClientService processClient = IProcessClientService.getClientProcess(processArea, monitor); Hope that helps, - Jared |
Thomas and Jared, thanks for the reply. I'll check it out and post back.
|
Thomas and Jared, I was able to use the client api to get an existing work item configuration data:
IProcessConfigurationData config = processClient.getProjectConfigurationData("com.ibm.team.workitem.configuration.workItemTypes", monitor); But when I specify the id from my custom configuration data using the staticConfigurationData extension, it returns null: IProcessConfigurationData config = processClient.getProjectConfigurationData("com.ibm.hdwb.jfs.configuration.staticHdwbProjectConfigurationData", monitor); On the server side, the plugin.xml that was generated from using the extension point is: <plugin> The schema that it references is the following: <?xml version="1.0" encoding="UTF-8"?> When I open the project, the ProcessConfiguration tab shows the ProjectConfiguration->ConfigurationData->HDWB Configuration->HDWB Project Configuration Data (unconfigured). So my category and staticConfigurationData extensions are showing. I'm guessing the null pointer is because it is showing as unconfigured. How do I configure the values and should the editor be able to show the two string values for editing? |
Jared Burns (4.5k●2●9)
| answered Apr 05 '11, 5:05 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Thomas and Jared, I was able to use the client api to get an existing work item configuration data:IProcessConfigurationData config = processClient.getProjectConfigurationData("com.ibm.team.workitem.configuration.workItemTypes", monitor); Looks like everything is working as expected so far. The API you're calling returns to you the configuration that exists in the Process XML. If there's no configuration, the API returns null. To test, you can manually provide some XML configuration in the "Process Configuration Source" tab. For real users, you would probably want to provide a GUI editor for your configuration data. There is an Eclipse client extension point for this. See https://jazz.net/wiki/bin/view/Main/ProcessAspectEditorCreation - Jared |
Jared, thanks.
I manually entered some XML configuration data as you suggested and proved I could read it from the client. In addition, I went through the link you sent me and I've got at least a start of an editor that is brought up when I select my custom attribute. One other question: I've been stepping through code in the "Work Items -> AttributeCustomization" to model my custom configuration code after what you are doing. However, I noticed code related to AttributeValueProvider descriptors, registry, and IValueProvider interfaces. I also read http://jazz.net/library/article/537. It appears the article only applies to workItem customization. If that is true, is there some other documentation or interface I should follow to handle getting values from my IConfiguration? |
I also noticed that when I want to use the AspectEditor to create a configuration, I get an access restriction when trying to create a ProcessConfigurationElement. Is there an external api to add elements the configuration?
|
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.