Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can I create a configurable Operation Participant?

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

0 votes



4 answers

Permanent link
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.

0 votes


Permanent link
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

0 votes


Permanent link
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

0 votes


Permanent link
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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Mar 02 '11, 10:25 a.m.

Question was seen: 6,259 times

Last updated: Jan 21 '15, 10:24 a.m.

Confirmation Cancel Confirm