It's all about the answers!

Ask a question

Event handler is not executed


Jose Miguel Ordax Cassa (2.4k2126100) | asked Nov 23 '09, 6:53 a.m.
Hi, i have developed what I think is the simplest Event Handler and I am
not able to see it executing.... I can see it in the Process
Configuration Editor and I activate it usage.

Here is the plug-in.xml fragment:

<plugin>
<extension>
<eventHandler>
</eventHandler>
</extension>
</plugin>

and this is the dummy implementation:

public class ChangeEventHandler implements IChangeEventHandler
{
public void handleEvent(IChangeEvent event,
IProcessConfigurationElement handlerConfiguration) throws
TeamRepositoryException
{
System.out.println("Ejecutando Event Handler...");
}
}

I activate it usage from Process Editor at Work Item State Changed Event.

Then, I change the state of a existing WI, save it, but nothing happens
in the console... I read somewhere in this same newsgroup that I should
wait around 25 seconds but... nothing.

Any idea or tip about what to look for?

Thanks in advance,

Chemi.

One answer



permanent link
Salvatore Sollami (632) | answered Feb 16 '10, 10:24 a.m.
I have create a followup event plug:

<plugin>
<extension>
<eventHandler>
<extensionService>
<prerequisites>
<requiredService>
<requiredService>
<requiredService>
</prerequisites>
</extensionService>
</eventHandler>
</extension>

</plugin>


and code

public class evento extends AbstractService implements IChangeEventHandler {
private IProcessConfigurationElement fConfigurationElement;
private IProjectArea fProjectArea;
private IProcessArea fProcessArea;

@Override
public void handleEvent(IChangeEvent event,
IProcessConfigurationElement handlerConfiguration)
throws TeamRepositoryException {
// TODO Auto-generated method stub


fProcessArea = (IProcessArea) event.getProcessArea();


}

}

but in runtime don't execute the code

Your answer


Register or to post your answer.