Adding an event listener
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2016 03:24 PM
Hi,
Sorry for the basic question, I'm new to Activiti and Spring.
I'm trying to add a simple "Hello World" event listener from the guide (http://activiti.org/userguide/index.html#eventDispatcherListener) but haven't been able to get it working where I can see the output yet.
What I've done so far:
- Compile the MyEventListener class and package it in a JAR, and copy that JAR into activiti/tomcat/webapps/activiti-app/WEB-INF/lib
- Create a activiti.cfg.xml file and save it in activiti/tomcat/webapps/activiti-app/WEB-INF/classes with the contents:
Then after shutting down and restarting Activiti, stepping through a workflow, I haven't seen any output from MyEventListener.
Does this look right? Am I missing any steps?
Thanks for any help.
Sorry for the basic question, I'm new to Activiti and Spring.
I'm trying to add a simple "Hello World" event listener from the guide (http://activiti.org/userguide/index.html#eventDispatcherListener) but haven't been able to get it working where I can see the output yet.
What I've done so far:
- Compile the MyEventListener class and package it in a JAR, and copy that JAR into activiti/tomcat/webapps/activiti-app/WEB-INF/lib
- Create a activiti.cfg.xml file and save it in activiti/tomcat/webapps/activiti-app/WEB-INF/classes with the contents:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"> <property name="eventListeners"> <list> <bean class="org.activiti.engine.example.MyEventListener" /> </list> </property> </bean></beans>
Then after shutting down and restarting Activiti, stepping through a workflow, I haven't seen any output from MyEventListener.
Does this look right? Am I missing any steps?
Thanks for any help.
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2016 03:27 PM
(It looks like the forum inserted an "a" tag in the xsi:schemaLocation after posting which isn't actually there)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2016 08:57 AM
That looks alright to me. How does your event listener look like?
