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

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.

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

0 votes



6 answers

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

0 votes


Permanent link
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...");
}
}

0 votes


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

0 votes


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

0 votes


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

0 votes


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

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,938

Question asked: Jan 28 '10, 12:05 p.m.

Question was seen: 8,838 times

Last updated: Jan 28 '10, 12:05 p.m.

Confirmation Cancel Confirm