2-activiti数据库介绍以及配置文件


activiti与spring整合需要的jar包


 
  <dependency>
         <groupId>org.activitigroupId>
         <artifactId>activiti-engineartifactId>
         <version>${activiti.version}version>
     dependency>
     
     <dependency>
         <groupId>org.activitigroupId>
         <artifactId>activiti-springartifactId>
         <version>${activiti.version}version>
     dependency>

spring-activitici.xml



<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    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">

    
    <bean id="dataSource_act" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${driverClass}" />
        <property name="url" value="${jdbcUrlActi}" />
        <property name="username" value="${username}" />
        <property name="password" value="${password}" />
    bean>

    
    <bean id="transactionManager_act" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource_act" />
    bean>

    <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource_act" />
        <property name="transactionManager" ref="transactionManager_act" />
        <property name="databaseSchemaUpdate" value="true" />
        <property name="jobExecutorActivate" value="false" />
        
        
        
        <property name="history" value="full" />
        <property name="databaseType" value="mysql" />
        <property name="dbIdentityUsed" value="false" />
        
        <property name="dbHistoryUsed" value="true" />
        
        <property name="createDiagramOnDeploy" value="false" />
        
        <property name="activityFontName" value="宋体" />
        <property name="labelFontName" value="宋体" />
        
        <property name="xmlEncoding" value="utf8" />
        
        <property name="processEngineLifecycleListener" ref="myProcessEngineLifecycleListener" />
    bean>



    <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
        <property name="processEngineConfiguration" ref="processEngineConfiguration" />
    bean>

    <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" />

    
    
beans>

Acitiviti引擎配置管理器参数及其含义


2-activiti数据库介绍以及配置文件_第1张图片


日志


本人使用的为log4j2版本

 
 <logger name="org.activiti" level="debug" />

你可能感兴趣的:(activiti)