环境:Springboot2.2.11.RELEASE + Activiti7.1.0.M6 + MySQL
环境说明:
不要通过如下方式引包:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.activiti.dependencies</groupId>
<artifactId>activiti-dependencies</artifactId>
<version>7.1.0.M6</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
如果通过上面的方式引入会有各种问题。
正确方式:
<dependencies>
<dependency>
<groupId>org.activiti.dependencies</groupId>
<artifactId>activiti-dependencies</artifactId>
<version>7.1.0.M6</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter</artifactId>
<version>7.1.0.M6</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
不知为何activit7中要吧这security强关联。。。
以上是pom.xml中所要引入的依赖。
所有的表:

ACT_RE_*: 'RE’表示repository。这个前缀的表包含了流程定义和流程 静态资源(图片、规则等等)
ACT_RU_*: 'RU’表示runtime。这些运行时的表,包含流程实例,认为,变量,异步任务等运行中的数据。Activiti只在流程实例执行过程中保持这些数据,在流程结束时就会删除这些记录。这样运行时表可以一直很小速度很快。
ACT_HI_*: 'HI’表示history。这些表包含历史数据,比如历史流程实例,遍历,任务等等。
ACT_GE_*: 'GE’表示general。通用数据,用于不同场景。
数据表分类
通用数据(act_ge_*)

流程定义(act_re_*)

来源网络
运行实例(act_ru_*)

来源网络
历史流程(act_hi_*)

来源网络
其他

来源网络
核心类
ProcessEngine
流程引擎的抽象,可以通过此类获取需要的所有服务。
通过ProcessEngine获取,Activiti将不同生命周期的服务封装在不同Service中,包括定义、部署、运行。通过服务类可获取相关生命周期中的服务信息。
TaskService
流程运行过程中,每个任务节点的相关操作接口,如complete,delete,delegate等。
RepositoryService
流程定义和部署相关的存储服务。
RuntimeService
流程运行时相关的服务,如根据流程好启动流程实例startProcessInstanceByKey。
HistoryService
历史记录相关服务接口。
关于eclipse中安装插件就不说了,我是把插件下载下来安装的,在线安装不上。
设计请假流程

本文详细介绍使用Spring Boot 2.2.11和Activiti 7.1.0搭建请假流程的应用案例,涵盖环境配置、流程定义、任务分配及接口实现等内容。

1908

被折叠的 条评论
为什么被折叠?



