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
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);
}
}
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.