It's all about the answers!

Ask a question

Can any code access RTC30 project configuration data


John Reysa (8856) | asked Mar 04 '11, 9:32 a.m.
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



permanent link
Thomas Yu (45183) | answered Mar 07 '11, 12:03 a.m.
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.


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).

permanent link
Jared Burns (4.5k29) | 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);

IProcessConfigurationData config = serverProcess.getProjectConfigurationData(id);


There is also a corresponding client API:
IProcessClientService processClient = IProcessClientService.getClientProcess(processArea, monitor);

IProcessConfigurationData config = processClient.getProjectConfigurationData(id, monitor);


Hope that helps,
- Jared

permanent link
John Reysa (8856) | answered Mar 08 '11, 1:53 p.m.
Thomas and Jared, thanks for the reply. I'll check it out and post back.

permanent link
John Reysa (8856) | answered Mar 30 '11, 3:39 p.m.
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>

<extension point="com.ibm.team.process.service.configurationPoints">
<staticConfigurationData categoryId="com.ibm.hdwb.jfs.configuration.hdwb"
id="com.ibm.hdwb.jfs.configuration.staticHdwbProjectConfigurationData"
name="HDWB Project Configuration Data"
schema="schema/hdwbProjectConfiguration.xsd">
</staticConfigurationData>
<category
id="com.ibm.hdwb.jfs.configuration.hdwb"
name="HDWB Configuration">
</category>
</extension>
</plugin>


The schema that it references is the following:
<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://com.ibm.hdwb.jfs.configuration/hdwbProjectConfiguration"
targetNamespace="http://com.ibm.hdwb.jfs.configuration/hdwbProjectConfiguration"
xmlns:process="http://com.ibm.team.process"
attributeFormDefault="unqualified" elementFormDefault="qualified">

<xsd:import namespace="http://com.ibm.team.process"
schemaLocation="platform:/plugin/com.ibm.team.process.common/schema/ProcessSettings.xsd"/>

<xsd:complexType name="hdwbProjectConfiguration">
<xsd:complexContent>
<xsd:restriction base="process:configurationDataType">
<xsd:attribute name="hdwbProjectLocation" type="xsd:string" use="required"/>
<xsd:attribute name="hdwbProfileLocation" type="xsd:string" use="required"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>

<xsd:element name="configuration-data" substitutionGroup="process:configuration-data" type="hdwbProjectConfiguration"/>
</xsd:schema>


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?

permanent link
Jared Burns (4.5k29) | 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);

But when I specify the id from my custom configuration data using the staticConfigurationData extension, it returns null:


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

permanent link
John Reysa (8856) | answered Apr 10 '11, 4:32 p.m.
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?

permanent link
John Reysa (8856) | answered Apr 11 '11, 11:42 a.m.
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


Register or to post your answer.