It's all about the answers!

Ask a question

Errors when saving work items by code (follow up - participant)


Carlos Benavides (132) | asked Jun 21 '17, 1:24 p.m.

Hi guys,

I will try to explain this situation. I have a participant which is activated when I save a work item (child). This participant gets some attribute values from it's parent and sets them to the child (the work item which is saving). At the end of the code I have this:

fWorkItemServer.saveWorkItem2(workItem_workingCopy, null, null);

But it's showing this error (I could not upload the image because of a forum policy):


Error running operation 'Saving Work Item'

java.lang.StackOverflowError
java.lang.StackOverflowError



I tried with saveWorkItem2 and saveWorkItem3 but it's the same. And when I remove this line of code it doesn't show any error but the work item doesn't save the new values on it's fields.

I know this could be because when I save the work item the code saves it over and over again because it's always calling the participant but I need to know how to avoid this loop and keep the values ​​that should be saved.

Could you please help me how to solve it?

Thank you!

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered Jun 21 '17, 2:34 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 See https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ for how to use additional save parameter to avoid recursion.

Carlos Benavides selected this answer as the correct answer

Your answer


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