JBPM的使用心得
首先是安装4.4版本的插件.通过使用links方式安装好了插件,前提是7.0以上版本的myeclipse吧. 插件见附件jbpm_jpd_site.zip!
之后,由于插件对于中文支持不是太好,经常二次打开后,乱码,故修改myeclipse.ini,在最后加上 '-Dfile.encoding=UTF-8'. 这样做使得jbpm配置文件不再乱码.但是导致tomcat控制台中文乱码,再次修改tomcat目录下/bin/catalina.bat文件,在set JAVA OPT=XXX 这段话最后也加上'-Dfile.encoding=UTF-8' . 这样就搞定乱码问题了!
一 ssh整合jbpm了,其实很简单:
1.首先写下jbpm在spring中的配置:
<?xml version="1.0" encoding="UTF-8"?><beansxmlns="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.0.xsd"><bean id="springHelper" value="jbpm.cfg.xml" /> </bean> <bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" /> <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" /> <bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" /> <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService"/> <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService"/> <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService"/> <bean id="jbpmService" parent="baseService"> <property name="repositoryService" ref="repositoryService" /> <property name="taskService" ref="taskService" /> <property name="executionService" ref="executionService" /> <property name="jbpmLogService" ref="jbpmLogService" /> </bean> <bean id="jbpmLogService" parent="baseService"> </bean> </beans>
<?xml version="1.0" encoding="UTF-8"?><jbpm-configuration> <import resource="jbpm.default.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" /> <import resource="jbpm.businesscalendar.cfg.xml" /> <import resource="jbpm.console.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" /> --></jbpm-configuration>
<!-- 事务控制 --><bean id="transactionManager" /></property></bean><tx:advice id="txAdvice" transaction-manager="transactionManager"><tx:attributes><tx:method name="saveOrUpdate" propagation="REQUIRED" /><tx:method name="delete" propagation="REQUIRED" /><tx:method name="get" read-only="true" /><tx:method name="count" read-only="true" /><tx:method name="find" read-only="true" /></tx:attributes></tx:advice><tx:advice id="jbpmAdvice" transaction-manager="transactionManager"><tx:attributes><tx:method name="*" propagation="REQUIRED" /></tx:attributes></tx:advice><aop:config><aop:pointcut id="jbpmPointcut"expression="execution(* com.creditease.engine.**.service.*.*(..))" /><aop:pointcut id="servicePointcut"expression="execution(* com.creditease.clic.**.service.*.*(..))" /><aop:advisor advice-ref="txAdvice" pointcut-ref="servicePointcut" /><aop:advisor advice-ref="jbpmAdvice" pointcut-ref="jbpmPointcut" /></aop:config>