RTC Plain Java API is throwing com.ibm.team.workitem.common.model.MultiStaleDataException: Stale Data
Hi Team,
We are trying to resolve the workitem through RTC Plain Java API, but the code throws MultiStaleDataException.
Please help us with the code snippet to refresh the workitem and resolve it (OR) What is the procedure to resolve this exception ? Please share the code snippet.
Exception StackTrace:
com.ibm.team.workitem.common.model.MultiStaleDataException: Stale Data
at com.ibm.team.workitem.common.internal.util.Utils.checkSaveResult(Utils.java:270)
at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.saveWorkItems(WorkItemWorkingCopyRegistry.java:2331)
at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.saveAffected(WorkItemWorkingCopyRegistry.java:2213)
at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.save(WorkItemWorkingCopyRegistry.java:2096)
at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.save(WorkItemWorkingCopyRegistry.java:2057)
Following is code snippet throwing the exception:
workflowOperation.run(workItem, null);
Thanks in advance.
|
One answer
I think the exception is being caused because the work item you are referencing has already been updated from a previous change and you are still referencing the old work item.
Comments
Shwetha G
commented May 30 '23, 2:05 a.m.
How to get the fresh working copy of the workitem ?
IWorkItem workItem = workItemClient.findWorkItemById(workItem1.getId(), IWorkItem.FULL_PROFILE, null);
is not working. Still throwing the same error. Thanks
|
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.