当前位置:网站首页>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)
边栏推荐
- 为拿 Offer,“闭关修炼,相信努力必成大器
- requests的深入刨析及封装调用
- QML type: locale, date
- postman之参数化详解
- Global and Chinese markets for hardware based encryption 2022-2028: Research Report on technology, participants, trends, market size and share
- Redis之持久化实操(Linux版)
- 软件负载均衡和硬件负载均衡的选择
- Sqlmap installation tutorial and problem explanation under Windows Environment -- "sqlmap installation | CSDN creation punch in"
- Using label template to solve the problem of malicious input by users
- An article takes you to understand the working principle of selenium in detail
猜你喜欢
Reids之删除策略
Ijcai2022 collection of papers (continuously updated)
SimCLR:NLP中的对比学习
An article takes you to understand the working principle of selenium in detail
Redis geospatial
[OC foundation framework] - [set array]
Minio distributed file storage cluster for full stack development
leetcode-14. Longest common prefix JS longitudinal scanning method
Kratos战神微服务框架(二)
I-BERT
随机推荐
Mysql database recovery (using mysqlbinlog command)
Redis之性能指标、监控方式
Global and Chinese market of electronic tubes 2022-2028: Research Report on technology, participants, trends, market size and share
[oc]- < getting started with UI> -- learning common controls
Full stack development of quartz distributed timed task scheduling cluster
Multivariate cluster analysis
QML type: locale, date
AcWing 2456. 记事本
go-redis之初始化連接
Redis cluster
【shell脚本】——归档文件脚本
I-BERT
Master slave replication of redis
What is MySQL? What is the learning path of MySQL
postman之参数化详解
LeetCode41——First Missing Positive——hashing in place & swap
Withdrawal of wechat applet (enterprise payment to change)
Kratos战神微服务框架(三)
Redis之Geospatial
Redis之持久化实操(Linux版)