springboot activiti workflow structures of ~

concept

Activiti use of workflow products is relatively more, comes with a set of UI interface, can be used directly for the design process, the following simple steps summarize it:

1 design model

2 for the release process, a model can publish multiple versions of processes

3 to establish a process instance, and tasks, a process can create multiple instances of parallel

4 approval for an instance of the task

5 You can view real-time process instance state

Deployed in the project

Add Reference

   annotationProcessor 'org.projectlombok: lombok: 1.18.2' need references lombok after //gradle5.0
    compileOnly 'org.projectlombok:lombok:1.18.2'
    test notation processor '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: active-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')

Add the startup file

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);
    }

}

Add yml Configuration

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:
      bill-auto: none
    show-sql: true

  Activity:
    check-process-definitions: false
    font:
      activityFontName: Times New Roman
      labelFontName: Times New Roman

Access Model Add Page

 

After saving, adding data in the model table ACT_RE_MODEL, ACT_GE_BYTEARRAY resource table will generate data objects, such as pictures and model model corresponding XML files.

 

Guess you like

Origin www.cnblogs.com/lori/p/12217572.html