Activiti6 self-Road (X) - Coding leave approval process (complete process)

Previous chapters we have learned about the use and functions of Activiti6, made integration with the springboot,
create a flow chart of a front of us, and now we are to achieve the whole process through the actual coding!

The following is a flowchart leave approval
Here Insert Picture Description

A start springboot, generates 28 tables corresponding activiti

@SpringBootApplication(exclude = SecurityAutoConfiguration.class) 
public class SpringBootActivityApplication
{
    public static void main(String[] args)
    {
        SpringApplication.run(SpringBootActivityApplication.class, args);
    }
}

Start a program to automatically generate database table 28

https://blog.csdn.net/qq_29914837/article/details/91896419

Second, the deployment flowchart of a resource file created leave.bpmn

//1、部署流程资源【第一种方式:classpath】
	@RequestMapping("/deploy1")
	public void deploy1( ){	
		Deployment deployment = processEngine.getRepositoryService()//获取流程定义和部署对象相关的Service
				.createDeployment()//创建部署对象
				.name("请假申请审核流程")//声明流程的名称
				.addClasspathResource("processes/leave.bpmn")//加载资源文件,一次只能加载一个文件
				.addClasspathResource("processes/leave.png")//
				.deploy();//完成部署
		System.out.println("部署ID:"+deployment.getId());//1
		System.out.println("部署时间:"+deployment.getDeploymentTime());
 
	}

Here Insert Picture Description

https://blog.csdn.net/qq_29914837/article/details/91912537

Third, create users and groups in Activiti

https://blog.csdn.net/qq_29914837/article/details/92104148#commentBox

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Fourth, create Activiti individual tasks and group tasks

https://blog.csdn.net/qq_29914837/article/details/92259986

Fifth, the leave application and leave the database table design approval

https://blog.csdn.net/qq_29914837/article/details/92396204

VI View flowchart

https://blog.csdn.net/qq_29914837/article/details/92391214
Here Insert Picture Description


If you think this article to help you, then click the Follow button troublesome picture on the right, thank you!

Technical progress in the exchange, dissemination of knowledge sharing in

Guess you like

Origin blog.csdn.net/qq_29914837/article/details/91913622