当前位置:网站首页>Workflow - activiti7 environment setup
Workflow - activiti7 environment setup
2022-07-06 09:26:00 【Java domain】
1. What is workflow
workflow (Workflow), It is to automate the management of business processes through computers . Its main solution is “ Enable multiple participants According to some predefined
The rules of automatically transfer documents 、 The process of information or tasks , To achieve a desired business goal , Or make it happen ”.
2. build activiti Environmental Science
2.1 What is? activiti
Alfresco Software in 2010 year 5 month 17 Announced Wednesday Activiti Business process management (BPM) The official launch of the open source project , Its chief architect is managed by business processes BPM
Expert Tom Baeyens As a ,Tom Baeyens It's the original jbpm Architect , and jbpm Is a very famous workflow engine , Of course activiti It is also a workflow engine .
Activiti It's a workflow engine , activiti It can extract the complex business processes from the business system , Use a special modeling language (BPMN2.0) Define ,
The business system performs according to a predefined process , Realize the business of the business system Process by activiti Conduct management , Reduce system upgrade of business system due to process change
Workload of level I reconstruction , So as to improve the robustness of the system , At the same time, it also reduces the cost of system development and maintenance .
2.2 open IDEA —> File —> Settings —> Plugins
Select the path to download jar Package selection idea Plug in website :
https://plugins.jetbrains.com/
Restart after selection
At this point, we can see BpmmFile
3. establish bpmn Document making process control chart
4. development environment
4.1 Import dependence
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<slf4j.version>1.6.6</slf4j.version>
<log4j.version>1.2.12</log4j.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>7.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring</artifactId>
<version>7.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-bpmn-model</artifactId>
<version>7.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-bpmn-converter</artifactId>
<version>7.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-json-converter</artifactId>
<version>7.0.0.Beta1</version>
</dependency>
<!-- <dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-bpmn-layout</artifactId>
<version>7.0.0.Beta1</version>
</dependency>-->
<dependency>
<groupId>org.activiti.cloud</groupId>
<artifactId>activiti-cloud-services-api</artifactId>
<version>7.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.40</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- log start -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- log end -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.5</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
4.2 establish Activiti The configuration file activiti.cfg.xml( Create a database ahead of time )
<!-- data source -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/activiti-y2170"/>
<property name="username" value="root"/>
<property name="password" value="123"/>
</bean>
<!-- To configure Activiti The use of processEngine object The default name is processEngineConfiguration-->
<bean id="processEngineConfiguration01" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<!-- Inject data source -->
<property name="dataSource" ref="dataSource"/>
<!-- Configure data source mode 2 :-->
<!--<property name="jdbcDriver" value="com.mysql.jdbc.Driver"/>-->
<!-- Specify the database generation policy -->
<property name="databaseSchemaUpdate" value="true"/>
</bean>
4.3 Create a log profile
# Set root category priority to INFO and its only appender to CONSOLE.
#log4j.rootCategory=INFO, CONSOLE debug info warn error fatal
log4j.rootCategory=debug, CONSOLE, LOGFILE
# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=d:\axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n
4.4 Create a test class load configuration file
public static void main(String[] args) {
// Load the configuration
ProcessEngineConfiguration configuration = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml");
// obtain ProcessEngine object
ProcessEngine processEngine = configuration.buildProcessEngine();
}
4.5 After starting the project, the database will be added 25 A watch
If this article helps you , Don't forget to give me a 3 even , give the thumbs-up , forward , Comment on ,
I'll see you next time ! Learn more JAVA Knowledge and skills ( Get the original ), Follow up with private bloggers (666)
边栏推荐
- 基于B/S的影视创作论坛的设计与实现(附:源码 论文 sql文件 项目部署教程)
- Show slave status \ read in G_ Master_ Log_ POS and relay_ Log_ The (size) relationship of POS
- xargs命令的基本用法
- Intel distiller Toolkit - Quantitative implementation 3
- Redis之五大基础数据结构深入、应用场景
- 一文读懂,DDD落地数据库设计实战
- Global and Chinese market of capacitive displacement sensors 2022-2028: Research Report on technology, participants, trends, market size and share
- Intel distiller Toolkit - Quantitative implementation 1
- Lua script of redis
- Global and Chinese markets of SERS substrates 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
什么是MySQL?MySql的学习之路是怎样的
Persistence practice of redis (Linux version)
Redis geospatial
Simclr: comparative learning in NLP
Reids之缓存预热、雪崩、穿透
[oc]- < getting started with UI> -- common controls uibutton
Master slave replication of redis
面渣逆袭:Redis连环五十二问,图文详解,这下面试稳了
Heap (priority queue) topic
基于B/S的网上零食销售系统的设计与实现(附:源码 论文 Sql文件)
随机推荐
Ijcai2022 collection of papers (continuously updated)
Global and Chinese market of AVR series microcontrollers 2022-2028: Research Report on technology, participants, trends, market size and share
QML type: overlay
Publish and subscribe to redis
Pytest参数化你不知道的一些使用技巧 /你不知道的pytest
基于B/S的网上零食销售系统的设计与实现(附:源码 论文 Sql文件)
[daily question] Porter (DFS / DP)
一改测试步骤代码就全写 为什么不试试用 Yaml实现数据驱动?
七层网络体系结构
Advanced Computer Network Review(5)——COPE
CUDA implementation of self defined convolution attention operator
Show slave status \ read in G_ Master_ Log_ POS and relay_ Log_ The (size) relationship of POS
Global and Chinese market of electric pruners 2022-2028: Research Report on technology, participants, trends, market size and share
Post training quantification of bminf
The order of include header files and the difference between double quotation marks "and angle brackets < >
Simclr: comparative learning in NLP
Persistence practice of redis (Linux version)
Selenium+Pytest自动化测试框架实战
Booking of tourism products in Gansu quadrupled: "green horse" became popular, and one room of B & B around Gansu museum was hard to find
xargs命令的基本用法