1, the use of related development tools software.
1) Eclipse IDE for Java EE Developers (Eclipse 4.2)
2) jBPM4.4
3) MySQL5.6
2. Configure the GPD plug-in for the design process in eclipse. (for drawing custom processes)
1) GPD Plugin directory: Jbpm-4.4\install\src\gpd\jbpm-gpd-site.zip
2) Install plugin: Eclipse menu Help-->install New softwore ... Open the Install window, and in the Install window, click Add ... Open the Add Repository window; In the Add Repository window, click Archive ... Select Jbpm-gpd-site.zip in the directory where the plugin is located.
3) When the installation is complete, you will be prompted to restart Eclipse and select Restart.
3, integration with SSH2.
want to let JBPM4.4 and SSH2 integration, first of all must first let SSH2 integration good, that is necessary. On the integration of SSH2, I do not have a lot of money in this, online information a lot. before integration, it is necessary to first have a perceptual understanding of jbpm. JBPM is required to support database tables when it comes to managing processes, because the underlying logic is so complex. The default download-down configuration is using the in-memory database. In practical applications, we need to connect to our database. people who have studied jbpm know that jbpm in the process of operation, everything is based on processengine objects, so the idea of integration is very simple, as long as we can let spring create processengine, integration, even if it is a big step, Let's add the following code to the spring configuration file (applicationcontext.xml):
[HTML]View Plaincopyprint?
- <!--configuration Processengine--
- <Bean id= "springhelper" class="Org.jbpm.pvm.internal.processengine.SpringHelper " >
- < name= "jbpmcfg" value="Jbpm.cfg.xml"></ Property >
- </Bean>
- <Bean id="Processengine" factory-bean="Springhelper" factory-method=" Createprocessengine " />
Here you create the Processengine object, where you use the jbpm.cfg.xml, which reads as follows:
[HTML]View Plaincopyprint?
- <? XML version= "1.0" encoding="UTF-8"?>
- <jbpm-configuration>
- <import resource="Jbpm.default.cfg.xml" />
- <import resource="Jbpm.businesscalendar.cfg.xml" />
- <!--integration with spring requires importing Jbpm.tx.spring.cfg.xml files --
- <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" />
- </jbpm-configuration>
See here, perhaps you will ask again: Spring-jbpm4.cfg.xml and so many files, where are these files? These files, you don't have to worry, they are all in the Jbpm.jar file, this is not our tube. are you done here? Not yet! Previously said, JBPM to database table support to work, JBPM is also using Hibernate operation database, it is unavoidable to configure Hibernate table and entity mapping file, as follows:
[HTML]View Plaincopyprint?
- <! DOCTYPE hibernate-configuration Public
- "-//hibernate/hibernate Configuration DTD 3.0//en"
- "Http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
- <hibernate-configuration>
- <session-factory>
- <!--database Information --
- <property name="dialect">org.hibernate.dialect.mysql5innodbdialect</ Property>
- < name="Connection.url">jdbc:mysql:///itcastoa_20120216</Property >
- <property name="Connection.driver_class">com.mysql.jdbc.driver</ Property>
- < name="Connection.username">root </Property>
- < name="Connection.password">root </Property>
- <!--Other configurations --
- < name="Show_sql">true </Property>
- < name="Hbm2ddl.auto">update </Property>
- <!--import JBPM4.4 mapping files--
- <mapping resource="Jbpm.repository.hbm.xml" />
- <mapping resource="Jbpm.execution.hbm.xml" />
- <mapping resource="Jbpm.history.hbm.xml" />
- <mapping resource="Jbpm.task.hbm.xml" />
- <mapping resource="Jbpm.identity.hbm.xml" />
- <!--import your own mapping configuration (fill in your case) -
- <mapping resource="Cn/itcast/oa/domain/user.hbm.xml" />
- <mapping resource="Cn/itcast/oa/domain/department.hbm.xml" />
- <mapping resource="Cn/itcast/oa/domain/role.hbm.xml" />
- </session-factory>
- </hibernate-configuration>
See here, and perhaps you will ask, where are these *.hbm.xml files? Rest assured, these, again in the Jbpm.jar, we just load on the line.
The next step is to add the jar package, if you have integrated the SSH2, then you just need to add
Jbpm.jar, Juel-api.jar, Juel-engine.jar, Juel-impl.jar, Mail.jar
All this work is done. Your JBPM+SSH2 environment is complete.
jbpm4.4 Environment Construction