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 (62.0k●3●36●43)
| 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
if you change some workitem and SAVE it, then the participant chain will run again.. BEFORE the current chain finishes..
![]() 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. |