How to run operation advisor/participant when a project area is saved
![]()
SEC Servizi (971●2●28●54)
| asked Jan 15 '13, 10:49 a.m.
edited Dec 28 '17, 1:53 p.m. by Geoffrey Clemm (30.1k●3●30●35) We would run our own follow-up action (i.e., operationParticipant) when a Project Area is saved.
When the "Save" button is fired, we see the operation run is "com.ibm.team.process.server.saveProjectArea".
public void run(AdvisableOperation operation, IProcessConfigurationElement participantConfig, IParticipantInfoCollector collector, IProgressMonitor monitor) throws TeamRepositoryException { Object objData = operation.getOperationData(); if (objData instanceof ProjectAreaSaveOperation) { // ...
However, in the Project Configuration view, we can find only "com.ibm.team.dashboard.server.savePersonalDashboard" and "com.ibm.team.dashboard.server.saveProjectDashboard" as extendable project operation ids.
How can we run custom operation advisors/operation partecipants when a Project Area is saved?
Thanks in advance.
|
Accepted answer
![]()
Ok, everything seems to work and we are able to run the partecipant only when membership change:
public void run(AdvisableOperation operation, IProcessConfigurationElement participantConfig, IParticipantInfoCollector collector, IProgressMonitor monitor) throws TeamRepositoryException {
Now we would like to know how the client follow-up action "Send Team Invitation to New Members" is invoked since its behaviour is very similar to our new action...
Ralph Schoon selected this answer as the correct answer
|
One other answer
![]()
Ok, if we manually add:
<behavior> <role id="team-member"> <project-operation id="com.ibm.team.process.server.saveProjectArea"> <followup-actions> <followup-action id="it.secservizi.rtc.admin.server.postop.Foo" /> </followup-actions> </project-operation> </role> </behavior>to the Process Configuration Source of the Project Area, then the operation partecipant is invoked!
But... is this the right way?
Comments I do not see a save project area event in the process configuration.
We have to manually modify the Process Configuration Source (i.e., the XML source) to invoke a "com.ibm.team.process.server.saveProjectArea" partecipant.
In fact, this operation id is not available in the Process Configuration view (as I wrote above).
Where are you putting this XML node in your Process Configuration Source? There is a block of "project-operation" settings under the "Permissions" node, but not the "behavior" node. If you try to add the XML you have listed above to the permissions node, "followup-actions" is not a legal element at this location. Similarly, there are "followup-actions" defined for the behavior, but you evidently cannot define "project-operation" elements in this behavior node. The tool flags this as not being one of {"http://com.ibm.team.process":operation} types. You, sir, are the man! Thanks so much. This will help us a lot in our environment. Scenario: We have a single process parent that we use to provide configurations for multiple child project areas (i.e., the "Process Sharing" feature). Sometimes end-users don't know what they are doing and they break inheritance from the process parent. We've wanted a tool for a long time that gives us the ability to validate that action and we might have what we need now. One more question: What do I need to import to have access to the data type "ProjectAreaSaveOperation"? Never mind, I figured it out. Evidently I needed to add the package "com.ibm.team.process.internal.service" and then import com.ibm.team.process.internal.service.ProjectAreaSaveOperation Glad to know we helped you. :) Cheers.
showing 5 of 6
show 1 more comments
|
Comments
Can you give some background on what you're trying to accomplish? What do you want to do in a follow-up action on project area save?
We are trying to programmatically create a new repository worspace when a user is add to a project area.