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

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

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!

0 votes


Accepted answer

Permanent link

 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

0 votes

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
× 10,926

Question asked: Jun 21 '17, 1:24 p.m.

Question was seen: 809 times

Last updated: Jun 21 '17, 2:34 p.m.

Confirmation Cancel Confirm