do you execute jBPM with JTA transactions configured? Seems like some transaction manager issue.
More information about your environment setup would be useful as well.
Thanks Maciej for your fast response.
I'm using EJB deployed on JBoss AS 5.1 and the database engine is MySQL
and I want to be able to manage the transaction of the JBPM as a standalone transaction to be able to commit or rollback it from my bean.
but I think that it is not configured to be a standalone transaction.
In general that should be possible. One of the scenarios of using jBPM is as embedded within application. This means that application will control transaction of jBPM, since it is Hibernate in background that should not be a problem.
In my opinion configuration is the key here, when you setup both your application and jBPM to use JTA transactions then your application and jBPM should be under control of the same transaction manager regardless if they share data source or not.
JTA configuration is delivered with jBPM distribution but (afaik) it is not configured as default one. In dev or user guide there should be some info how to configure JTA support.