Event Handler and follow up action
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.
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
On Thu, 28 Jan 2010 17:08:01 +0000, eclipsetalk wrote:
Can you also show how you're configuring your event handler in the
process?
--
Jared Burns
Jazz Process Team
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
Thanks for replying. Here is my process config:
Is there anything else I need to do. This how I defined my implementation class:
<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...");
}
}
On Sat, 30 Jan 2010 18:08:00 +0000, eclipsetalk wrote:
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
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
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?
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.