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

RTC API: How to create an event listener using a web API?

We are trying to create an event listener on work items save button (after a change is done). What we need to do is, 1) check the list of subscribers of the work item or the "filed Against" value, 2) detect the change just saved (User, date, change details), 3) get the URL of the work item, 4) invoke a web API to notify about the change just saved. This needs to be done in our server (6.0.1) and only on select Project Areas. Can you guide us with some reference or help, please?


0 votes

Comments

that is an advisor (that always says ok).

you have old state, new state, and can call out to other services.

Ralph has advisors of all kinds on his blog
https://rsjazz.wordpress.com/


1 vote


Accepted answer

Permanent link
You can also follow

Extension Points and Operation ID’s to try to create an event handler, using the extension point below.

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="com.ibm.team.process.service.eventHandlers">
      <eventHandler
            class="ibm.rtc.handler.notification.ChangeEventHandler"
            id="ibm.rtc.handler.notification.eventHandler"
            name="Category based email notification"
            eventCategory="com.ibm.team.workitem.event.stateChanged"
            schema="schema/handlerNotification.xsd">
            <extensionService
                  componentId="ibm.rtc.handler.notification.eventHandler"
                  implementationClass="ibm.rtc.handler.notification.ChangeEventHandler">
                  <prerequisites>
                          <requiredService interface="com.ibm.team.repository.service.IMailerService"/>
                          <requiredService interface="com.ibm.team.repository.service.IRepositoryItemService"/>
                          <requiredService interface="com.ibm.team.repository.service.IServerDescriptionService"/>
                          <requiredService interface="com.ibm.team.workitem.common.IWorkItemCommon"/>
                  </prerequisites>
            </extensionService>
      </eventHandler>     
   </extension>
</plugin>


Or you can try to use an Asynchronous Task
Other than follow up actions or participants, that you could also use, these run in an administrative context and not in the context of the user that performs the operation.
Isabel Torres selected this answer as the correct answer

1 vote

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
× 12,019

Question asked: Feb 22 '16, 7:02 p.m.

Question was seen: 2,168 times

Last updated: Feb 23 '16, 2:31 a.m.

Confirmation Cancel Confirm