It's all about the answers!

Ask a question

WorkItem State change eventhandler


Erik Vonderheid (461) | asked Mar 03 '10, 9:10 a.m.
Hi,

I'm trying to write an eventhandler for com.ibm.team.workitem.event.stateChanged.

My plugin.xml:

...
class="com.prostep.openpdm.linkage.demo.StateChangeEventHandler"
eventCategory="com.ibm.team.workitem.event.stateChanged"
id="com.prostep.openpdm.linkage.Demo.StateChangedEventHandler"
...


I've read that I need to activate the eventListener in the process configuration editor. But Event Handling (unconfigured) is grayed out.

How can I activate this option?

Best Regards
Erik V.

8 answers



permanent link
sam detweiler (12.5k6195201) | answered Sep 23 '10, 3:38 p.m.
On Wed, 22 Sep 2010 21:37:57 +0000, sdetweil wrote:

I'm lost.. (I think)

I see the greyed out event thru eclipse on the Simple team process
definition.

but I want a server side (client independant) event handler.

I think you defined an eclipse based handler, right?

Sam

All event handlers are defined server-side.

- Jared
------------------------
Jazz Team Process

hm.. I've installed the SDK (just downloaded today), and I see plain java client and eclipse plugins.. I don't see anything server focused.
and none of the classes referenced above.

and no source code samples for any handlers or other objects, nor any javadoc or other reference material loaded as part of the sdk.

Sam

permanent link
Jared Burns (4.5k29) | answered Sep 23 '10, 9:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Wed, 22 Sep 2010 21:37:57 +0000, sdetweil wrote:

I'm lost.. (I think)

I see the greyed out event thru eclipse on the Simple team process
definition.

but I want a server side (client independant) event handler.

I think you defined an eclipse based handler, right?

Sam

All event handlers are defined server-side.

- Jared
------------------------
Jazz Team Process

permanent link
sam detweiler (12.5k6195201) | answered Sep 22 '10, 5:34 p.m.
I'm lost.. (I think)

I see the greyed out event thru eclipse on the Simple team process definition.

but I want a server side (client independant) event handler.

I think you defined an eclipse based handler, right?

Sam

permanent link
Erik Vonderheid (461) | answered Mar 05 '10, 3:47 a.m.
I associated my Team Area with the work item category and now the right event is triggered. But my handler still doesn't get called.


It works when I add my eventHandler in the Team Area.

permanent link
Erik Vonderheid (461) | answered Mar 05 '10, 3:02 a.m.
I associated my Team Area with the work item category and now the right event is triggered. But my handler still doesn't get called.

permanent link
Erik Vonderheid (461) | answered Mar 04 '10, 8:56 a.m.
I reinstalled the Jazz Server and now it is working. I can now select my EventHandler as follow-up action in the Event Handling section.

But the handleEvent method doesn't get called on a state change.

In com.ibm.team.process.internal.service.ServerProcess.handleChangeEvent(IChangeEvent, IProcessArea) the only event that occurs on save is com.ibm.team.feeds.workItemChange.

permanent link
Erik Vonderheid (461) | answered Mar 04 '10, 6:42 a.m.
I changed the process XML to the following:

...
<behaviour>
<role id="default">
<operation id="com.ibm.team.workitem.operation.workItemSave"/>
</role>
<change-event id="com.ibm.team.workitem.event.stateChanged">
<followup-actions>
<followup-action description="OpenPDM Trigger" id="com.prostep.openpdm.linkage.demo.StateChangedEventHandler" name="OpenPDM Trigger" optional="false"/>
</followup-actions>
</change-event>
</behavior>
...


Now I can save the Work Item without an error message but my EventHandler is not called.

permanent link
Erik Vonderheid (461) | answered Mar 04 '10, 4:33 a.m.
I managed to register my eventhandler in the process by editing the process XML

<behaviour>
...
<role id="default">
<operation id="com.ibm.team.workitem.operation.workItemSave">
<followup-actions>
<followup-action description="OpenPDM Trigger" id="com.prostep.openpdm.linkage.demo.StateChangedEventHandler" name="OpenPDM Change Event" optional="false"/>
</followup-actions>
</operation>
</role>
...
</behaviour>


Know when I try to save a WorkItem I get the following error in Team Advisor:

Problem
Unable to find extension matching followup-action id: com.prostep.openpdm.linkage.demo.StateChangedEventHandler. This typically means that a plugin is missing. In order for this operation to run without this followup-action, the team must configure it as "optional".


In the OSGI console I can see/start/stop my bundle.

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.