How to invoke a IChangeEventHandler by server side programmatically
![]()
We would try to invoke an our IChangeEventHandler implementation by server side.
How could we create that IChangeEventHandler instance to be adviced by the change event manager (e.g., internal API)?
IChangeEvent event = IChangeEvent.FACTORY.newInstance(null);
Thanks in advance.
|
4 answers
![]()
Ralph Schoon (62.0k●3●36●43)
| answered Mar 22 '16, 3:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As far as I can tell, you don't do that. You extend the event handler extension point and then your event handler is called, once you configure it for the project.
![]() Comments 1
I think his question was, what causes the event to fire, that would invoke his handler.
|
![]()
Ralph Schoon (62.0k●3●36●43)
| answered Mar 23 '16, 11:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Mar 23 '16, 11:02 a.m.
You can configure event handler here:
![]() There is a built in (hard to find) event for all of these. I don't know if you can cause events yourself. |
![]() We already extended the event handler extension point "com.ibm.team.workitem.event.stateChanged" with our implementation and it works like a charm. Also, we created a REST command to be able to simulate the invocation of that implementation and it works like a charm, too. We are looking for the right way to generate the IChangeEvent instance to be used for that invocation: IChangeEvent event = IChangeEvent.FACTORY.newInstance(null); For instance, we do not know how to set a correct contextId... Thanks in advance. Cheers. |