Hello,
Following the example given here
I want to write an event handler.
I’m not aware of Spring mecanics which I’m starting to learn thanks to bonita (thank you bonita).
It seems my attempt is not working. I’ve added the following in my cfg.xml bean configuration file:
I’ve added a jar containing fr.univlille2.bpm.ActivityNotifier.class in Tomcat’s lib folder and here is the relevant part of my source code (where sendmail() method has been tested)
public class ActivityNotifier implements SHandler {public ActivityNotifier() {
}
@Override
public void execute(SEvent event) throws SHandlerExecutionException {
sendMail();
}
@Override
public String getIdentifier() {
return null;
}
@Override
public boolean isInterested(SEvent event) {
Object eventObject = event.getObject();
if (!(eventObject instanceof SFlowNodeInstance))
return false;
return true;
}
What’s wrong here ? Do I need to declare ActivityNotifier as a bean too ? When I try to do this bonita gets stuck on a 500.
Thanks!