It's all about the answers!

Ask a question

To get the operation id programmatically: RTC process configuration source


Arjun Pande (3814) | asked Mar 25 '15, 5:04 a.m.

I am trying to access the id of the behavior tag (com.ibm.team.workitem.operation.workItemSave) programmatically of a particular Project Area. can anyone please help me with the interface to get the same.

Earlier we used IClientProcess interface to get access to the id of com.ibm.team.workitem.editor.configuration.presentations. The code we used to get this information is:

IClientProcess clientProcess = processClient.getClientProcess(
    masterOldProjectArea, null);
IProcessConfigurationData processConfig2 = clientProcess
    .getProjectConfigurationData("com.ibm.team.workitem.editor.configuration.presentations",
      null);

We need a small code to get the id of the operation behavior. Below is the tag for the same.

<behavior>
<role id="default">
<operation id="com.ibm.team.workitem.operation.workItemSave">
<preconditions>
<precondition description="Work items must be Filed Against a specific category and a Summary must be provided so that the team can quickly evaluate who is responsible for the issue." id="com.ibm.team.workitem.advisor.requiredProperties" name="Required Attributes For Type and State" xmlns="http://com.ibm.team.workitem/requiredProperties">
<properties workItemTypeCategory="com.ibm.team.workitem.workItemType">

3 answers



permanent link
Arjun Pande (3814) | answered Mar 25 '15, 7:01 a.m.

When I try to access the id of the configuration data from the process configuration source, I am able to get access to the id from the following code.

IClientProcess clientProcess = processClient.getClientProcess(
    masterOldProjectArea, null);
IProcessConfigurationData processConfig2 = clientProcess
    .getProjectConfigurationData("com.ibm.team.workitem.editor.configuration.presentations",
      null);

I am able to save the id of the "com.ibm.team.workitem.editor.configuration.presentations" in a String. In the same way i want to access the id of the operation behavior tag using RTC API's. And I want to read the below operation behavior tag.


<behavior>
<role id="default">
<operation id="com.ibm.team.workitem.operation.workItemSave">
<preconditions>
<precondition description="Work items must be Filed Against a specific category and a Summary must be provided so that the team can quickly evaluate who is responsible for the issue." id="com.ibm.team.workitem.advisor.requiredProperties" name="Required Attributes For Type and State" xmlns="&lt;a href=" http:="" com.ibm.team.workitem="" requiredProperties"="">http://com.ibm.team.workitem/requiredProperties">
<properties workItemTypeCategory="com.ibm.team.workitem.workItemType">


permanent link
Arjun Pande (3814) | answered Mar 25 '15, 5:15 a.m.

Thanks for the quick reply. I want to know the RTC API's which is used to get the id of the operation tag (com.ibm.team.workitem.operation.workItemSave) programmatically. When I try to get access the id of the configuration data, I am able to do via ProcessClientService (which I mentioned above).

I need RTC API or the logic where we can programmatically get the id of the behavior tag so that we can store in a string.

The bold xml we need to store it in a string and for that we need RTC API's

<behavior>
<role id="default">
<operation id="com.ibm.team.workitem.operation.workItemSave">
<preconditions>
<precondition description="Work items must be Filed Against a specific category and a Summary must be provided so that the team can quickly evaluate who is responsible for the issue." id="com.ibm.team.workitem.advisor.requiredProperties" name="Required Attributes For Type and State" xmlns="&lt;a href=" http:="" com.ibm.team.workitem="" requiredProperties"="">http://com.ibm.team.workitem/requiredProperties">
<properties workItemTypeCategory="com.ibm.team.workitem.workItemType">


Comments
Ralph Schoon commented Mar 25 '15, 5:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Please see my refined answer above.

I am still not sure what you try to achieve.

The operation ID's are defined in the Extension mechanism and are constant. They can be found in Extension Points and Operation ID’s. The process configuration editor reads the extension points and the registered operations to provide them.

There is no public API in RTC to process data from the XML process configuration document. Eclipse comes with various XML libraries that you can use to read and parse XML documents.


permanent link
Ralph Schoon (63.7k33647) | answered Mar 25 '15, 5:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 25 '15, 5:15 a.m.
I am not sure what ID you want to retrieve. If you need the operation ID's that are used in creating custom advisors/participants, that ID is independent of the project area and not available in that context.
See: https://rsjazz.wordpress.com/interesting-links/ especially Extension Points and Operation ID’s.

If this is not what you are looking for, please provide more information. Please also note, the process configuration is ultimately an XML document and you can use XML tools to read its content. There are no public RTC API's to get to details in there. RTC internally uses XML tools to do so.

If you are looking at how to get

&lt;precondition description="..." id="com.ibm.team.workitem.advisor.requiredProperties" name="..."&gt;

You would use XML tools such as XPath to locate the node and get to the attribute value.


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.