Plugin Participant fails when saveWorkItem2
Hi,
I want to create a plugin (IOperationParticipant) thats auto create Approvers (with the creator) public class WIAprovalsParticipand extends AbstractService implements IOperationParticipant { |
Accepted answer
Ralph Schoon (63.7k●3●36●48)
| answered Apr 30 '13, 10:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Marcos,
here a description how such a participant can be developed: https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ - with code - and here a deeper reasoning on how to avoid recursions https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ look at the end of the post if you are in a hurry. Hope that helps. Marcos Sánchez selected this answer as the correct answer
Comments Thanks Ralph for your time.
1
sam detweiler
commented Apr 30 '13, 10:46 a.m.
if you change some workitem and SAVE it, then the participant chain will run again.. BEFORE the current chain finishes..
Ralph Schoon
commented Apr 30 '13, 11:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Exactly, you save a work item. So all advisors and postconditions will run again. If you don't filter the save out, especially your participant will run again, which might add an approval, which will.....
|
2 other answers
usually you use saveWorkitem3(workitem, null, null, parm) so you can pass yourself a parameter to be able to detect recursion
|
Thank you very much Ralph and Sam.
I understand / resolve my doubts and solved the problem. |
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.