It's all about the answers!

Ask a question

how to add follow-up actions for an event


Feng Liu (511125) | asked Oct 17 '08, 5:02 a.m.
I want to add some follow-up actions to the event which is under the Event Handling section on the Process Configuration editor. To do this, I add the extension point com.ibm.team.process.service.eventHandlers to try to define an event handler to bind a particular event. Also I tried to define a new Event leveraging by the extension point com.ibm.team.process.service.configurationPoints. Code is below:

<event
categoryId="jazz.service.example.sampleevent"
id="jazz.service.example.sampleevent"
name="My Test Event">
</event>
<category
id="jazz.service.example.sampleevent"
name="My Events Category">
</category>

The event handler code:

<extension
point="com.ibm.team.process.service.eventHandlers">
<eventHandler
class="jazz.service.test.SampleEventHandler"
eventCategory="jazz.service.example.sampleevent"
id="jazz.service.example.myEventHandler"
name="My Sample Event Handler">
</eventHandler>
</extension>


From above steps, I can find the new event on the editor for configuring the Process Template, but for that event I can't find any new available follow-up action. Also I tried to give the different id for the event and the event category, but it doesn't work as well.

Did I get any wrong understanding for this or miss something?

Many thanks for your help.

Feng

3 answers



permanent link
Feng Liu (511125) | answered Oct 20 '08, 6:03 a.m.
I've solved this problem.

It's just because I got a wrong understanding on eventHandler extension point. I SHOULD NOT assign the "event category ID" to the eventCategory field under the eventHandler extension point, but I SHOULD assign the "event ID" to that field. After that I can find new available follow-up action under the event which my handler binds to. I just set the "event category ID" to the "eventCategory" field before so I failed to bind my handler to the event.

Anyway, thanks for your help. :)

permanent link
Feng Liu (511125) | answered Oct 19 '08, 10:40 p.m.
Jared, thanks for your response.

1. I'm using the JazzServer-06-RTC10-Maximal.launch to start a runtime server and loaded the plug-in which provides the event handler I wrote. I can make sure this because I can find my defined preconditions on the server which are defined in this plug-in also.

2. The event category ID is equal with the ID defined in event. And also the event ID is equal with the event category ID in the event extension. You can find them on the code above. I would like repeat it again here:

<event
categoryId="jazz.service.example.sampleevent"
id="jazz.service.example.sampleevent"
....

<eventHandler
eventCategory="jazz.service.example.sampleevent"
....



The first two things I would check are:

1. Is the plugin that provides the event handler getting loaded on the
server (if you're using Jetty, is the bundle included in your launch
config)?

2. Does the "eventCategory" value you specified in your eventHandler
extension match the "id" value of your event extension?

Jared Burns
Jazz Process Team


liufcrl wrote:
I want to add some follow-up actions to the event which is under the
Event Handling section on the Process Configuration editor. To do
this, I add the extension point
com.ibm.team.process.service.eventHandlers to try to define an event
handler to bind a particular event. Also I tried to define a new
Event leveraging by the extension point
com.ibm.team.process.service.configurationPoints. Code is below:

event
/event
category
/category

The event handler code:

extension
eventHandler
/eventHandler
/extension


Also I tried to give the different id for the event and the event
category, but it doesn't work as well.

From above steps, I can find the new event on the editor for
configuring the Process Template, but for that event I can't find any
new available follow-up action. Did I get any wrong understanding for
this or miss something?

Many thanks for your help.

Feng

permanent link
Jared Burns (4.5k29) | answered Oct 17 '08, 1:16 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The first two things I would check are:

1. Is the plugin that provides the event handler getting loaded on the
server (if you're using Jetty, is the bundle included in your launch
config)?

2. Does the "eventCategory" value you specified in your eventHandler
extension match the "id" value of your event extension?

Jared Burns
Jazz Process Team


liufcrl wrote:
I want to add some follow-up actions to the event which is under the
Event Handling section on the Process Configuration editor. To do
this, I add the extension point
com.ibm.team.process.service.eventHandlers to try to define an event
handler to bind a particular event. Also I tried to define a new
Event leveraging by the extension point
com.ibm.team.process.service.configurationPoints. Code is below:

event
/event
category
/category

The event handler code:

extension
eventHandler
/eventHandler
/extension


Also I tried to give the different id for the event and the event
category, but it doesn't work as well.

From above steps, I can find the new event on the editor for
configuring the Process Template, but for that event I can't find any
new available follow-up action. Did I get any wrong understanding for
this or miss something?

Many thanks for your help.

Feng

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.