It's all about the answers!

Ask a question

How to have script based attribute customizations work from a Plain Java API based program?


Jamie Berry (14014196) | asked Aug 30 '13, 12:47 p.m.
I am working on a Plain Java API based application to create/manipulate work items.  These work items have Attribute Customizations using Script Based calculated value providers and possibly default value providers.  When I run the application, I receive the following message:

Value provider not found: com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider

Does anyone know what I need to do in order to make the value provider found so the value provider logic will run?

Thanks,

Jamie.

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Dec 16 '16, 8:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Dec 16 '16, 8:54 a.m.
Attribute Customization only works
- In the Web UI
- In the RTC Eclipse Client

Attribute customization does not work in Java API Clients for all I know.
Ralph Schoon selected this answer as the correct answer

3 other answers



permanent link
Rosa Naranjo (2.9k11723) | answered Aug 30 '13, 1:53 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
 Hello
There is a Lab 5 in this workshop that deals with this topic:  https://jazz.net/library/article/1093/

You also may want to check the posts in this blog:  http://rsjazz.wordpress.com/

Comments
Jamie Berry commented Aug 30 '13, 3:04 p.m.

Thank you for your reply, but I must be missing something.  The workshop goes into how to setup a script based value provider, but I already have that down.  My script based value provider works for me when I make changes to the work item inside of Eclipse or the Web.  The problem I am having is that I get an error when I try running a Java application built with the plain Java API and the value provider doesn't run.  From what I have read on the plain Java API, it sounds like I am missing some JAR file that contains the com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider  class.  I have verified that I have the com...internal.jar in my classPath, but if I look into that JAR, I don't see the internal.valueProviders.ScriptAttributeValueProvider class anywhere.  I even looked around in my Eclipse Java libraries and I haven't found it.  So, I am stuck trying to find out how to have the script based value providers be operational while manipulating work items from a plain Java based application.  Is this even possible?

Thanks,
Jamie.


permanent link
Javier Paez (4616) | answered Dec 16 '16, 8:24 a.m.
edited Dec 16 '16, 9:19 a.m.
The Lab5 of the Workshop Process Enactment Workshop doesn't explain to manage the WI that have Script based calculated attributes with the Plain Java API.

I've created the WI type "Technology Review" and the script based calculated attribute "TotalCostScriptedCalculatedValue" accoring with the Workshop. Then When I've tried to create a new WI with a script that use the Plain Java API, I've got this error:

[ERROR] [com.ibm.team.workitem.common] - Value provider com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider for Total Cost not found

Please could you help to me with the Error?

The PA source code shows this definition of the attribute:
                <valueProviders>
                    <valueProvider id="com.ibm.team.workitem.valueproviders.VALUE_PROVIDER._23LYULexEeardfzaH8hOdg" name="TotalCostScriptedCalculatedValue" providerId="com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider">
                        <script class="com.acme.providers.script.TotalCostScriptedCalculatedValue" path="/workitem/scripts/common/TotalCostScriptedCalculatedValueProvider.js"/>
                    </valueProvider>
                </valueProviders>


permanent link
Javier Paez (4616) | answered Dec 16 '16, 9:55 a.m.
Hi Ralph,

I've opened this RFE to do away with this limitation of the Plain Java API of RTC:
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=98705

Please feel free to review the RFE to get that it will be triage asap.

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.