Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



One answer

Permanent link

 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.

0 votes

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. 

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,700

Question asked: May 08 '19, 8:29 a.m.

Question was seen: 3,043 times

Last updated: May 08 '19, 10:32 a.m.

Related questions
Confirmation Cancel Confirm