It's all about the answers!

Ask a question

Event Handler and follow up action


EclipseTalk . (32735759) | asked Jan 28 '10, 12:05 p.m.
Hi,
I have created a plugin to implement a follow-up action in the process editor when a workitem state change. I can see and configure the event handling section in the process configuration editor, however my event is never called.
Below is my event handler declaration. What am I missing?
Thank you for your time and help.

<extension>
<eventHandler>
class="com.test.workitem.service.events.WorkItemStateChanged"
eventCategory="com.ibm.team.workitem.event.stateChanged"
id="com.test.workitem.eventHandler.workItemStateChange"
name="WorkItem State Changed">
<description>
</description>
</eventHandler>
</extension>

6 answers



permanent link
Jared Burns (4.5k29) | answered Jan 29 '10, 2:00 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Thu, 28 Jan 2010 17:08:01 +0000, eclipsetalk wrote:

Hi,
I have created a plugin to implement a follow-up action for the event in
the process editor when a workitem state change. I can see and configure
the event handling in the process configuration editor however my event
is my called. Below is my event handler declaration. What am I missing?
Thank you for your time and help.

extension
eventHandler
description
/description
/eventHandler
/extension

Can you also show how you're configuring your event handler in the
process?

--
Jared Burns
Jazz Process Team

permanent link
EclipseTalk . (32735759) | answered Jan 30 '10, 12:58 p.m.
Thanks for replying. Here is my process config:

<change-event id="com.ibm.team.workitem.event.stateChanged">
<followup-actions>
<followup-action description="This process event is fired whenever a work item state transitions occurs." id="com.test.workitem.eventHandler.workItemStateChange" name="WorkItem State Changed"/>
</followup-actions>
</change-event>

Is there anything else I need to do. This how I defined my implementation class:

public class WorkItemStateChanged {

public void handleEvent(IChangeEvent event, IProcessConfigurationElement handlerConfiguration)
throws TeamRepositoryException {
// TODO - define code processing here
System.out.println("Event Notification: WorkItem state changed...");
}
}

permanent link
Jared Burns (4.5k29) | answered Feb 01 '10, 10:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Sat, 30 Jan 2010 18:08:00 +0000, eclipsetalk wrote:

Thanks for replying. Here is my process config:

change-event
id="com.ibm.team.workitem.event.stateChanged"
<followup-actions
<followup-action description="This process
event
is fired whenever a work item state transitions occurs."
id="com.test.workitem.eventHandler.workItemStateChange" name="WorkItem
State Changed"/
</followup-actions
/change-event

Is there anything else I need to do. This how I defined my
implementation class:

public class WorkItemStateChanged {

public void handleEvent(IChangeEvent event,
IProcessConfigurationElement handlerConfiguration)
throws TeamRepositoryException {
// TODO - define code processing here System.out.println
("Event
Notification: WorkItem state
changed...");
}
}


Thanks, but we'll need more details to see what's going wrong. Here's
what we need:
1. The real XML from your plugin.xml that declares your event handler.
The XML in your original post contains no real content.
2. Your actual process XML, containing at least the follow-up action
element and all parent elements up to the root of the document. Your last
message contained only the change-event element which doesn't give us any
of the necessary context.
3. Also, can you please tell us where in your team hierarchy you're
configuring the follow-up action and where in your team hierarchy the
change events are generated? For example, you might be configuring the
process in the project area and the events might be coming from a root
team area.

--
Jared Burns
Jazz Process Team

permanent link
EclipseTalk . (32735759) | answered Feb 01 '10, 3:32 p.m.
Thanks for your help.
Finally I got it working. My problem was that I needed to file my workitem against a category mapped to the team area I was using....

permanent link
Erik Vonderheid (461) | answered Mar 05 '10, 2:09 a.m.
Thanks for your help.
Finally I got it working. My problem was that I needed to file my workitem against a category mapped to the team area I was using....


How do I map the workitem against a category from the team area? I registered my event handler in the project area. Will it then work for all team areas underneath it?

permanent link
Erik Vonderheid (461) | answered Mar 05 '10, 3:01 a.m.
Thanks for your help.
Finally I got it working. My problem was that I needed to file my workitem against a category mapped to the team area I was using....


How do I map the workitem against a category from the team area? I registered my event handler in the project area. Will it then work for all team areas underneath it?

Ok, I associated my Team Area with the category and now the right event is triggered. But my handler still doesn't get called.

Your answer


Register or to post your answer.