码迷,mamicode.com
首页 > 编程语言 > 详细

【Activiti】activiti与spring的集成

时间:2016-08-08 12:49:14      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc"
    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.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
        ">
        <!-- 引擎配置对象 -->
    <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource"/><!-- 使用spring中已经配置好的dataSource -->
        <property name="databaseSchemaUpdate" value="true"/><!-- activiti建表策略 -->
        <property name="transactionManager" ref="transactionManager"/><!-- 使用spring已经配置好的事务管理器 -->
    </bean>
    <!-- processEngine对象 -->
    <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
        <property name="processEngineConfiguration" ref="processEngineConfiguration" />
    </bean>
    <!-- 将wokrflow的核心服务对象交给spring管理 -->
    <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="workFlowService" class="com.tabchanj.crm.service.impl.WorkFlowServiceImpl">
     <property name="repositoeyService" ref="repositoryService"></property>
     <property name="runtimeService" ref="runtimeService"></property>
     </bean>
 </beans>

 

【Activiti】activiti与spring的集成

标签:

原文地址:http://www.cnblogs.com/tabchanj/p/5748672.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!