首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

jbpm集成spring施用步骤

2012-11-21 
jbpm集成spring使用步骤1、安装jpdl插件到myeclipse。http://www.cnblogs.com/chuyuhuashi/archive/2012/03/

jbpm集成spring使用步骤

1、安装jpdl插件到myeclipse。http://www.cnblogs.com/chuyuhuashi/archive/2012/03/27/2418841.html

?

2.下载jbpm4.4.把

J:\jbpm\jbpm-4.4\install\src\cfg\jbpm下的spring.jbpm.cfg复制到新项目中,改为jbpm.cfg.xml

新建hibernate.properties文件:

dataSource.password=rootdataSource.username=rootdataSource.databaseName=jbpmdbdataSource.driverClassName=com.mysql.jdbc.DriverdataSource.dialect=org.hibernate.dialect.MySQLInnoDBDialectdataSource.serverName=localhost:3306dataSource.url=jdbc:mysql://${dataSource.serverName}/${dataSource.databaseName}dataSource.properties=user=${dataSource.username};databaseName=${dataSource.databaseName};serverName=${dataSource.serverName};password=${dataSource.password}dataSource.hbm2ddl.auto=update

?applicationContext.xml文件:

<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"   xmlns:aop="http://www.springframework.org/schema/aop"  xmlns:context="http://www.springframework.org/schema/context"   xmlns:tx="http://www.springframework.org/schema/tx"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:p="http://www.springframework.org/schema/p"  xsi:schemaLocation="    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">  <context:annotation-config />  <bean  p:location="hibernate.properties"  p:ignoreUnresolvablePlaceholders="true"/>    <bean id="springHelper" />  <bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />  <bean id="sessionFactory" ref="dataSource" />    <property name="mappingResources">       <list>            <value>jbpm.repository.hbm.xml</value>            <value>jbpm.execution.hbm.xml</value>            <value>jbpm.history.hbm.xml</value>            <value>jbpm.task.hbm.xml</value>            <value>jbpm.identity.hbm.xml</value>        </list>    </property>    <property name="hibernateProperties">        <props>            <prop key="hibernate.dialect">${dataSource.dialect}</prop>            <prop key="hibernate.hbm2ddl.auto">${dataSource.hbm2ddl.auto}</prop>        </props>    </property>  </bean>  <bean id="transactionManager" ref="sessionFactory" />    <property name="dataSource" ref="dataSource" />  </bean>  <bean id="dataSource" value="${dataSource.driverClassName}" />    <property name="url" value="${dataSource.url}" />    <property name="username" value="${dataSource.username}" />    <property name="password" value="${dataSource.password}" />  </bean></beans>

?3.测试用的流程test.jpdl.xml,test将作为jpdl的process的name

<?xml version="1.0" encoding="UTF-8"?><process xmlns="http://jbpm.org/4.4/jpdl" name="test"><start g="94,64,48,48" name="start1">      <transition g="-52,-22" name="A" to="A"/>   </start>   <task assignee="A" g="73,195,92,52" name="A">      <transition g="-52,-22" name="B" to="B"/>   </task>   <task assignee="B" g="266,192,92,52" name="B">      <transition g="-40,-21" name="end" to="end1"/>   </task>   <end g="290,327,48,48" name="end1"/></process>
?

?

http://www.blogjava.net/pengo/archive/2010/01/04/308219.html

http://www.blogjava.net/wangxinsh55/archive/2011/07/24/354925.html

?

?

?

热点排行