It's all about the answers!

Ask a question

Creating an operation participant for a server action


Nazmin haji (11) | asked Jun 26 '08, 1:30 p.m.
When the "deliver" action is invoked I want to add an operation participant to be run. How do I go abouts doing that? Where are the ids for the actions documented?

6 answers



permanent link
Darin Swanson (3161) | answered Jun 26 '08, 2:06 p.m.
We have a "work in progress" document detailing the steps for adding
precondition and follow-up actions for process enabled operations.
Please see https://jazz.net/wiki/bin/view/Main/PreconditionFollowupCreation

The deliver operation comes in both client and server "flavors".
client side id = "com.ibm.team.scm.client.deliver"
server side id = "com.ibm.team.scm.server.deliver"

I do not know of any explicit listing of operationIds.
The easiest way in 1.0 to get an operation id
1. go to the Process Configuration Source tab of your project area
editor
2. within the team configuration, go into the permissions or behavior
section
3. code complete for an operation id of the listed operations

HTH
Darins
Jazz Process Team

"haji" <haji> wrote in message
news:g40k5l$sev$1@localhost.localdomain...
When the "deliver" action is invoked I want to add an
operation participant to be run. How do I go abouts doing that? Where
are the ids for the actions documented?

permanent link
Nazmin haji (11) | answered Jun 26 '08, 5:52 p.m.
Hi Darins
I have been through the wiki page you mentioned.

This is what I have in my plugin.xml

<plugin>
<extension point="com.ibm.team.process.service.operationParticipants">
<operationParticipant class="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow" id="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"
name="AutoShadow"
operationId="com.ibm.teami.autoshadow">
<extensionService
componentId="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow" implementationClass="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow">
</extensionService>
</operationParticipant>
</extension>
</plugin>

Where do I need specify the action id that this should be applied to?

Thanks for the tip on how to find the ids.

permanent link
Jared Burns (4.5k29) | answered Jun 26 '08, 7:31 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Participants aren't action-specific. They're just bound to an operation
(which you've already specified).

I notice that your extension service declaration doesn't mention any
prerequisites. If your participant really doesn't use any services, this
is fine. But if you want to access any services you'll have to specify
them as prereqs. This doesn't seem to be explained yet in the
in-progress documentation linked above. But this is explained in the
JavaDoc on IOperationParticipant.

--
Jared Burns
Jazz Process Team


haji wrote:
Hi Darins
I have been through the wiki page you mentioned.

This is what I have in my plugin.xml

plugin
extension
point="com.ibm.team.process.service.operationParticipants"
operationParticipant
class="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"

id="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"
name="AutoShadow"
operationId="com.ibm.teami.autoshadow"
extensionService

componentId="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"

implementationClass="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"

/extensionService
/operationParticipant
/extension
/plugin

Where do I need specify the action id that this should be applied to?

Thanks for the tip on how to find the ids.

permanent link
Nazmin haji (11) | answered Jun 27 '08, 8:31 a.m.
Hi Jared

When I added the prerequisites, I got an error saying "Element prerequisites is not legal as a child of element extensionService'.

This is what I really need... When the action "Deliver" is invoked from the client, I want the class PerformAutoShadow that I have defined to be run on the server after the deliver action. Don't I need to have com.ibm.team.scm.server.deliver mentioned in the xml, to indicate this PerformAutoShadow is an operation participant of Deliver?

Participants aren't action-specific. They're just bound to an operation
(which you've already specified).

I notice that your extension service declaration doesn't mention any
prerequisites. If your participant really doesn't use any services, this
is fine. But if you want to access any services you'll have to specify
them as prereqs. This doesn't seem to be explained yet in the
in-progress documentation linked above. But this is explained in the
JavaDoc on IOperationParticipant.

--
Jared Burns
Jazz Process Team


haji wrote:
Hi Darins
I have been through the wiki page you mentioned.

This is what I have in my plugin.xml

plugin
extension
point="com.ibm.team.process.service.operationParticipants"
operationParticipant
class="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"

id="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"
name="AutoShadow"
operationId="com.ibm.teami.autoshadow"
extensionService

componentId="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"

implementationClass="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"

/extensionService
/operationParticipant
/extension
/plugin

Where do I need specify the action id that this should be applied to?

Thanks for the tip on how to find the ids.

permanent link
Kai-Uwe Maetzel (85611) | answered Jun 30 '08, 3:10 p.m.
JAZZ DEVELOPER
The operation id is an additional attribute (operationId) on the
operationParticipant element.

The error you see could indicate that PDE can not access the required
schema files for the extensionService element. Our extension point
schema for operation participants references the 'extensionService.exsd'
schema file that resides in the 'schema' folder inside the
'com.ibm.team.repository.service' bundle.

Kai
Jazz Process Team

haji wrote:
Hi Jared

When I added the prerequisites, I got an error saying "Element
prerequisites is not legal as a child of element extensionService'.


This is what I really need... When the action "Deliver" is
invoked from the client, I want the class PerformAutoShadow that I
have defined to be run on the server after the deliver action. Don't
I need to have com.ibm.team.scm.server.deliver mentioned in the xml,
to indicate this PerformAutoShadow is an operation participant of
Deliver?

jburnswrote:
Participants aren't action-specific. They're just bound to an
operation
(which you've already specified).

I notice that your extension service declaration doesn't mention any

prerequisites. If your participant really doesn't use any services,
this
is fine. But if you want to access any services you'll have to
specify
them as prereqs. This doesn't seem to be explained yet in the
in-progress documentation linked above. But this is explained in the

JavaDoc on IOperationParticipant.

--
Jared Burns
Jazz Process Team


haji wrote:
Hi Darins
I have been through the wiki page you mentioned.

This is what I have in my plugin.xml

plugin
extension

point="com.ibm.team.process.service.operationParticipants"
operationParticipant

class="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"

id="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"
name="AutoShadow"
operationId="com.ibm.teami.autoshadow"
extensionService


componentId="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"

implementationClass="com.ibm.teami.scm.autoshadow.service.PerformAutoShadow"
/extensionService
/operationParticipant
/extension
/plugin

Where do I need specify the action id that this should be applied
to?
Thanks for the tip on how to find the ids.


permanent link
Albert Yao (5411322) | answered Nov 17 '13, 11:15 a.m.
The information "Element 'prerequisites' is not legal as a child of element 'extensionService'" is very confusing and misleading!!!

Your answer


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