[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

--------------------------------------------------------------
Hi,
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" 
          assignee="test" 
              description="A task that gets assigned to somebody with user name test" 
              g="117,90,48,52">
            <on event="start">
                        <event-handler expr="#{myEventHandler}"/>
            </on>
            <on event="end">
                  <event-handler expr="#{myEventHandler}"/>
            </on>
      <transition name="END"  to="END" g="-31,2"/>
    </task>


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"/>
    </bean>

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;
    
        @Override
        public void notify(EventListenerExecution eventExecution) throws Exception
        {
            //Do some logical operation based on incoming process variable...
    
            //Use the myBO bean to do DB operation...
            myBO.insert(...);
            myBO.update(...);
        }
    
    }


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
[http://community.jboss.org/message/618857#618857]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- 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