It's all about the answers!

Ask a question

How do I use the more basic value provider in RTC 3.0?


Robert Stawicki (5842) | asked Oct 27 '10, 2:26 p.m.
The RTC doc for attribute value providers indicates how to use default and value SET providers. It seems to omit the simpler value provider. We are looking at developing our capability using RTC 3.0.
https://jazz.net/wiki/bin/view/Main/AttributeValueProviders#

I have a situation where I have 2 enums - 1 is a "code" (ex AB), the other is a basic "keyword" based on that code (ex ABEND). If the user selects a code, I want to update the keyword attribute to reflect this selection.

I have the keyword "dependsOn" the code attribute, so it listens for changes. The samples include the value SET provider, which would be to filter the enum choices based on a selection, but I only need 1 value set. Also the doc mentions a mapping element, but there are no details (perhaps it is the same as filterMap?). I'm not even sure what elements I should be using.
Also, what is the value provider "providerId" I should use? The value SET providerId from the doc is
com.ibm.team.workitem.common.internal.attributeValueSetProviders.FilteredValueSetProvider.
Should it use the same?


I am on RTC 3.0 RC0 beta at the present. These are the definitions I am considering.


<configuration-data xmlns="http://com.ibm.team.workitem/providers" id="com.ibm.team.workitem.configuration.providers">
<valueProviders>
<!--
Handle symptom keyword set upon symptom code update
-->
<valueProvider id="APAR Symptom Keyword Derived From Symptom Code" providerId="com.ibm.team.workitem.common.internal.attributeValueProviders.FilteredValueProvider" name="APAR Symptom Keyword Derived From Symptom Code">
<!-- [configuration here] -->
<mapping dependentEnumeration="com.ibm.sport.rtc.workItem.attribute.apar.symptomKeyword"
sourceEnumeration="com.ibm.sport.rtc.workItem.attribute.apar.externalSymptomCode" name="externalSymptomCode" type="com.ibm.sport.rtc.workItem.enumeration.apar.externalSymptomCode">
<!-- ABEND -->
<value content="com.ibm.sport.rtc.workItem.enumeration.apar.externalSymptomCode.literal.l1">
<literal id="com.ibm.sport.rtc.workItem.enumeration.apar.symptomKeyword.literal.l2"/>
</value>
...etc ...
</mapping>
</valueProvider>
</valueProviders>
</configuration-data>

... later in the attribute definition ...

<attributeDefinition id="com.ibm.sport.rtc.workItem.attribute.apar.symptomKeyword" name="symptomKeyword" type="com.ibm.sport.rtc.workItem.enumeration.apar.symptomKeyword">
<dependsOn id="com.ibm.sport.rtc.workItem.attribute.apar.externalSymptomCode"/>
<valueProvider providerId="APAR Symptom Keyword Derived From Symptom Code"/>
</attributeDefinition>

2 answers



permanent link
Robert Stawicki (5842) | answered Nov 01 '10, 1:01 p.m.
On a related note, what is the magical "incantation" that will work with value SET providers in 3.0?

The doc describes using a filterMap element, but that it is depricated to "mapping" in 3.0. When I try "mapping", I see in my logs an error that it is expecting a "filter" attribute to be configured. I'm just testing this out at the moment, but would like to know the correct way to do this in 3.0.
I do have a dependsOn along with the valueSetProvider specified, which seem to fire off, as it is giving me the errors with the specification within the valueSetProvider definition.

This is a sample using filterMap, which still indicates the "filter" error. I really want to use valueProvider, and am just trying out the valueSetProvider for grins. But even that is not working.

<configuration-data xmlns="http://com.ibm.team.workitem/providers" id="com.ibm.team.workitem.configuration.providers">
<valueSetProviders>
<!--
Handle symptom code set upon symptom keyword update
-->
<valueSetProvider id="Set APAR Symptom Code Derived From Symptom Keyword"
providerId="com.ibm.team.workitem.common.internal.attributeValueSetProviders.FilteredValueSetProvider"
name="Set APAR Symptom Code Derived From Symptom Keyword">
<!-- [configuration here] -->
<filterMap dependentEnumeration="com.ibm.sport.rtc.workItem.attribute.apar.externalSymptomCode"
sourceEnumeration="com.ibm.sport.rtc.workItem.attribute.apar.symptomKeyword">
<!-- ABEND -->
<value content="com.ibm.sport.rtc.workItem.enumeration.apar.symptomKeyword.literal.l2">
<literal id="com.ibm.sport.rtc.workItem.enumeration.apar.externalSymptomCode.literal.l1"/>
</value>
...etc... </filterMap>
</valueSetProvider>

</configuration-data>
...
attribute def'n ...

<attributeDefinition id="com.ibm.sport.rtc.workItem.attribute.apar.externalSymptomCode" name="externalSymptomCode" type="com.ibm.sport.rtc.workItem.enumeration.apar.externalSymptomCode">
<dependsOn id="com.ibm.sport.rtc.workItem.attribute.apar.symptomKeyword"/>
<valueSetProvider providerId="Set APAR Symptom Code Derived From Symptom Keyword"/>
</attributeDefinition>


permanent link
Robert Stawicki (5842) | answered Nov 02 '10, 10:29 a.m.
For some reason I thought I had to manually define these in the process config XML, and there was no UI support. I just tried it from the 3.0 UI for "Value Sets" attribute customization in the process config, and got the filter "mapping" working. It uses a "mapping" tag in the same fashion as the filterMap. I didnt see it at first, because I thought it changed the value (had Value Provider / Calculated Values on the brain), and it simply filters the available choices (as expected).

The "Value Provider" I believe is the Calculated Values attribute customizer in the UI. I'll have to look at the doc again and figure out how that applies. This is the one that I beleive has to be done manually in the XML.

Your answer


Register or to post your answer.