Activiti and Spring Integration:
<?xml version= "1.0" encoding= "UTF-8"?>
<beans ........ .................
..................................
"default-lazy-init=" false ">
<!--database operation--
<!--<bean id= "DataSource"
class= "Org.apache.commons.dbcp.BasicDataSource" >
<property name= "Driverclassname"
Value= "Oracle.jdbc.driver.OracleDriver" >
</property>
<property name= "url"
Value= "JDBC:ORACLE:THIN:@219.137.250.189:1521:ORCL" >
</property>
<property name= "username" value= "Ws_user" ></property>
<property name= "Password" value= "Ws_pass" ></property>
</bean>
<bean id= "DataSource"
class= "Org.apache.commons.dbcp.BasicDataSource" >
<property name= "Driverclassname"
Value= "Oracle.jdbc.driver.OracleDriver" >
</property>
<property name= "url"
Value= "Jdbc:oracle:thin: @localhost: 1521:orcl" >
</property>
<property name= "username" value= "LZJ" ></property>
<property name= "Password" value= "Lzj" ></property>
</bean>
<!--hibernate configuration--
<bean id= "Sessionfactory"
class= "Org.springframework.orm.hibernate3.LocalSessionFactoryBean" >
<property name= "DataSource" >
<ref bean= "DataSource"/>
</property>
<property name= "Hibernateproperties" >
<props>
<!--Database dialect---
<prop key= "Hibernate.dialect" >
Org.hibernate.dialect.Oracle9Dialect
</prop>
<prop key= "Hibernate.show_sql" >true</prop>
<prop key= "hibernate.jdbc.batch_size" >30</prop><!--bulk Operation--
<prop key= "Hibernate.cache.use_second_level_cache" >true</prop><!--Level two cache--
</props>
</property>
</bean>
<!--configuration Transaction Manager-
<bean id= "TransactionManager" class= "Org.springframework.jdbc.datasource.DataSourceTransactionManager" >
<property name= "DataSource" ref= "DataSource"/>
</bean>
<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>
<!--This is a few main interfaces with 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>
Required JAR Packages:
The necessary jar packages, database-driven jar packages, and Mybatis-3.2.2.jar on the website Lib
Activiti Operation Flow:
1. Flowchart actions: Define, deploy, view, delete
2. Business operations: Start the business (also specify the next task operator), process related business (a. Process variables, B, fields in the table Business_key), query personal business, dynamically specify the next task Manager (self-closing to get the current user's superiors), Transact business (write the URL to the diagram, Dynamically get formkey at execution time by configuring the Action return value $ (#url), Query Task (task ID----->taskid------>business_key------------> Request form Information)
Note: Activiti can query the business using the fields in the process table, or you can query the process ID based on the business ID
activiti5.12 Study Notes