jbpm作為jboss的一個子項目,和jboss綁定的比較多,官方文檔也沒有說如何移植,下面就移植作個簡要的說明。
1. 下載jbpm http://www.jboss.com/products/jbpm/downloads
2. 解壓,導(dǎo)入eclispe的項目中 配置MYSQL 1. 在eclipse的jpbm項目中加入mysql的lib 2. mysql創(chuàng)建一個數(shù)據(jù)庫"jbpm"
3. 在eclipse的jbpm項目中找到'jbpm-3.0\src\resources'目錄,創(chuàng)建一個自目錄'mysql'
4. 把同目錄hsqldb文件夾中的2個文件(create.db.hibernate.properties, identity.db.xml)拷貝到mysql目錄中
5. 按下面所示編輯 'create.db.hibernate.properties'
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm
hibernate.connection.username=root
hibernate.connection.password=root
hibernate.c3p0.min_size=1
hibernate.c3p0.max_size=3
hibernate.show_sql=true
6. 在eclipse的jbpm項目中找到ant腳本'build.deploy.xml',進行編輯 找到 target name="create.db", 刪除 db.start, db.stop 在這個目標(biāo)塊中將所有的'hsqldb' 替換為 'mysql'
7. 運行ant create.db -buildfile build.deploy.xml創(chuàng)建jbpm表結(jié)構(gòu)
8. 找到target name="build.webapp"按下面進行編輯
<target name="build.webapp" description="builds jbpm.war">
<ant antfile="build.xml" target="build.webapp" />
<mkdir dir="build/jbpm.war.dir" />
<copy todir="build/jbpm.war.dir">
<fileset dir="src/resources/jbpm.war" />
</copy>
<copy todir="build/jbpm.war.dir/WEB-INF/lib">
<fileset dir="build" includes="jbpm-webapp-${jbpm.version}.jar" />
<fileset dir="lib/jsf" includes="*.jar" />
<fileset dir="lib/commons" includes="commons-digester-*.jar, commons-beanutils-*.jar" />
</copy>
<jar destfile="build/jbpm.war">
<fileset dir="build/jbpm.war.dir" />
</jar>
</target>
9. 找到目錄src/resources,編輯jbpm.properties文件
jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl
jbpm.task.instance.class=org.jbpm.taskmgmt.exe.TaskInstance

# uncomment the next line if JbpmSessionFactory.getInstance()
# should lookup the singleton instance from JNDI instead of creating
# a default one.
#
#jbpm.session.factory.jndi.name=java:/jbpm/JbpmSessionFactory

# uncomment the next line to use the file system instead of the database for
# storing files related to a process definition
#
# jbpm.files.dir=c:/jbpm.data

# resource path to a properties file that will overwrite all the hibernate
# properties. For database specific builds in db project there is a different
# hibernate.properties file on the classpath for each database. You could change
# the default database for any testing runs by uncommenting the next line and
# adding a hibernate.properties file in the basedir.
#
jbpm.hibernate.cfg.xml=jbpm.hibernate.cfg.xml
#jbpm.hibernate.properties=jbpm.hibernate.properties
編輯jbpm.hibernate.properties文件
#hibernate.dialect=org.hibernate.dialect.HSQLDialect
#hibernate.connection.datasource=java:/DefaultDS
10. 找到src/config.files目錄,編輯hibernate.cfg.xml文件
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm3</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<!-- c3p0 connection pooling properties-->
<property name="hibernate.c3p0.min_size">1</property>
<property name="hibernate.c3p0.max_size">3</property>

<property name="hibernate.query.substitutions">true 1, false 0</property>
<property name="hibernate.connection.pool_size">15</property>
11. 運行ANT腳本ant build.webapp -buildfile build.deploy.xml 生成jbpm.war,拷貝到tomcat web目錄中,啟動tomcat,輸入'http://localhost:8080/jbpm' 就可以看到他的example
1. 下載jbpm http://www.jboss.com/products/jbpm/downloads
2. 解壓,導(dǎo)入eclispe的項目中 配置MYSQL 1. 在eclipse的jpbm項目中加入mysql的lib 2. mysql創(chuàng)建一個數(shù)據(jù)庫"jbpm"
3. 在eclipse的jbpm項目中找到'jbpm-3.0\src\resources'目錄,創(chuàng)建一個自目錄'mysql'
4. 把同目錄hsqldb文件夾中的2個文件(create.db.hibernate.properties, identity.db.xml)拷貝到mysql目錄中
5. 按下面所示編輯 'create.db.hibernate.properties'








6. 在eclipse的jbpm項目中找到ant腳本'build.deploy.xml',進行編輯 找到 target name="create.db", 刪除 db.start, db.stop 在這個目標(biāo)塊中將所有的'hsqldb' 替換為 'mysql'
7. 運行ant create.db -buildfile build.deploy.xml創(chuàng)建jbpm表結(jié)構(gòu)
8. 找到target name="build.webapp"按下面進行編輯















9. 找到目錄src/resources,編輯jbpm.properties文件






















編輯jbpm.hibernate.properties文件


10. 找到src/config.files目錄,編輯hibernate.cfg.xml文件












11. 運行ANT腳本ant build.webapp -buildfile build.deploy.xml 生成jbpm.war,拷貝到tomcat web目錄中,啟動tomcat,輸入'http://localhost:8080/jbpm' 就可以看到他的example