当前位置:网站首页>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)

边栏推荐
- 【文本生成】论文合集推荐丨 斯坦福研究者引入时间控制方法 长文本生成更流畅
- Full stack development of quartz distributed timed task scheduling cluster
- What is an R-value reference and what is the difference between it and an l-value?
- Leetcode problem solving 2.1.1
- Redis connection redis service command
- Advance Computer Network Review(1)——FatTree
- 一篇文章带你了解-selenium工作原理详解
- Advanced Computer Network Review(5)——COPE
- [three storage methods of graph] just use adjacency matrix to go out
- Pytest parameterization some tips you don't know / pytest you don't know
猜你喜欢

QML type: locale, date

Kratos战神微服务框架(一)

An article takes you to understand the working principle of selenium in detail

Design and implementation of online shopping system based on Web (attached: source code paper SQL file)

Kratos战神微服务框架(二)

Redis cluster

BN折叠及其量化

LeetCode41——First Missing Positive——hashing in place & swap

软件负载均衡和硬件负载均衡的选择

Sqlmap installation tutorial and problem explanation under Windows Environment -- "sqlmap installation | CSDN creation punch in"
随机推荐
QDialog
Solve the problem of inconsistency between database field name and entity class attribute name (resultmap result set mapping)
Pytest parameterization some tips you don't know / pytest you don't know
Pytest参数化你不知道的一些使用技巧 /你不知道的pytest
[shell script] use menu commands to build scripts for creating folders in the cluster
CSP salary calculation
Chapter 1 :Application of Artificial intelligence in Drug Design:Opportunity and Challenges
使用标签模板解决用户恶意输入的问题
Kratos战神微服务框架(二)
KDD 2022论文合集(持续更新中)
QML control type: Popup
【shell脚本】——归档文件脚本
Intel distiller Toolkit - Quantitative implementation 1
Redis cluster
An article takes you to understand the working principle of selenium in detail
Global and Chinese market of appointment reminder software 2022-2028: Research Report on technology, participants, trends, market size and share
Selenium+Pytest自动化测试框架实战
【图的三大存储方式】只会用邻接矩阵就out了
【shell脚本】使用菜单命令构建在集群内创建文件夹的脚本
不同的数据驱动代码执行相同的测试场景