1、下載下傳jbpm4.3的包.下載下傳位址.谷歌搜尋.謝謝
2、在eclipse中安裝jpdl插件.如何安裝,請看上一篇部落格
3、建立web項目,導入ssh架構所需要的包,以及jbpm包.如果你說你不會,那就甭幹程式員了,哈哈
4、建立ssh架構的必要環境.如在web.xml中配置struts.xml,struts.xml中配置spring.xml(即applicationContext.xml)檔案.如果你不會.那就看下面的代碼.
spring.xml檔案中建立連接配接資料庫的環境.如下:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:net
public void setServlet(ActionServlet actionServlet) {
super.setServlet(actionServlet);
if (actionServlet != null) {
processEngine = new Configuration().buildProcessEngine();
repositoryService = processEngine.getRepositoryService();
executionService = processEngine.getExecutionService();
taskService = processEngine.getTaskService();
}
}
下一下:
jbpm.cfg.xml檔案寫入:
<import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<!--一般是jbpm.tx.hibernate.cfg.xml改為以下檔案-->
<import resource="jbpm.tx.spring.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
<import resource="jbpm.bpmn.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
<!-- Job executor is excluded for running the example test cases. -->
<!-- To enable timers and messages in production use, this should be included. -->
<!--
<import resource="jbpm.jobexecutor.cfg.xml" />
-->
<import resource="jbpm.mail.templates.examples.xml" />
<!--注意,加此處是因為如果不是預設的applicationContext.xml檔案就需要加以下代碼以及路徑了-->
<process-engine-context>
<string name="spring.cfg" value="classpath:spring.xml" />
</process-engine-context>
後面,就可以随心所欲的使用jbpm了.架構與JBPM4.3整合完畢。謝謝..其他的問題自行解決.
最後一點注意,spring的業務類注入時要與spring.xml(applicationContext.xml)分開注入,不要放在一個配置檔案裡面,要不然,會一直循環啟動的.