How to run operation advisor/participant when a project area is saved
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 {
Object objData = operation;
if (!(operation instanceof ProjectAreaSaveOperation)) {
return;
}
ProjectAreaSaveOperation data = (ProjectAreaSaveOperation) objData;
List<String> actions = Arrays.asList(data.getActions());
if (!actions.contains(ProjectAreaSaveOperation.ACTION_MODIFY_MEMBERS)) {
return;
}
// ...
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...
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
showing 5 of 6
show 1 more comments
Comments
Jared Burns
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 15 '13, 1:54 p.m.SEC Servizi
Jan 16 '13, 4:13 a.m.