[jboss-user] [jBPM] New message: "Where to implement database work?"

Viorel Andronic do-not-reply at jboss.com
Mon Mar 15 11:18:14 EDT 2010

User development,

A new message was posted in the thread "Where to implement database work?":


Author  : Viorel Andronic
Profile : http://community.jboss.org/people/klawandronic

I have JBPM 4.3 installed as a service on jboss 5.1.0.GA.
I'm using it from a JSF-EJB3 application through a SLSB layer. So, for example, to start a process, I'm invoking a start method on a SLSB to take advantage of the CMT for any additional work on the application's database.
In the user guide I saw that the recommended way to work with state machine is through event listeners.
What I want to do is: when I start the process I want to save some changes to the application's database(not JBPM's database) by using an event listener on the START event.
My problem is now: how am I supposed to do that if the event listener is not an container managed bean? I cannot inject any session bean in it nor the persistence context. The JBPM engine instanciates event listeners out of the EJB container's scope so out of the EJB scope.
How can I make changes to my database in an JBPM EventListener?
Or, otherwise: how can I propagate the event up to the EJB level so I can then modify the database?
What for are these event listeners intended?


To reply to this message visit the message page: http://community.jboss.org/message/532033#532033

More information about the jboss-user mailing list