How can I stop an RTC Value Provider with no value to return from reporting an error
Using RTC 3.0.1.3, I have a value provider that records the date when a work item changes its state to "In Progress". The field it updates is dependent on "Status". It is working fine, but I am getting:
Error invoking value provider 'lbg.valueproviders.inProgressDateProvider'
The error occurs when I have no value to return, e.g. when the work item is created or when it first enters the "New" state. I can avoid the error when the state changes to "Done" by returning the current value.
How can I avoid the error? I have ten similar value providers and it doesn't look good to the customer to have dozens of entries in the Error Log
Error invoking value provider 'lbg.valueproviders.inProgressDateProvider'
The error occurs when I have no value to return, e.g. when the work item is created or when it first enters the "New" state. I can avoid the error when the state changes to "Done" by returning the current value.
How can I avoid the error? I have ten similar value providers and it doesn't look good to the customer to have dozens of entries in the Error Log
One answer
Sorry for the delay in getting back to you, Bill (yes, my vacation was lovely).
I tested this in 3.0.1.3 and I see the errors -- and the stack trace isn't very helpful.
When I test in 4.0, I still see the errors, but they now report a Null Pointer Exception -- which is largely accurate because you are returning a null from getValue() which may have a right to expect you to return something. I'm working on clarifying the actual requirements (i.e., should you be expected to return a non-null value) and how we should better handle this on our end -- dumping an exception to the log doesn't seem particularly useful.
UPDATE: An error should not be getting thrown. I have filed a defect for the issue. https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=217542
Comments
Millard Ellingsworth
FORUM ADMINISTRATOR / JAZZ DEVELOPER Jun 19 '12, 6:15 p.m.Bill Taylor
Jun 20 '12, 4:14 a.m.Bill Taylor
Jun 21 '12, 3:57 a.m.