activiti5.12 Study Notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.