It's all about the answers!

Ask a question

Operation participant call only once or call on each save

Sudeshna Mitra (2332831) | asked Aug 16 '12, 4:16 a.m.
edited Aug 16 '12, 4:24 a.m.
I have one question about operation participant ...whether the
 Operation participant call only once when we create a new workitem or it call on each save of the workitem ?

Because I was create a operation participant and tried it to update work-item description, it was  works fine when I was created a new RCN but it didn't update workitem description next time when I was again save it.

One answer

permanent link
Jared Russell (1.3k12019) | answered Aug 16 '12, 4:42 a.m.
 Operation participants get called on every save. If you only want your participant to do something once you will need to check for it within your code and just return without doing anything.

You can tell if the operation in question is an initial save by checking the value of ISaveParameter#getOldState(), which will return null if the work item is being saved is new.

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.