Hi, I am trying to create a event handler by implementing SHandler
I followed this link to create event handler: http://documentation.bonitasoft.com/event-handlers-0
Below is the code:
public class CustomEventHandler implements SHandler {
private static final long serialVersionUID = 1L;
@Override
public void execute(SEvent arg0) throws SHandlerExecutionException {
System.out.println("execute()");
}
@Override
public String getIdentifier() {
System.out.println("getIdentifier()");
return "1";
}
@Override
public boolean isInterested(SEvent arg0) {
System.out.println("isInterested()");
return true;
}
}
packaged this class file into jar and placed under workspace/tomcat/webapps/bonita/WEB-INF/lib
Added following entries in “bonita-platform-sp-custom.xml” (directory: workspace\tomcat\bonita\engine-server\conf\platform
<bean id="eventHandlers" class="org.springframework.beans.factory.config.MapFactoryBean">
<property name="targetMapClass">
<value>java.util.HashMap</value>
</property>
<property name="sourceMap">
<map>
<entry key="ACTIVITYINSTANCE_STATE_UPDATED" value-ref="CustomHandler"></entry>
<entry key="HUMAN_TASK_INSTANCE_ASSIGNEE_UPDATED" value-ref="CustomHandler"></entry>
<entry key="PROCESSINSTANCE_CREATED" value-ref="CustomHandler"></entry>
<entry key="PROCESSINSTANCE_UPDATED" value-ref="CustomHandler"></entry>
</map>
</property>
I do not see that Custom Handler is called when an event is raised. Can anyone look into it and suggest what is missing.