JEECG/SpringBoot集成flowable流程框架

news/2024/5/20 1:56:33

IDEA安装Flowable BPMN visualizer插件

Flowable BPMN visualizer

pom.xml中引入flowable相关依赖

        <dependency><groupId>org.flowable</groupId><artifactId>flowable-spring-boot-starter</artifactId><version>6.7.2</version></dependency><dependency><groupId>org.flowable</groupId><artifactId>flowable-ui-modeler-rest</artifactId><version>6.7.2</version></dependency><dependency><groupId>org.flowable</groupId><artifactId>flowable-ui-modeler-conf</artifactId><version>6.7.2</version></dependency>

yml增加flowable配置

flowable:# 异步执行async-executor-activate: true# 自动更新数据库database-schema-update: true# 校验流程文件,默认校验resources下的processes文件夹里的流程文件process-definition-location-prefix: classpath*:/processes/process-definition-location-suffixes: "**.bpmn20.xml, **.bpmn"common:app:idm-admin:password: testuser: testidm-url: http://localhost:8080/flowable-demo

项目中新增配置文件

FlowableConfig
package org.jeecg.config;import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.springframework.context.annotation.Configuration;@Configuration
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {@Overridepublic void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) {springProcessEngineConfiguration.setActivityFontName("宋体");springProcessEngineConfiguration.setLabelFontName("宋体");springProcessEngineConfiguration.setAnnotationFontName("宋体");}
}
SecurityConfiguration
package org.jeecg.config;import org.flowable.ui.common.security.SecurityConstants;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;/*** 绕过flowable的登录验证*/
@Configuration
public class SecurityConfiguration {@Configuration(proxyBeanMethods = false)@Order(SecurityConstants.FORM_LOGIN_SECURITY_ORDER - 1)public static class FormLoginWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {@Overrideprotected void configure(HttpSecurity http) throws Exception {http.headers().frameOptions().disable();http.csrf().disable().authorizeRequests().antMatchers("/modeler/**").permitAll();}}
}

流程Controller

package org.jeecg.controller;import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.engine.*;
import org.flowable.engine.runtime.Execution;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.image.ProcessDiagramGenerator;
import org.flowable.task.api.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.*;@Slf4j
@RestController
@RequestMapping("askForLeave")
public class AskForLeaveFlowableController {@Autowiredprivate RuntimeService runtimeService;@Autowiredprivate TaskService taskService;@Autowiredprivate RepositoryService repositoryService;@Autowiredprivate ProcessEngine processEngine;/*** 员工提交请假申请** @param employeeNo 员工工号* @param name       姓名* @param reason     原因* @param days       天数* @return*/@GetMapping("employeeSubmit")public String employeeSubmitAskForLeave(@RequestParam(value = "employeeNo") String employeeNo,@RequestParam(value = "name") String name,@RequestParam(value = "reason") String reason,@RequestParam(value = "days") Integer days) {HashMap<String, Object> map = new HashMap<>();/*** 员工编号字段来自于配置文件*/map.put("employeeNo", employeeNo);map.put("name", name);map.put("reason", reason);map.put("days", days);/***      key:配置文件中的下个处理流程id*      value:默认领导工号为002*/map.put("leaderNo", "002");/*** askForLeave:为开启流程的id  与配置文件中的一致*/ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("askForLeave", map);log.info("{},提交请假申请,流程id:{}", name, processInstance.getId());return "提交成功,流程id:"+processInstance.getId();}/*** 领导审核通过* @param employeeNo  员工工号* @return*/@GetMapping("leaderExaminePass")public String leaderExamine(@RequestParam(value = "employeeNo") String employeeNo) {List<Task> taskList = taskService.createTaskQuery().taskAssignee(employeeNo).orderByTaskId().desc().list();if (null == taskList) {throw  new RuntimeException("当前员工没有任何申请");}for (Task task : taskList) {if (task == null) {log.info("任务不存在 ID:{};", task.getId());continue;}log.info("任务 ID:{};任务处理人:{};任务是否挂起:{}", task.getId(), task.getAssignee(), task.isSuspended());Map<String, Object> map = new HashMap<>();/***      key:配置文件中的下个处理流程id*      value:默认老板工号为001*/map.put("bossNo", "001");/***      key:指定配置文件中的条件判断id*      value:指定配置文件中的审核条件*/map.put("outcome", "通过");taskService.complete(task.getId(), map);}return "领导审核通过";}/*** 老板审核通过* @param leaderNo  领导工号* @return*/@GetMapping("bossExaminePass")public String bossExamine(@RequestParam(value = "leaderNo") String leaderNo) {List<Task> taskList = taskService.createTaskQuery().taskAssignee(leaderNo).orderByTaskId().desc().list();if (null == taskList) {throw  new RuntimeException("当前员工没有任何申请");}for (Task task : taskList) {if (task == null) {log.info("任务不存在 ID:{};", task.getId());continue;}log.info("任务 ID:{};任务处理人:{};任务是否挂起:{}", task.getId(), task.getAssignee(), task.isSuspended());Map<String, Object> map = new HashMap<>();/***     老板是最后的审批人   无需指定下个流程*/
//            map.put("boss", "001");/***      key:指定配置文件中的条件判断id*      value:指定配置文件中的审核条件*/map.put("outcome", "通过");taskService.complete(task.getId(), map);}return "老板审核通过";}/*** 驳回** @param employeeNo  员工工号* @return*/@GetMapping("reject")public String reject(@RequestParam(value = "employeeNo") String employeeNo) {List<Task> taskList = taskService.createTaskQuery().taskAssignee(employeeNo).orderByTaskId().desc().list();if (null == taskList) {throw  new RuntimeException("当前员工没有任何申请");}for (Task task : taskList) {if (task == null) {log.info("任务不存在 ID:{};", task.getId());continue;}log.info("任务 ID:{};任务处理人:{};任务是否挂起:{}", task.getId(), task.getAssignee(), task.isSuspended());Map<String, Object> map = new HashMap<>();/***      key:指定配置文件中的领导id*      value:指定配置文件中的审核条件*/map.put("outcome", "驳回");taskService.complete(task.getId(), map);}return "申请被驳回";}/*** 生成流程图** @param processId 任务ID*/@GetMapping(value = "processDiagram")public void genProcessDiagram(HttpServletResponse httpServletResponse, String processId) throws Exception {ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();//流程走完的不显示图if (pi == null) {return;}Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();//使用流程实例ID,查询正在执行的执行对象表,返回流程实例对象String InstanceId = task.getProcessInstanceId();List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(InstanceId).list();//得到正在执行的Activity的IdList<String> activityIds = new ArrayList<>();List<String> flows = new ArrayList<>();for (Execution exe : executions) {List<String> ids = runtimeService.getActiveActivityIds(exe.getId());activityIds.addAll(ids);}//获取流程图BpmnModel bpmnModel = repositoryService.getBpmnModel(pi.getProcessDefinitionId());ProcessEngineConfiguration engconf = processEngine.getProcessEngineConfiguration();ProcessDiagramGenerator diagramGenerator = engconf.getProcessDiagramGenerator();InputStream in = diagramGenerator.generateDiagram(bpmnModel, "png", activityIds, flows,engconf.getActivityFontName(), engconf.getLabelFontName(),engconf.getAnnotationFontName(), engconf.getClassLoader(), 1.0, true);OutputStream out = null;byte[] buf = new byte[1024];int legth = 0;try {out = httpServletResponse.getOutputStream();while ((legth = in.read(buf)) != -1) {out.write(buf, 0, legth);}} finally {if (in != null) {in.close();}if (out != null) {out.close();}}}
}

创建流程【*.bpmn20.xml】

image.png

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef"><process id="askForLeave" name="ask_for_leave_process" isExecutable="true"><startEvent id="sid-b3fcb298-124a-4dc3-b603-1397b392e1a5"/><userTask id="employee" name="员工" flowable:assignee="#{employeeNo}" flowable:formFieldValidation="true"><documentation>员工提交申请</documentation></userTask><sequenceFlow id="sid-9a4f7da0-7df8-422c-8d93-fcfe6eed6454" sourceRef="sid-b3fcb298-124a-4dc3-b603-1397b392e1a5" targetRef="employee"/><userTask id="leader" name="领导" flowable:assignee="#{leaderNo}" flowable:formFieldValidation="true"/><sequenceFlow id="sid-cda53600-1fdd-4556-b1f4-434cdef4b44c" sourceRef="employee" targetRef="leader"/><exclusiveGateway id="sid-53b678ee-c126-46be-9bb7-70efe235451c"/><sequenceFlow id="sid-c18a730f-6932-4036-b105-a840204bbd1f" sourceRef="leader" targetRef="sid-53b678ee-c126-46be-9bb7-70efe235451c"/><endEvent id="sid-dc057597-34a0-4835-bbbb-1b12f0e8e407"/><sequenceFlow id="leaderExamine" sourceRef="sid-53b678ee-c126-46be-9bb7-70efe235451c" targetRef="sid-dc057597-34a0-4835-bbbb-1b12f0e8e407" name="领导审核不通过"><conditionExpression xsi:type="tFormalExpression">${outcome=='驳回'}</conditionExpression></sequenceFlow><userTask id="boss" name="老板" flowable:formFieldValidation="true" flowable:assignee="#{bossNo}"/><sequenceFlow id="leaderExaminePass" sourceRef="sid-53b678ee-c126-46be-9bb7-70efe235451c" targetRef="boss" name="领导审核通过"><conditionExpression xsi:type="tFormalExpression">${outcome=='通过'}</conditionExpression></sequenceFlow><exclusiveGateway id="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046"/><sequenceFlow id="sid-e4dd8e02-acc7-4e51-95d4-5a1ade5eb2fd" sourceRef="boss" targetRef="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046"/><endEvent id="sid-311b83fa-5c04-48af-8491-4e2f9417c49c"/><sequenceFlow id="bossExamine" sourceRef="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046" targetRef="sid-311b83fa-5c04-48af-8491-4e2f9417c49c" name="老板审核不通过"><conditionExpression xsi:type="tFormalExpression">${outcome=='驳回'}</conditionExpression></sequenceFlow><endEvent id="sid-3f6150ad-4b8c-47e9-a726-39f5dffd5e0a"/><sequenceFlow id="bossExaminePass" sourceRef="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046" targetRef="sid-3f6150ad-4b8c-47e9-a726-39f5dffd5e0a" name="老板审核通过"><conditionExpression xsi:type="tFormalExpression">${outcome=='通过'}</conditionExpression></sequenceFlow></process><bpmndi:BPMNDiagram id="BPMNDiagram_ask_for_leave"><bpmndi:BPMNPlane bpmnElement="askForLeave" id="BPMNPlane_ask_for_leave"><bpmndi:BPMNShape id="shape-c5da47a1-57a1-465c-a7f8-2aad63d19b47" bpmnElement="sid-b3fcb298-124a-4dc3-b603-1397b392e1a5"><omgdc:Bounds x="-203.0" y="-10.75" width="30.0" height="30.0"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="shape-71f351aa-e8f4-4656-9fa0-7979ddc1d916" bpmnElement="employee"><omgdc:Bounds x="-140.0" y="-10.5" width="61.0" height="29.5"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-a0cd4bce-af0a-40ce-8128-97629a5f4a23" bpmnElement="sid-9a4f7da0-7df8-422c-8d93-fcfe6eed6454"><omgdi:waypoint x="-173.0" y="4.25"/><omgdi:waypoint x="-140.0" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-6a814a53-e6e2-4453-bb4a-43a1167e5559" bpmnElement="leader"><omgdc:Bounds x="-46.5" y="-11.0" width="63.0" height="30.5"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-3a2944ef-43d6-4409-920d-9d3d1acd422f" bpmnElement="sid-cda53600-1fdd-4556-b1f4-434cdef4b44c"><omgdi:waypoint x="-79.0" y="4.25"/><omgdi:waypoint x="-46.5" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-bef28649-6416-4428-a3bd-43edb5c1b9c6" bpmnElement="sid-53b678ee-c126-46be-9bb7-70efe235451c"><omgdc:Bounds x="42.36" y="-15.75" width="40.0" height="40.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-fa69c266-5b3c-4e26-a4e2-3f58c271ebb4" bpmnElement="sid-c18a730f-6932-4036-b105-a840204bbd1f"><omgdi:waypoint x="16.5" y="4.25"/><omgdi:waypoint x="42.36" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-9d577a21-ca61-4e33-bf3e-c892557f1638" bpmnElement="sid-dc057597-34a0-4835-bbbb-1b12f0e8e407"><omgdc:Bounds x="47.36" y="54.97" width="30.0" height="30.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-5651dbf2-4118-4668-bbd6-0259282cc084" bpmnElement="leaderExamine"><omgdi:waypoint x="62.36" y="24.25"/><omgdi:waypoint x="62.36" y="54.97"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-1398abfb-fefc-4a16-881c-84a6c4b7b7f7" bpmnElement="boss"><omgdc:Bounds x="108.86" y="-12.75" width="68.0" height="34.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-3f5df081-8086-492f-a2c7-90aba1c1e4d7" bpmnElement="leaderExaminePass"><omgdi:waypoint x="82.36" y="4.25"/><omgdi:waypoint x="108.86" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-4932221b-736b-4e85-a319-0859dbeb3e6b" bpmnElement="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046"><omgdc:Bounds x="203.35999" y="-15.75" width="40.0" height="40.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-3daa1ef4-119f-4b98-a40e-0b9cb3b205ce" bpmnElement="sid-e4dd8e02-acc7-4e51-95d4-5a1ade5eb2fd"><omgdi:waypoint x="176.86" y="4.25"/><omgdi:waypoint x="203.35999" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-6becf929-e7e7-4153-a1d1-6175677742ca" bpmnElement="sid-311b83fa-5c04-48af-8491-4e2f9417c49c"><omgdc:Bounds x="208.35999" y="54.97" width="30.0" height="30.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-1f1a1414-f4f9-442a-97af-676878899415" bpmnElement="bossExamine"><omgdi:waypoint x="223.35999" y="24.25"/><omgdi:waypoint x="223.35999" y="54.97"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-919e70dd-5004-4066-8103-427901b5c1fd" bpmnElement="sid-3f6150ad-4b8c-47e9-a726-39f5dffd5e0a"><omgdc:Bounds x="275.86" y="-10.75" width="30.0" height="30.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-542631d7-42d7-4b2a-b467-da8fdba298a1" bpmnElement="bossExaminePass"><omgdi:waypoint x="243.35999" y="4.25"/><omgdi:waypoint x="275.86" y="4.25"/></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram>
</definitions><?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef"><process id="askForLeave" name="ask_for_leave_process" isExecutable="true"><startEvent id="sid-b3fcb298-124a-4dc3-b603-1397b392e1a5"/><userTask id="employee" name="员工" flowable:assignee="#{employeeNo}" flowable:formFieldValidation="true"><documentation>员工提交申请</documentation></userTask><sequenceFlow id="sid-9a4f7da0-7df8-422c-8d93-fcfe6eed6454" sourceRef="sid-b3fcb298-124a-4dc3-b603-1397b392e1a5" targetRef="employee"/><userTask id="leader" name="领导" flowable:assignee="#{leaderNo}" flowable:formFieldValidation="true"/><sequenceFlow id="sid-cda53600-1fdd-4556-b1f4-434cdef4b44c" sourceRef="employee" targetRef="leader"/><exclusiveGateway id="sid-53b678ee-c126-46be-9bb7-70efe235451c"/><sequenceFlow id="sid-c18a730f-6932-4036-b105-a840204bbd1f" sourceRef="leader" targetRef="sid-53b678ee-c126-46be-9bb7-70efe235451c"/><endEvent id="sid-dc057597-34a0-4835-bbbb-1b12f0e8e407"/><sequenceFlow id="leaderExamine" sourceRef="sid-53b678ee-c126-46be-9bb7-70efe235451c" targetRef="sid-dc057597-34a0-4835-bbbb-1b12f0e8e407" name="领导审核不通过"><conditionExpression xsi:type="tFormalExpression">${outcome=='驳回'}</conditionExpression></sequenceFlow><userTask id="boss" name="老板" flowable:formFieldValidation="true" flowable:assignee="#{bossNo}"/><sequenceFlow id="leaderExaminePass" sourceRef="sid-53b678ee-c126-46be-9bb7-70efe235451c" targetRef="boss" name="领导审核通过"><conditionExpression xsi:type="tFormalExpression">${outcome=='通过'}</conditionExpression></sequenceFlow><exclusiveGateway id="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046"/><sequenceFlow id="sid-e4dd8e02-acc7-4e51-95d4-5a1ade5eb2fd" sourceRef="boss" targetRef="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046"/><endEvent id="sid-311b83fa-5c04-48af-8491-4e2f9417c49c"/><sequenceFlow id="bossExamine" sourceRef="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046" targetRef="sid-311b83fa-5c04-48af-8491-4e2f9417c49c" name="老板审核不通过"><conditionExpression xsi:type="tFormalExpression">${outcome=='驳回'}</conditionExpression></sequenceFlow><endEvent id="sid-3f6150ad-4b8c-47e9-a726-39f5dffd5e0a"/><sequenceFlow id="bossExaminePass" sourceRef="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046" targetRef="sid-3f6150ad-4b8c-47e9-a726-39f5dffd5e0a" name="老板审核通过"><conditionExpression xsi:type="tFormalExpression">${outcome=='通过'}</conditionExpression></sequenceFlow></process><bpmndi:BPMNDiagram id="BPMNDiagram_ask_for_leave"><bpmndi:BPMNPlane bpmnElement="askForLeave" id="BPMNPlane_ask_for_leave"><bpmndi:BPMNShape id="shape-c5da47a1-57a1-465c-a7f8-2aad63d19b47" bpmnElement="sid-b3fcb298-124a-4dc3-b603-1397b392e1a5"><omgdc:Bounds x="-203.0" y="-10.75" width="30.0" height="30.0"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="shape-71f351aa-e8f4-4656-9fa0-7979ddc1d916" bpmnElement="employee"><omgdc:Bounds x="-140.0" y="-10.5" width="61.0" height="29.5"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-a0cd4bce-af0a-40ce-8128-97629a5f4a23" bpmnElement="sid-9a4f7da0-7df8-422c-8d93-fcfe6eed6454"><omgdi:waypoint x="-173.0" y="4.25"/><omgdi:waypoint x="-140.0" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-6a814a53-e6e2-4453-bb4a-43a1167e5559" bpmnElement="leader"><omgdc:Bounds x="-46.5" y="-11.0" width="63.0" height="30.5"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-3a2944ef-43d6-4409-920d-9d3d1acd422f" bpmnElement="sid-cda53600-1fdd-4556-b1f4-434cdef4b44c"><omgdi:waypoint x="-79.0" y="4.25"/><omgdi:waypoint x="-46.5" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-bef28649-6416-4428-a3bd-43edb5c1b9c6" bpmnElement="sid-53b678ee-c126-46be-9bb7-70efe235451c"><omgdc:Bounds x="42.36" y="-15.75" width="40.0" height="40.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-fa69c266-5b3c-4e26-a4e2-3f58c271ebb4" bpmnElement="sid-c18a730f-6932-4036-b105-a840204bbd1f"><omgdi:waypoint x="16.5" y="4.25"/><omgdi:waypoint x="42.36" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-9d577a21-ca61-4e33-bf3e-c892557f1638" bpmnElement="sid-dc057597-34a0-4835-bbbb-1b12f0e8e407"><omgdc:Bounds x="47.36" y="54.97" width="30.0" height="30.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-5651dbf2-4118-4668-bbd6-0259282cc084" bpmnElement="leaderExamine"><omgdi:waypoint x="62.36" y="24.25"/><omgdi:waypoint x="62.36" y="54.97"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-1398abfb-fefc-4a16-881c-84a6c4b7b7f7" bpmnElement="boss"><omgdc:Bounds x="108.86" y="-12.75" width="68.0" height="34.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-3f5df081-8086-492f-a2c7-90aba1c1e4d7" bpmnElement="leaderExaminePass"><omgdi:waypoint x="82.36" y="4.25"/><omgdi:waypoint x="108.86" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-4932221b-736b-4e85-a319-0859dbeb3e6b" bpmnElement="sid-17d3919b-99f0-4a2e-8914-3dfb7bc74046"><omgdc:Bounds x="203.35999" y="-15.75" width="40.0" height="40.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-3daa1ef4-119f-4b98-a40e-0b9cb3b205ce" bpmnElement="sid-e4dd8e02-acc7-4e51-95d4-5a1ade5eb2fd"><omgdi:waypoint x="176.86" y="4.25"/><omgdi:waypoint x="203.35999" y="4.25"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-6becf929-e7e7-4153-a1d1-6175677742ca" bpmnElement="sid-311b83fa-5c04-48af-8491-4e2f9417c49c"><omgdc:Bounds x="208.35999" y="54.97" width="30.0" height="30.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-1f1a1414-f4f9-442a-97af-676878899415" bpmnElement="bossExamine"><omgdi:waypoint x="223.35999" y="24.25"/><omgdi:waypoint x="223.35999" y="54.97"/></bpmndi:BPMNEdge><bpmndi:BPMNShape id="shape-919e70dd-5004-4066-8103-427901b5c1fd" bpmnElement="sid-3f6150ad-4b8c-47e9-a726-39f5dffd5e0a"><omgdc:Bounds x="275.86" y="-10.75" width="30.0" height="30.0"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="edge-542631d7-42d7-4b2a-b467-da8fdba298a1" bpmnElement="bossExaminePass"><omgdi:waypoint x="243.35999" y="4.25"/><omgdi:waypoint x="275.86" y="4.25"/></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram>
</definitions>

排除冲突

MybatisPlusSaasConfig:

@MapperScan(value={"org.jeecg.modules.**.mapper*"}, sqlSessionFactoryRef = "sqlSessionFactory", sqlSessionTemplateRef = "sqlSessionTemplate")

替换为:

@MapperScan(value={"org.jeecg.modules.**.mapper*"}, sqlSessionFactoryRef = "sqlSessionFactory", sqlSessionTemplateRef = "sqlSessionTemplate")

测试

提交请假申请

http://localhost:8080/jeecg-boot/askForLeave/employeeSubmit?name=Bruce&reason=有事&days=3&employeeNo=213

查看流程

http://localhost:8080/jeecg-boot/askForLeave/processDiagram?processId={processId}

领导审批

http://localhost:8080/jeecg-boot/askForLeave/leaderExaminePass?employeeNo=213

老板审批

http://localhost:8080/jeecg-boot/askForLeave/bossExaminePass?leaderNo=001

参考:
SpringBoot集成Flowable工作流-CSDN博客
Flowable-ui-modeler和MybatisPlus冲突问题_modelerdatabaseconfiguration-CSDN博客


http://www.mrgr.cn/p/32465540

相关文章

CSS基础:table的4个标签的样式详解(6000字长文!附案例)

你好&#xff0c;我是云桃桃。 一个希望帮助更多朋友快速入门 WEB 前端的程序媛。 云桃桃-大专生&#xff0c;一枚程序媛&#xff0c;感谢关注。回复 “前端基础题”&#xff0c;可免费获得前端基础 100 题汇总&#xff0c;回复 “前端工具”&#xff0c;可获取 Web 开发工具合…

JVM知识点总结二

参考文章&#xff1a;【Java面试题汇总】JVM篇&#xff08;2023版&#xff09;_jvm面试题2023-CSDN博客 1、说说你了解的JVM内存模型&#xff1a; JVM由三部分组成&#xff1a;类加载子系统、运行时数据区、执行引擎 JVM内存模型&#xff1a; 内存模型里的运行时数据区&#…

汽车组装3D电子说明书更通俗易懂

激光打印机由于造价高、技术更先进&#xff0c;因此在使用和维护上需要更专业的手法&#xff0c;而对于普通客户来说并不具备专业操作激光打印机的技能&#xff0c;为了通俗易懂地让客户理解激光打印机&#xff0c;我们为企业定制了激光打印机3D产品说明书&#xff0c;将为您带…

计算机(电脑)硬件组成基本介绍4

详细介绍的计算机(电脑)硬件组成.电源插座为主板提供供电的电源接口目前,主板电源接口插座主要采用ATX电源接口, ATX电源接口一般为24针电源插座、8 针电源插座、4针电源插座等,主要为主板提供5V、 12V、3.3V 电压等. ATX 电源都支持软件关机功能。目前,双核CPU 主板上的…

Git学习路线

1.看书 把这本书看懂就可以了&#xff1b;这个是比较专业的一本书&#xff1b;比较系统&#xff1b;没有书的可以私信我 2.理解Git多个分区和多个分支 多个分区包括&#xff1a;工作区、暂存区、本地仓、本地的远端仓信息、远端仓 多个分区的状态 分支及其变化 3.记住常用命令…

计算机(电脑)硬件组成基本介绍3

详细介绍的计算机(电脑)硬件组成.重要接口SATA连接大容量存储设备的SATA接口SATA (Serial ATA)接口即串行ATA,它是目前硬盘采用的一种新型的接口类型。SATA接口主要采用连续串行的方式传输数据,这样在同一时间点内只会有1位数据传输,此做法能减小接口的针脚数目,用4个针…

机器学习-保险花销预测笔记+代码

读取数据 import numpy as np import pandas as pddatapd.read_csv(rD:\人工智能\python视频\机器学习\5--机器学习-线性回归\5--Lasso回归_Ridge回归_多项式回归\insurance.csv,sep,) data.head(n6) EDA 数据探索 import matplotlib.pyplot as plt %matplotlib inlineplt.hi…

计算机(电脑)硬件组成基本介绍1

详细介绍的计算机(电脑)硬件组成。目录目录操作系统与硬件及应用程序软件的关系电脑各个设备之间关系 如何评价一台电脑? 通过CPU型号看性能 通过 CPU 主频评价 通过内存容量评价 通过显卡芯片及显存容量评价 通过显示器评价 中央处理器 存储器 输入设备 输出设备 接口…

20.Nacos集群搭建

模拟Nacos三个节点&#xff0c;同一个ip,启动三个不同的端口&#xff1a; 节点 nacos1, 端口&#xff1a;8845 节点 nacos2, 端口&#xff1a;8846 节点 nacos3, 端口&#xff1a;8847 1.搭建数据库&#xff0c;初始化数据库表结构 这里我们以单点的数据库为例 首先新建一…

DC学习笔记

视频 数字逻辑综合工具实践 DC 01_哔哩哔哩_bilibili 一、DC工作模式&#xff08;此小节为搬运内容&#xff09; 原链接&#xff1a;Design_Compiler User Guide 随手笔记&#xff08;9&#xff09;Using Floorplan Information - 知乎 DC拥有四种工作模式&#xff1a; 工…

Ubuntu24.04系统Docker安装nextcloud+onlyoffice

1.Ubuntu系统下载 Ubuntu镜像站大全 我用的是山东大学的镜像站 我下的是desktop版本就是有GUI图形界面,如果不需要可以下载server版本2.开启SSH启用root用户远程登陆 由于我使用远程工具MobaXterm进行连接,所以安装完系统后需要开启SSH,如果你不需要使用远程工具远程可以跳过…

18种WEB常见漏洞:揭秘网络安全的薄弱点

输入验证漏洞: 认证和会话管理漏洞: 安全配置错误: 其他漏洞: 防范措施: Web 应用程序是现代互联网的核心&#xff0c;但它们也容易受到各种安全漏洞的影响。了解常见的 Web 漏洞类型&#xff0c;对于开发人员、安全测试人员和普通用户都至关重要。以下将介绍 18 种常见的 …

C语言--基础面试真题

1、局部变量和静态变量的区别 普通局部变量和静态局部变量区别 存储位置&#xff1a; 普通局部变量存储在栈上 静态局部变量存储在静态存储区 生命周期&#xff1a; 当函数执行完毕时&#xff0c;普通局部变量会被销毁 静态局部变量的生命周期则是整个程序运行期间&#…

学习Rust第14天:HashMaps

今天我们来看看Rust中的hashmaps&#xff0c;在 std::collections crate中可用&#xff0c;是存储键值对的有效数据结构。本文介绍了创建、插入、访问、更新和迭代散列表等基本操作。通过一个计算单词出现次数的实际例子&#xff0c;我们展示了它们在现实世界中的实用性。Hashm…

基于harris角点和RANSAC算法的图像拼接matlab仿真

目录 1.算法运行效果图预览 2.算法运行软件版本 3.部分核心程序 4.算法理论概述 5.算法完整程序工程 1.算法运行效果图预览 2.算法运行软件版本 MATLAB2022a 3.部分核心程序 ....................................................................... I1_harris fu…

对EKS(AWS云k8s)启用AMP(AWS云Prometheus)监控+AMG(AWS云 grafana)

问题 需要在针对已有的EKS k8s集群启用Prometheus指标监控。而且&#xff0c;这里使用AMP即AWS云的Prometheus托管服务。好像这个服务&#xff0c;只有AWS国际云才有&#xff0c;AWS中国云没得这个托管服务。下面&#xff0c;我们就来尝试在已有的EKS集群上面启用AMP监控。 步…

IP地址定位:揭秘精准定位的技术与应用

在数字化时代&#xff0c;IP地址已成为连接互联网世界的关键标识之一。但是&#xff0c;很多人对于IP地址的精准定位能力存在疑虑。本文将深入探讨IP地址定位的技术原理以及其在实际应用中的精确度。 IP地址查询&#xff1a;IP数据云 - 免费IP地址查询 - 全球IP地址定位平台 …

运行游戏提示dll文件丢失,分享多种有效的解决方法

在我们日常频繁地利用电脑进行娱乐活动&#xff0c;特别是畅玩各类精彩纷呈的电子游戏时&#xff0c;常常会遭遇一个令人困扰的问题。当我们满怀期待地双击图标启动心仪的游戏程序&#xff0c;准备全身心投入虚拟世界时&#xff0c;屏幕上却赫然弹出一条醒目的错误提示信息&…

xgp加速器免费 微软商店xgp用什么加速器

2001年11月14日深夜&#xff0c;比尔盖茨亲自来到时代广场&#xff0c;在午夜时分将第一台Xbox交给了来自新泽西的20岁年轻人爱德华格拉克曼&#xff0c;后者在回忆中说&#xff1a;“比尔盖茨就是上帝。”性能超越顶级PC的Xbox让他们趋之若鹜。2000年3月10日&#xff0c;微软宣…

链游:未来游戏发展的新风向

链游&#xff0c;即区块链游戏的一种&#xff0c;是一种将区块链技术与游戏玩法相结合的创新型游戏。它利用区块链技术的特性&#xff0c;如去中心化、可追溯性和安全性&#xff0c;为玩家提供了一种全新的游戏体验。链游通常采用智能合约来实现游戏的规则和交易系统&#xff0…