[jboss-user] [jBPM] - event handler method not getting invoked in jbpm

Ayusman Dikshit do-not-reply at jboss.com
Tue Aug 2 12:11:22 EDT 2011

Ayusman Dikshit [http://community.jboss.org/people/ayusman_dikshit] created the discussion

"event handler method not getting invoked in jbpm"

To view the discussion, visit: http://community.jboss.org/message/618857#618857

I have a spring 3 and jbpm 4.4 integration environment.
However in one of my tasks I have provided a event as per jpdl specs.

My jpdl snippet with the task element looks like this:

    <task  name="TK1" 
              description="A task that gets assigned to somebody with user name test" 
            <on event="start">
                        <event-handler expr="#{myEventHandler}"/>
            <on event="end">
                  <event-handler expr="#{myEventHandler}"/>
      <transition name="END"  to="END" g="-31,2"/>

and the myEventHandler bean is created in spring as below:

    <bean id="myEventHandler" class="com.test.MyEventHandler">
        <!-- myBO bean is created in the spring application context file itself which contains code to insert/update data to DB-->
        <property name="myBO" ref="myBO"/>

and my Event handler class looks like this:

    import org.jbpm.api.listener.EventListener;
    import org.jbpm.api.listener.EventListenerExecution;
    public class MyEventHandler implements EventListener {
        private MyBO myBO;
        public void notify(EventListenerExecution eventExecution) throws Exception
            //Do some logical operation based on incoming process variable...
            //Use the myBO bean to do DB operation...

The problem is:
after trying several options, the notify method NEVER gets executed. I see the tasks getting created in JBPM4_TASK table, but strangely I can not get  the notify() invoked. And there is no form of error or warning to be seen.

Has anybody faced similar problems?
Is there a way to resolve this?

Any help is appreciated.

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110802/064372dc/attachment.html 

More information about the jboss-user mailing list