Best Practices for participants?
I'm looking for best practices around Participants, specifically those that are for the same operation. For example, we have a participant for workItemSave that will generate an Approval if needed based on a set of criteria for a User Story work item. We are also going to look at doing something similar to generate Verification type approval records for Defect work items. Is it the best practice to put both of these in a single participant? Is it the best practice to have 1 participant per operation (workItemSave) and have everything you would ever want to do within the save operation in a single one? One per work item type? On per logical "use case"? Susan |
2 answers
Hello Susan,
I would say there is no real best practices here.
As a general rule, I would define 1 operation per participant.
The main reasons are:
- code is easier to maintain
- code is easier to reuse
On the other hand, if you have a single participant to perform a couple of operations for various types,
you will end up with more complex and less re-usable code.
Hope it helps,
Eric
Comments
Susan Hanson
commented Jan 29 '14, 5:04 a.m.
Thanks .... if we have multiple participants all for WorkItemSave, are they synchronous? That is, if I am doing multiple things for the same work item type in different participants, then we wouldn't want both of them trying to modify the same work item at the same time.
as I understand it, the participants, like Advisors are serial. only one at a time. the order is how they are defined in the process config xml. you can move them around in the UI (up/down) to affect the order.
|
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.