jbpm3整合spring3

jbpm3.2.3:jbpm-jpdl-suite-3.2.3

spring3.0.4

spring-modules-jbpm31-0.5.jar

jre1.6

tomcat6.0.36

mysql5.5

一:拷贝相关的依赖包到WEB-INF/lib下面(bsh.jar/ jcr-1.0.jar/jbpm-identity.jar/ jbpm-jpdl.jar)

二:拷贝jbpm包config文件夹下的hibernate.cfg.xml到classpath下,结合实际的数据库环境做出修改。

打开以下实体映射的注释:

<mapping resource="org/jbpm/identity/User.hbm.xml"/>
    <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
    <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>


三:拷贝jbpm包src文件夹下jpdl/org/jpbm/default.jbpm.cfg.xml到classpath下改名为jbpm.cfg.xml。

修改persistence节点的为:

<service name="persistence">
			<factory>
				<bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
					<field name="isCurrentSessionEnabled">
						<true />
					</field>
					<field name="isTransactionEnabled">
						<false />
					</field>
				</bean>
			</factory>
		</service>


四:spring配置文件中加入:

<bean id="jbpmConfiguration"
		class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
		<property name="sessionFactory" ref="sessionFactory" />
		<property name="configuration" value="classpath:jbpm.cfg.xml" />
		<property name="processDefinitions">
			<list>

			</list>
		</property>
		<property name="createSchema" value="false" />
	</bean>

五:创建数据库

第一种方式:不需要hibernate.cfg.xml文件。找到jbpm包db/jbpm.jpdl.mysql.sql文件,使用editplus打开,删除前面的alter table....,然后为下面的每一条sql语句加上分号,就可以去mysql中建表了。

第二种方式:需要hibernate.cfg.xml文件。在jbpmConfiguration的bean配置中设定createSchema为true,这样每次启动项目都会创建表。

使用方式:

package com.jbpm.controller;

import javax.annotation.Resource;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.jbpm.db.GraphSession;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jbpm.dao.BaseDao;

@Controller
public class HelloController {
	@Resource
	JbpmConfiguration jbpmConfiguration;
	@Resource
	BaseDao baseDao;
	@RequestMapping("/hello")
	@Transactional
	public void hello() {
		deployProcessDefinition();
		processInstanceIsCreatedWhenUserSubmitsWebappForm();
		throw new RuntimeException("异常");
	}

	public void deployProcessDefinition() {
		ProcessDefinition processDefinition = ProcessDefinition
				.parseXmlString("<process-definition name='hello world'>"
						+ "  <start-state name='start'>"
						+ "    <transition to='s' />" + "  </start-state>"
						+ "  <state name='s'>" + "    <transition to='end' />"
						+ "  </state>" + "  <end-state name='end' />"
						+ "</process-definition>");
		JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
		System.out.println(jbpmContext.getSession() == this.baseDao.getHibernateSession());
		try {
			jbpmContext.deployProcessDefinition(processDefinition);
		} finally {
			jbpmContext.close();
		}
	}

	public void processInstanceIsCreatedWhenUserSubmitsWebappForm() {
		JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
		try {
			GraphSession graphSession = jbpmContext.getGraphSession();
			System.out.println(jbpmContext.getSession() == this.baseDao.getHibernateSession());
			ProcessDefinition processDefinition = graphSession
					.findLatestProcessDefinition("hello world");
			ProcessInstance processInstance = new ProcessInstance(
					processDefinition);
			Token token = processInstance.getRootToken();
			Assert.isTrue("start".equals(token.getNode().getName()));
			token.signal();
			Assert.isTrue("s".equals(token.getNode().getName()));
			jbpmContext.save(processInstance);
		} finally {
			jbpmContext.close();
		}
	}
}


web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
	<filter>
		<filter-name>encodingFilter</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>encodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<filter>
		<filter-name>openSessionInView</filter-name>
		<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>openSessionInView</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<servlet>
		<servlet-name>springmvc</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>0</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>springmvc</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
</web-app>


applicationContext.xml:

<?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:jee="http://www.springframework.org/schema/jee"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
	<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
		destroy-method="close">
		<property name="driverClass" value="com.mysql.jdbc.Driver" />
		<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/jbpmtest" />
		<property name="user" value="root" />
		<property name="password" value="root" />
	</bean>

	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="configLocation" value="classpath:/hibernate.cfg.xml"></property>
		<property name="packagesToScan" value="com.jbpm.bean" />
	</bean>
	<bean id="jbpmConfiguration"
		class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
		<property name="sessionFactory" ref="sessionFactory" />
		<property name="configuration" value="classpath:jbpm.cfg.xml" />
		<property name="processDefinitions">
			<list>

			</list>
		</property>
		<property name="createSchema" value="true" />
	</bean>
	<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

	<bean id="transactionManager"
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

</beans>

springmvc-servlet.xml

<?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:jee="http://www.springframework.org/schema/jee"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
	<tx:annotation-driven transaction-manager="transactionManager"
		proxy-target-class="true" />
	<context:component-scan base-package="com.jbpm" />
	<bean id="viewResolver"
		class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<property name="prefix" value="/WEB-INF/jsp/"></property>
		<property name="suffix" value=".jsp" />
	</bean>
</beans>

hibernate.cfg.xml:

<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
  <session-factory>

    <!-- hibernate dialect -->
    <property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>

    <!-- JDBC connection properties (begin) -->
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmtest</property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.connection.password">root</property>
	<property name="show_sql">true</property>
    
    <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
    
    <!-- DataSource properties (begin) ===
    <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDataSource</property>
    ==== DataSource properties (end) -->
    
    <!-- JTA transaction properties (begin) ===
    <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
    <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
    ==== JTA transaction properties (end) -->

    <!-- CMT transaction properties (begin) ===
    <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
    <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
    ==== CMT transaction properties (end) -->

    <!-- logging properties (begin) ===
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.format_sql">true</property>
    <property name="hibernate.use_sql_comments">true</property>
    ==== logging properties (end) -->
    
    <!-- ############################################ -->
    <!-- # mapping files with external dependencies # -->
    <!-- ############################################ -->

    <!-- following mapping files have a dependency on  -->
    <!-- 'jbpm-identity.jar', mapping files            -->
    <!-- of the pluggable jbpm identity component.     -->
    <!-- Uncomment the following 3 lines if you        -->
    <!-- want to use the jBPM identity mgmgt           -->
    <!-- component.                                    -->
    <!-- identity mappings (begin) === -->
    <mapping resource="org/jbpm/identity/User.hbm.xml"/>
    <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
    <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
    <!-- ==== identity mappings (end) -->
    
    <!-- following mapping files have a dependency on  -->
    <!-- the JCR API                                   -->
    <!-- jcr mappings (begin) === -->
    <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
    <!-- ==== jcr mappings (end) -->


    <!-- ###################### -->
    <!-- # jbpm mapping files # -->
    <!-- ###################### -->

    <!-- hql queries and type defs -->
    <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
    <!-- hql queries used in simulation for querying historical data
         uncomment if you want to use the GetSimulationInputCommand
         or maybe you also want to use the queries yourself
         be patient: the queries need the stddev function to be enabled in your dialect
         more information on this can be found here: http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.html -->
    <!--
    <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
    -->

    <!-- graph.action mapping files -->
    <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
    
    <!-- graph.def mapping files -->
    <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
    <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>

    <!-- ############################################ -->
    <!-- # another mapping file with external dependencies # -->
    <!-- ############################################ -->
    <!-- following mapping file has a dependency on   -->
    <!-- 'bsh-{version}.jar'.                         -->
    <!-- uncomment this if you don't have bsh on your -->
    <!-- classpath.  you won't be able to use the     -->
    <!-- script element in process definition files   -->
    <!-- has to be defined below org/jbpm/graph/def/Action.hbm.xml -->
    <!-- due to the inline collection-cache elements below -->
    <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>    

    <!-- graph.node mapping files -->
    <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>

    <!-- context.def mapping files -->
    <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>

    <!-- bytes mapping files -->
    <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>

    <!-- module.def mapping files -->
    <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>

    <!-- file.def mapping files -->
    <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>

    <!-- taskmgmt.def mapping files -->
    <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
    
    <!-- scheduler.def mapping files -->
    <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
    <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>

    <!-- graph.exe mapping files -->
    <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>

    <!-- module.exe mapping files -->
    <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
        
    <!-- context.exe mapping files -->
    <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>

    <!-- job mapping files -->
    <mapping resource="org/jbpm/job/Job.hbm.xml"/>
    <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
    <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
    <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>

    <!-- taskmgmt.exe mapping files -->
    <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>

    <!-- logging mapping files -->
    <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
    <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
    <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>

    <!-- ################################### -->
    <!-- # cache settings                  # -->
    <!-- # strategy="nonstrict-read-write" # -->
    <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider # -->
    <!-- ################################### -->

    <class-cache	class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />	
    
    <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
    
    <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
	
    <class-cache 	class="org.jbpm.graph.def.Action"	usage="nonstrict-read-write" />		
	
    <class-cache 	class="org.jbpm.graph.def.Event"	usage="nonstrict-read-write" />		
    <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />	
	
    <class-cache 	class="org.jbpm.graph.def.ExceptionHandler"	usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />		
	
    <class-cache 	class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />				
    <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />	
	
    <class-cache 	class="org.jbpm.graph.def.ProcessDefinition"	usage="nonstrict-read-write" />	
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />			

    <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />			
	
    <class-cache 	class="org.jbpm.graph.def.Transition"	usage="nonstrict-read-write" />	
    <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />			
    
    <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />			
    
    <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />			
    
    <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />			
    
    <class-cache 	class="org.jbpm.instantiation.Delegation"	usage="nonstrict-read-write" />	
    
    <class-cache 	class="org.jbpm.module.def.ModuleDefinition"	usage="nonstrict-read-write" />	
    
    <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />			
    
    <class-cache 	class="org.jbpm.taskmgmt.def.TaskController"	usage="nonstrict-read-write" />	    
    <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />			
    
    <class-cache 	class="org.jbpm.taskmgmt.def.Task"	usage="nonstrict-read-write" />	    
    <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />			
    
    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />			
    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />			

    <!-- ############################ -->
    <!-- # cache settings           # -->
    <!-- # strategy="transactional" # -->
    <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.TreeCacheProvider # -->
    <!-- ############################ -->
    
    <!--
	
    <class-cache	class="org.jbpm.context.def.VariableAccess" usage="transactional" />	
    
    <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="transactional" />
    
    <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="transactional" />
	
    <class-cache 	class="org.jbpm.graph.def.Action"	usage="transactional" />		
	
    <class-cache 	class="org.jbpm.graph.def.Event"	usage="transactional" />		
    <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="transactional" />	
	
    <class-cache 	class="org.jbpm.graph.def.ExceptionHandler"	usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="transactional" />		
	
    <class-cache 	class="org.jbpm.graph.def.Node" usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.Node.events" usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="transactional" />				
    <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="transactional" />	
	
    <class-cache 	class="org.jbpm.graph.def.ProcessDefinition"	usage="transactional" />	
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="transactional" />			

    <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="transactional" />			
	
    <class-cache 	class="org.jbpm.graph.def.Transition"	usage="transactional" />	
    <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="transactional" />			
    <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="transactional" />			
    
    <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="transactional" />			
    
    <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="transactional" />			
    
    <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="transactional" />			
    
    <class-cache 	class="org.jbpm.instantiation.Delegation"	usage="transactional" />	
    
    <class-cache 	class="org.jbpm.module.def.ModuleDefinition"	usage="transactional" />	
    
    <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="transactional" />			
    
    <class-cache 	class="org.jbpm.taskmgmt.def.TaskController"	usage="transactional" />	    
    <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="transactional" />			
    
    <class-cache 	class="org.jbpm.taskmgmt.def.Task"	usage="transactional" />	    
    <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="transactional" />			
    <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="transactional" />			
    
    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="transactional" />			
    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="transactional" />			
    
    -->    

  </session-factory>
</hibernate-configuration>



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值