Integration steps:
* Import the jbpm jar package
* Delete the jar packages of db and hibernate.
* Create a configuration file under config
Config/jbpm
Jbpm. cfg. xml
Jbpm. hibernate. cfg. xml
* In the jbpm. cfg. xml file
<Import resource = "jbpm. tx. hibernate. cfg. xml"/>
<Import resource = "jbpm. tx. spring. cfg. xml"/>
Spring processes transactions in a unified manner. The configuration on the right shows that the transaction is started by creating a new session.
* In the jbpm. hibernate. cfg. xml file
* Database connection Configuration
<Property name = "current_session_context_class"> thread </property>
This line of configuration cannot be written, and the session cannot be obtained from the current thread
* Project Table ing File
* Ing file of jbpm tables
* Spring configuration file
* Modify the path of the hibernate configuration file
<Bean id = "sessionFactory"
Class = "org. springframework. orm. hibernate3.LocalSessionFactoryBean">
<Property name = "configLocation">
<Value> classpath: jbpm/jbpm. hibernate. cfg. xml </value>
</Property>
</Bean>
* Let spring generate processEngine
<Bean id = "springHelper" class = "org. jbpm. pvm. internal. processengine. SpringHelper">
<Property name = "jbpmCfg" value = "jbpm/jbpm. cfg. xml"> </property>
</Bean>
<Bean id = "processEngine" factory-bean = "springHelper" factory-method = "createProcessEngine"/>
Note the path of the jbpm. cfg. xml configuration file.