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: test
        user: test
      idm-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> {

    @Override
    public 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 {
        @Override
        protected 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 {
    @Autowired
    private RuntimeService runtimeService;
    @Autowired
    private TaskService taskService;
    @Autowired
    private RepositoryService repositoryService;
    @Autowired
    private 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的Id
        List<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.mfbz.cn/a/567357.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【STM32+HAL+Proteus】系列学习教程4---GPIO输入模式(独立按键)

实现目标 1、掌握GPIO 输入模式控制 2、学会STM32CubeMX配置GPIO的输入模式 3、具体目标&#xff1a;1、按键K1按下&#xff0c;LED1点亮&#xff1b;2、按键K2按下&#xff0c;LED1熄灭&#xff1b;2、按键K3按下&#xff0c;LED2状态取反&#xff1b; 一、STM32 GPIO 输入…

【JavaScriptthreejs】对于二维平面内的路径进行扩张或缩放

目标 对指定路径 [{x,y,z},{x,y,z},{x,y,z},{x,y,z}.........]沿着边缘向内或向外扩张&#xff0c;达到放大或缩小一定范围的效果&#xff0c;这里我们获取每个点&#xff08;这里是Vector3(x,y,z)&#xff09;,获取前后两个点和当前点的坐标&#xff0c;计算前后两点的向量&a…

autodesk系列软件安装错误1603,手动安装Autodesk Desktop Licensing Service之后,启动服务提示错误1067

一般Autodesk Desktop Licensing Service这个服务没安装或者不正常会导致autodesk系列软件安装错误1603或者其他报错。 手动安装Autodesk Desktop Licensing Service之后&#xff0c;启动服务提示错误1067&#xff0c; 解决方法如下 打开autoremove点击扩展功能&#xff0c;输…

Hindawi暴雷出局,Frontiers却积极整改,能否摘掉“水刊”标签?

【SciencePub学术】自从3月Hindawi暴雷后&#xff0c;MDPI和Frontiers也深受牵连&#xff0c;因其发文量太过猖獗&#xff0c;国人占比高&#xff0c;自引率高等因素&#xff0c;这些出版社旗下的期刊均被贴上“水刊”标签。 上期&#xff0c;小编已经详细介绍了MDPI期刊的口碑…

项目暂停和重启运行,命令如何实现?

要通过命令行实现项目的暂停和重启运行&#xff0c;可以使用以下步骤&#xff1a; 1.查找项目进程ID&#xff1a;首先&#xff0c;你需要找到正在运行项目的进程ID&#xff08;PID&#xff09;。你可以使用 ps 命令来查找正在运行的进程&#xff0c;例如&#xff1a; ps aux …

客户关系智慧:CRM系统五大功能助力企业发展

CRM软件必备功能有“销售自动化、销售流程管理、全渠道沟通平台、BI数据分析以及销售活动管理。” 一家业务流程完善的公司&#xff0c;总是少不了提到CRM。对CRM还尚不可知的企业可能会疑惑了——总是听到别人提到CRM&#xff0c;CRM到底有哪些功能&#xff1f;这些功能又怎么…

【JavaWeb】Day52.Mybatis动态SQL(二)

动态SQL-foreach 案例&#xff1a;批量删除员工功能 SQL语句&#xff1a; delete from emp where id in (1,2,3); Mapper接口&#xff1a; ~~~java Mapper public interface EmpMapper {//批量删除public void deleteByIds(List<Integer> ids); } ~~~ XML映射文件&am…

【Java框架】SpringMVC(一)——基本的环境搭建及基本结构体系

目录 MVC模式视图(View)控制器(Controller)模型(Model)JSP Model1JSP Model2MVC的优点MVC的缺点 Spring MVC架构介绍特点 SpringMVC环境搭建(在前面Spring整合Mybatis的基础上)1.创建控制器Controller2.创建springmvc配置文件&#xff0c;并添加Controller的Bean3.web.xml中配置…

GPT 在目标设定中的应用:实现梦想的技术方法

在技术快速进步的时代&#xff0c;我们设定和实现目标的方式正在不断发展。 该领域最重要的创新之一是引入生成式预训练 Transformer (GPT)。 本文将探讨 GPT 技术如何彻底改变目标设定的艺术&#xff0c;提供实用的见解和案例研究来展示其影响。 GPT 和目标设定简介 ​ 了解 …

kali——勒索病毒metasploit

我先来叙述一下大致流程&#xff1a; 1、使用mfs对 445端口进行攻击获得一系列权限 2、更新mfs版本 3、使用search 17_010对命令进行查看 4、use auxiliary/scanner/smb/smb_ms17_010使用该模块设置靶机set rhosts 靶机ip和设置本机监听端口 set lhost 0-65535 5、options…

中医药性笔记

目录 当归黄芪党参白术甘草茯苓半夏陈皮升麻柴胡 当归 补血。 当归&#xff0c;腾讯医典 黄芪 土金之药。 补中气的同时补肺气。益卫固表、利水消肿、 腾讯医典黄芪 党参 土金之药。健脾益肺&#xff0c;生津养血。 党参补气之力弱于人参、用于脾肺气虚的轻症。 党…

全量与增量的配置模式

在系统管理和数据处理领域&#xff0c;全量与增量配置是两种常见的方法&#xff0c;用于实现数据同步、更新部署或资源管理等任务。它们分别适用于不同的场景&#xff0c;依据任务的特性和需求选择合适的配置模式&#xff0c;有助于优化资源利用、提高效率并确保数据或系统的准…

node-sass安装失败解决

老项目安装node-sass4.14.1一直失败 "node-sass": "^4.14.1",报错环境变量Path 中没有 python2.7 gyp verb check python checking for Python executable "python2.7" in the PATH安装python2.7,然后设置npm config set python C:\Python27 …

计算机缺少msvcp120.dll如何解决,7种详细的修复方法分享

msvcr120.dll文件是微软Visual C运行时库的一部分&#xff0c;版本号为12.0。这个DLL文件包含了许多用于支持在Windows上运行的应用程序的重要函数和组件。它是确保某些程序能够正确执行的关键组成部分&#xff0c;特别是那些使用C编写或依赖于某些Microsoft库的程序。 当用户…

【智能算法】回溯搜索算法(BSA)原理及实现

目录 1.背景2.算法原理2.1算法思想2.2算法过程 3.结果展示4.参考文献 1.背景 2013年&#xff0c;P Civicioglu等人受到当前种群与历史种群之间的差分向量的引导启发&#xff0c;提出了回溯搜索算法&#xff08;Backtracking Search Algorithm, BSA&#xff09;。 2.算法原理…

MySQL及SQL语句

SQL语句 数据库相关概念数据查询语言&#xff08;DQL&#xff09;基本查询数据类型条件查询多表查询子查询 数据操作语言&#xff08;DML&#xff09;数据定义语言&#xff08;DDL&#xff09;数据控制语言&#xff08;DCL&#xff09;MySQL数据库约束视图练习题 数据库相关概念…

【总结】CycleGAN+YOLOv8+DeepSORT

本文章仅对本人前期工作进行总结&#xff0c;文章内容供读者参考&#xff0c;代码不对外公开 文章目录 1、CycleGAN1.1 数据集配置1.2 环境配置1.3 参数配置1.4 可视化训练过程1.5 训练结果1.5 结果测试 2、YOLOv82.1 数据集配置2.2 网络结构配置2.3 训练细节2.4 测试 3、Deep…

应用部署tomcat的三种方式

由于一直在用springboot框架&#xff0c;集成了tomcat&#xff0c;快忘记如何单独部署tomcat了&#xff0c;以下&#xff0c;记录一下&#xff1a; 部署tomcat有三种方式&#xff1a; 一、方式一&#xff1a;将war包丢进webapps 这是最简单粗暴的方式&#xff1a;将web工程打…

C++“流”风格日志系统实战-课程简介

一个能快速提升C复杂代码设计的学习项目&#xff0c;一个能迅速让C面试官会心一笑的简历项目&#xff0c;一个能在实际项目中使用的项目……学习什么是流&#xff1f;如何利用抽象层面的流编写适用面更广的代码&#xff1f; 每天在用的cout和cin 它们是什么类型&#xff1f;最后…