It's all about the answers!

Ask a question

How can I create a configurable Operation Participant?


Dan Rivett (1211115) | asked Mar 02 '11, 10:25 a.m.
I want to create an operation participant that is invoked when a work item is saved. I've been able to do that, but what I really want to be able to do is allow the administrator to configure it when they enable it in the Process Configuration tab of the Project Area so they can select which work item types this operation participant will be invoked on.

I see the IOperationParticipant.run() method passes in a IProcessConfigurationElement object which would contain the configuration in XML format, and I can specify a schema to define what XML I expect, but how can I get RTC to provide the UI in the Process Configuration tab to allow the administrator to specify the configuration?

For example the built in operation advisors/participants provide a UI to configure them (for example the E-Signature advisor) but I don't see a way of being able to do the same for a custom operation advisor/participant.

I was hoping that just providing the schema might magically mean a UI is provided, but that didn't make any difference for me so it seems there must be something else that needs to be done to be able to provide a UI to configure the advisor/participant.

Any help would be greatly appreciated as working on a tight RTC deadline to get this into our environment for testing.

Thanks,
Dan Rivett
CICS TS L3 Service

4 answers



permanent link
Dan Rivett (1211115) | answered Mar 02 '11, 11:00 a.m.
After further digging, I think I can answer my own post so adding it here in case it's useful for others, or that I'm wrong and I can be rebutted! :)

It looks like we need to implement another extension point: com.ibm.team.process.ide.ui.processAspectEditorFactories providing a IProcessAspectEditorFactory implementation that will provide a ProcessAspectEditor object for the id matching the operationId of the advisor/participant we're implementing in the com.ibm.team.process.service.operation extension point I had already implemented.

For example for the E-Signature advisor I mentioned it implements the following 2 extension points as follows, with the first one specifying how to contribute UI to configure the advisor/participant:


<extension point="com.ibm.team.process.ide.ui.processAspectEditorFactories">
<factory

aspectId="com.ibm.team.workitem.advisor.eSignature"
class="com.ibm.team.workitem.ide.ui.internal.aspecteditor.teamoperation.WorkItemTeamOperationAspectEditorFactory">

</factory>

</extension>



<extension point="com.ibm.team.process.service.operationAdvisors">
<operationAdvisor

class="com.ibm.team.workitem.service.internal.save.ESigAdvisor"

id="com.ibm.team.workitem.advisor.eSignature"

name="%ESignature.advisor.name"

operationId="com.ibm.team.workitem.operation.workItemSave"

schema="schema/eSignature.xsd">

<description>

%ESignature.advisor.description

</description>

</operationAdvisor>
</extension>


This doesn't seem particularly lightweight, and means it becomes a lot of work to make a configurable rather than a non-configurable operation participant.

permanent link
Jared Burns (4.5k29) | answered Mar 03 '11, 10:18 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
After further digging, I think I can answer my own post so adding it here in case it's useful for others, or that I'm wrong and I can be rebutted! :)

It looks like we need to implement another extension point: com.ibm.team.process.ide.ui.processAspectEditorFactories providing a IProcessAspectEditorFactory implementation that will provide a ProcessAspectEditor object for the id matching the operationId of the advisor/participant we're implementing in the com.ibm.team.process.service.operation extension point I had already implemented.


Yes, this is correct.

- Jared

permanent link
Markus Nosse (15112528) | answered Mar 16 '11, 11:01 a.m.
This doesn't seem particularly lightweight, and means it becomes a lot of work to make a configurable rather than a non-configurable operation participant.


Dan,

have you considered to make your participant configurable, but without providing a GUI for the process specification editor? This option only requires that you define a XML schema for the configuration syntax of your participant. However, you (or your admins) would have to configure your participant in the process specification source editor - but, by means of the schema, at least with code completion.

Regards
Markus

permanent link
Nate Decker (37813058) | answered Jan 21 '15, 10:24 a.m.
Does anyone have a link to a comprehensive tutorial that describes how to do this? I have several custom pre-conditions and follow-up actions that I have developed, but I am looking for guidance on how to specify configuration options in association with these operation behaviors.

Your answer


Register or to post your answer.