标签:设计模型 array rgs figure gradle dia 启动 def uav
工作流产品使用activiti的算是比较多了,自带了一套UI界面,可以直接使用,用来设计流程,下面简单总结一下它的步骤:
1 设计模型
2 发布为流程,一个模型可以发布多个版本的流程
3 建立一个流程的实例和实例任务,一个流程可以建立多个并行的实例
4 对某个实例任务进行审批
5 可以查看实时的流程实例状态
添加引用
annotationProcessor ‘org.projectlombok:lombok:1.18.2‘ //gradle5.0之后需要这样引用lombok compileOnly ‘org.projectlombok:lombok:1.18.2‘ testAnnotationProcessor ‘org.projectlombok:lombok:1.18.2‘ testCompileOnly ‘org.projectlombok:lombok:1.18.2‘ implementation ‘org.springframework.boot:spring-boot-starter-jdbc‘ implementation ‘org.springframework.boot:spring-boot-starter-web‘ implementation ‘org.springframework.boot:spring-boot-starter-data-jpa‘ implementation ‘org.activiti:activiti-diagram-rest:5.22.0‘ implementation ‘org.activiti:activiti-modeler:5.22.0‘ implementation ‘org.activiti:activiti-spring-boot-starter-basic:5.22.0‘ implementation ‘org.springframework.boot:spring-boot-starter-jdbc‘ implementation ‘mysql:mysql-connector-java‘ implementation ‘org.assertj:assertj-core:3.3.0‘ implementation ‘com.google.guava:guava:18.0‘ testImplementation ‘com.h2database:h2:1.3.176‘ testImplementation(‘org.springframework.boot:spring-boot-starter-test‘)
添加启动文件
import org.activiti.spring.boot.SecurityAutoConfiguration; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication(exclude = {SecurityAutoConfiguration.class, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,}) public class AvtivitiApplication { public static void main(String[] args) { SpringApplication.run(AvtivitiApplication.class, args); } }
添加yml配置
server: port: 8081 spring: application: name: activiti-demo datasource: driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=utf-8&useSSL=false username: root password: root jpa: hibernate: ddl-auto: none show-sql: true activiti: check-process-definitions: false font: activityFontName: 宋体 labelFontName: 宋体
访问模型添加页面
保存之后,将在模型表ACT_RE_MODEL添加数据,ACT_GE_BYTEARRAY资源表也会生成对象的数据,如模型的图片和模型对应的XML文件等。
标签:设计模型 array rgs figure gradle dia 启动 def uav
原文地址:https://www.cnblogs.com/lori/p/12217572.html