How to solve incompatible issue with com.ibm.team.workitem.common.model.IWorkItem
![]() Exception running followup action. An unhandled exception occurred during "Demo Prearticipant".
com.ibm.team.workitem.common.internal.SaveParameter incompatible with com.ibm.team.workitem.common.model.IWorkItem.
java.lang.ClassCastException: com.ibm.team.workitem.common.internal.SaveParameter incompatible with com.ibm.team.workitem.common.model.IWorkItem
|
One answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered May 08 '19, 8:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Check instanceof before cast and return if not. Also read How should I ask a question in the Forum if I want to receive useful answers? and follow in the future. Comments
here is my code where it need to be change ..please suggest
SaveParameter save = (SaveParameter) obj;
IAuditable audi = save.getNewState();
if((save.getAdditionalSaveParameters() == null ) || (save.getAdditionalSaveParameters() != null) && (!save.getAdditionalSaveParameters().contains(this.Recursion)))
{
if(audi instanceof IWorkItem)
{
IWorkItem work = (IWorkItem) obj;
IWorkItemServer serverWI = getService(com.ibm.team.workitem.service.IWorkItemServer.class);
}
}
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am not going to do your coding. I think I updated the latest RTC Extensions Workshop so that it is more reliable. Consider checking that code. |
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.