Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

To get the operation id programmatically: RTC process configuration source

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">

0 votes



3 answers

Permanent link
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.


0 votes


Permanent link

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">

0 votes

Comments

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

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">

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,117

Question asked: Mar 25 '15, 5:04 a.m.

Question was seen: 4,619 times

Last updated: Mar 25 '15, 7:01 a.m.

Confirmation Cancel Confirm