ssh整合activiti5工作流

百度百科:
[url]http://baike.baidu.com/view/4845351.htm[/url]
下载地址:
[url]http://www.activiti.org/[/url]
选择activiti5的原因:
1.osworkflow很老了,基本上没有新的资料。
2.jbpm4与jbpm5基本上是2套东西,对于jbpm4比较熟悉(看了很久的资料)
3.activiti5相当于jbpm4的升级版
注意:
activiti5的持久层中间件用的是mybatis
如何整合:
一.搭建ssh框架,这个不多说了,网上一搜一大堆。
二.整合activiti5,很简单的整合步骤
1.jar包:

activiti-engine-5.10.jar
activiti-spring-5.10.jar//与Spring整合必须

2.spring配置文件:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
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"
default-lazy-init="false">
<!-- default-autowire="byName" 这个SpringProcessEngineConfiguration中的transactionManager是PlatformTransactionManager,所以不能用byName方式 -->
<!-- activiti5 -->
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="false" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<!-- 这个是用activiti5几个主要的接口 -->
<bean id="repositoryService" factory-bean="processEngine"
factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine"
factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine"
factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine"
factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine"
factory-method="getManagementService" />
<bean id="identityService" factory-bean="processEngine"
factory-method="getIdentityService" />

</beans>

3.调用:junit测试是否能取到processEngine等,若取到值,则证明配置正确

private RuntimeService runtimeService;
public void setRuntimeService(RuntimeService runtimeService) {
this.runtimeService = runtimeService;
}

参考资料:
[u]网路冷眼@BlogJava[/u]
[url]http://www.blogjava.net/lewhwa/archive/2010/12/05/339823.html[/url]
[u]咖啡兔[/u]
[url]http://www.kafeitu.me/activiti/2012/05/26/kft-activiti-demo.html[/url]
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值