It's all about the answers!

Ask a question

unable to register a ChangeEventHandler


0
1
Praveen Sinha (11641) | asked Sep 05 '08, 11:42 a.m.
JAZZ DEVELOPER
Hi,

I am trying to issue events and handle them through my ChangeEventHandler. I have registered both the event and the eventHandler through extension points as given below. I am able to raise the events and I can verify it by looking at the event feed for the registered category. But my changeEventHandler never gets hit.

Is there something wrong in my eventHandlerRegistration? or do I need to do something more to get it registered?

Thanks and Regards,
Praveen


<event categoryId="com.ibm.request.update"
id="com.ibm.request.update"
name="Request update event">
<description>
Event that gets generated when a request gets updated.
</description>
</event>


and the ChangeEvent handler

<extension
point="com.ibm.team.process.service.eventHandlers">
<eventHandler
class="com.ibm.mycomp.service.internal.rest.TestRestService"
eventCategory="com.ibm.request.update"
id="com.ibm.eventhandler.requestUpdateHandler"
name="RequestUpdateHandler">
</eventHandler>
</extension>

4 answers



permanent link
Jared Burns (4.5k29) | answered Sep 08 '08, 12:42 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Glad you found the problem. Can you please file a work item with the
request to update the Wiki? This way we won't lose track of your request.

https://jazz.net/jazz/web/projects/Jazz%20Project#action=com.ibm.team.workitem.newWorkItem

Thanks,
Jared Burns
Jazz Process Team


praveen.sinha wrote:
I would request you guys to add this to the wiki guide for process
enabling the components. At present for events atleast its too
abstract and leaves a lot to be assumed.

Thanks and Regards,
Praveen

permanent link
Praveen Sinha (11641) | answered Sep 05 '08, 10:25 p.m.
JAZZ DEVELOPER
Thanks Jared and Kai,

Actually I had more than one issue with my registration. First of all the events themselves can be registered in two ways. For team area wide events we should register it using
event
configuration point and for project are wide event we should register it using
projectEvent
.

Also, just mentioning the category id in the event configuration point will not suffice and the category configuration point should also be defined.

<category id="com.ibm.request.update"
name="My Request">
<description>
request
</description>
</category>

After all this is done I could go and modify the process specification as suggested by you guys.

I would request you guys to add this to the wiki guide for process enabling the components. At present for events atleast its too abstract and leaves a lot to be assumed.

Thanks and Regards,
Praveen

permanent link
Kai-Uwe Maetzel (85611) | answered Sep 05 '08, 8:45 p.m.
JAZZ DEVELOPER
The event handlers you register are not automatically called.

By registering an event handler you make that event handler available
for being used in the process configuration of your project area or the
process customization of its team areas.

Thus, as Jared pointed out, when the process does not configure the
event handler nothing happens.

Kai
Jazz Process team

praveen.sinha wrote:
Hi,

I am trying to issue events and handle them through my
ChangeEventHandler. I have registered both the event and the
eventHandler through extension points as given below. I am able to
raise the events and I can verify it by looking at the event feed for
the registered category. But my changeEventHandler never gets hit.

Is there something wrong in my eventHandlerRegistration? or do I need
to do something more to get it registered?

Thanks and Regards,
Praveen


event categoryId="com.ibm.request.update"
id="com.ibm.request.update"
name="Request update event"
description
Event that gets generated when a request gets updated.
/description
/event


and the ChangeEvent handler

extension

point="com.ibm.team.process.service.eventHandlers"
eventHandler

class="com.ibm.mycomp.service.internal.rest.TestRestService"
eventCategory="com.ibm.request.update"
id="com.ibm.eventhandler.requestUpdateHandler"
name="RequestUpdateHandler"
/eventHandler
/extension


permanent link
Jared Burns (4.5k29) | answered Sep 05 '08, 1:04 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Have you configured your test team's process to use this event handler?
To do this, open your project area and go to the Process Configuration
tab. From there, expand the Team Configuration section and select the
"Event Handling" node. Here you should see your new event and be able to
configure your handler to respond to it.

Jared Burns
Jazz Process Team


praveen.sinha wrote:
Hi,

I am trying to issue events and handle them through my
ChangeEventHandler. I have registered both the event and the
eventHandler through extension points as given below. I am able to
raise the events and I can verify it by looking at the event feed for
the registered category. But my changeEventHandler never gets hit.

Is there something wrong in my eventHandlerRegistration? or do I need
to do something more to get it registered?

Thanks and Regards,
Praveen


event categoryId="com.ibm.request.update"
id="com.ibm.request.update"
name="Request update event"
description
Event that gets generated when a request gets updated.
/description
/event


and the ChangeEvent handler

extension

point="com.ibm.team.process.service.eventHandlers"
eventHandler

class="com.ibm.mycomp.service.internal.rest.TestRestService"
eventCategory="com.ibm.request.update"
id="com.ibm.eventhandler.requestUpdateHandler"
name="RequestUpdateHandler"
/eventHandler
/extension

Your answer


Register or to post your answer.