JEECG/SpringBoot集成flowable流程框架

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.mzph.cn/bicheng/4574.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

PHP 错误 Unparenthesized `a ? b : c ? d : e` is not supported

最近在一个新的服务器上测试一些老代码的时候得到了类似上面的错误&#xff1a; [Thu Apr 25 07:37:34.139768 2024] [php:error] [pid 691410] [client 192.168.1.229:57183] PHP Fatal error: Unparenthesized a ? b : c ? d : e is not supported. Use either (a ? b : …

Docker镜像和容器操作

目录 一.Docker镜像创建与操作 1. 搜索镜像 2. 获取镜像 3. 镜像加速下载 4. 查看镜像信息 5. 查看下载的镜像文件信息 ​编辑6. 查看下载到本地的所有镜像 7. 根据镜像的唯一标识ID号&#xff0c;获取镜像详细信息 8. 为本地的镜像添加新的标签 9. 删除镜像 10. 存入…

【Prometheus】了解你的Prometheus指标

简单Prometheus查询用于指标检查 作者&#xff1a;Michal Kazmierczak 来源&#xff1a;mkaz.me 基数是关键。 它很容易失控&#xff0c;就像任何组合爆炸的实例一样。 这&#xff0c;再加上90%的指标从未被访问过的说法&#xff0c;创造了一个值得探索的领域。 观察性云供应…

复杂Python代码看不懂,分享两个工具!

复杂Python代码看不懂&#xff0c;分享两个工具&#xff0c;事半功倍&#xff01; Ryven Ryven是一个Python代码可视化工具&#xff01; 精进地址&#xff1a;https://github.com/leon-thomm/Ryven 一些案例&#xff0c; Ryven可视化操作矩阵 Ryven可视化冒泡排序算法 Ryv…

Three.js和Cesium.js中坐标

在了解Three.js和Cesium.js前先了解并弄清楚图形学关于空间的基本概念流程&#xff1a; 计算机图形学 图形学中涉及到多个坐标空间&#xff0c;这些空间之间的变换是图形渲染中的核心部分。下面是一些常见的图形学空间及其变换顺序&#xff1a; 对象空间&#xff08;Object Sp…

Python快速入门1数据类型(需要具有编程基础)

数据类型&#xff1a; Python 3.0版本中常见的数据类型有六种&#xff1a; 不可变数据类型可变数据类型Number&#xff08;数字&#xff09;List&#xff08;列表&#xff09;String&#xff08;字符串&#xff09;Dictionary&#xff08;字典&#xff09;Tuple&#xff08;元…

【InternLM】基于弱智吧数据的微调数据构造实验

1. 数据处理流程 在AI领域有句名言&#xff1a;数据和特征决定了机器学习的上限&#xff0c;而模型和算法只是逼近这个上限而已。可见数据对整个AI的决定性影响&#xff0c;在模型开源化的今天&#xff0c;很多厂商的模型结构都大同小异&#xff0c;那影响最终模型的一大决定因…

4.28java项目小结

这几天完成了用户修改资料模块的功能&#xff0c;实现了修改用户头像&#xff0c;昵称等信息&#xff0c;并且对数据库进行了操作&#xff0c;大致画了好友资料的页面的内容&#xff0c;这两天尽量完成表的创建&#xff0c;建立多对多的关系&#xff0c;实现好友的添加功能。

.DevicData-P-XXXXXXXX勒索病毒数据怎么处理|数据解密恢复

引言&#xff1a; 随着信息技术的飞速发展&#xff0c;网络安全问题日益凸显&#xff0c;其中勒索病毒以其独特的攻击方式和巨大的破坏性引起了广泛关注。.DevicData-P-XXXXXXXX勒索病毒就是近期出现的一种新型勒索病毒&#xff0c;它利用强大的加密算法和巧妙的传播手段&…

HNCTF 2022 week1 题解

自由才是生活主旋律。 [HNCTF 2022 Week1] Interesting_include <?php //WEB手要懂得搜索 //flag in ./flag.phpif(isset($_GET[filter])){$file $_GET[filter];if(!preg_match("/flag/i", $file)){die("error");}include($file); }else{highlight_…

求解素数环问题

注&#xff1a;这里我的代码是以第一位为最大数n为首元素不动的 思路&#xff1a; 首先我们分析问题要以较小规模的样例进行分析&#xff0c;例如n3时 第一步&#xff1a;深入搜索 我们先不管后面怎么样&#xff0c;当前的首要目标是先确定第一个元素的值&#xff0c;可知有…

windows电脑改造为linux

有个大学用的旧笔记本电脑没啥用了&#xff0c;决定把它改成linux搭一个服务器&#xff1b; 一、linux安装盘制作 首先要有一个大于8G的U盘&#xff0c;然后去下载需要的linux系统镜像&#xff0c;我下的是ubuntu&#xff0c;这里自选版本 https://cn.ubuntu.com/download/d…

今日arXiv最热NLP大模型论文:韩国团队提出ResearchAgent系统,模仿人类产出论文idea

你是否还在苦于想发论文却没有idea&#xff1f; 在浩瀚无边的文献中苦苦寻找却又无从下手&#xff1f; 那些看似与你研究相关的文章&#xff0c;要么已经被人研究得透彻无比&#xff0c;要么与你的方向南辕北辙&#xff0c;让你倍感挫败。 不要慌&#xff0c;让AI来助你一臂之…

日期类的实现,const成员

目录 一&#xff1a;日期类实现 二&#xff1a;const成员 三&#xff1a;取地址及const取地址操作符重载 一&#xff1a;日期类实现 //头文件#include <iostream> using namespace std;class Date {friend ostream& operator<<(ostream& out, const Dat…

C语言中的三大循环

C语言中为我们提供了三种循环语句&#xff0c;今天我就来与诸君细谈其中之奥妙。循环这一板块总结的内容较多&#xff0c;而且&#xff0c;很重要&#xff01;&#xff08;敲黑板&#xff01;&#xff01;&#xff01;)&#xff0c;所以诸君一定要对此上心&#xff0c;耐住性子…

系统服务(22年国赛)—— nmcli命令部署VXLAN

前言&#xff1a;原文在我的博客网站中&#xff0c;持续更新数通、系统方面的知识&#xff0c;欢迎来访&#xff01; 系统服务&#xff08;22年国赛&#xff09;—— VXLAN服务部署https://myweb.myskillstree.cn/118.html 目录 题目&#xff1a; AppSrv 关闭防火墙和SEli…

Linux 双击sh脚本运行无反应或一闪而退【已解决】

这里写目录标题 一、问题描述二、解决思路1. 开启终端&#xff0c;使用命令行运行.sh脚本文件2. 终端中运行可以&#xff0c;但双击之后运行闪退 (遇到了个这个奇奇怪怪的问题) 三、分析记录3.1 .bashrc设置变量的作用域3.2 环境变量冲突覆盖问题. 四、相关知识点4.1 环境变量配…

CSS详解(一)

1、css工作中使用场景 美化网页&#xff08;文字样式、背景样式、边框样式、盒子模型、定位、动画、&#xff09;&#xff0c;布局页面&#xff08;flex布局、响应式布局、媒体查询&#xff09; 2、CSS 规则 通常由两个主要部分组成选择器和样式声明 2.1选择器 选择器指定了…

C语言-用二分法在一个有序数组中查找某个数字

1.题目描述 有15个数按由大到小顺序放在一个数组中&#xff0c;输入一个数&#xff0c;要求用折半查找法找出该数是数组中第几个元素的值。如果该数不在数组中&#xff0c;则输出“无此数” 二.思路分析 记录数组中左边第一个元素的下标为left&#xff0c;记录数组右边第一个…

Spring AI聊天功能开发

一、引入依赖 继承父版本的springboot依赖&#xff0c;最好是比较新的依赖。 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.2.4</version><relativePat…