• Flowable工作流之查询历史流程信息


    1. 前言

    上篇文章 和大家分享的流程操作主要是正在执行的流程,我们有一个非常常见的场景是查询执行过的流程信息,在上篇文章中,小伙伴们已经知道,对于正在执行的流程,会在 act_ru_execution 表中保存一条对应的记录,不过流程执行结束之后,act_ru_execution 表中的记录会被删除掉,此时要是想查询已经执行过的流程信息,去哪里查询呢?今天我们就来看看 HistoryService 的使用

    本文使用的流程图依然是上篇文章中使用过的,如下

    在这里插入图片描述

    
    <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" exporter="Flowable Open Source Modeler"
                 exporterVersion="6.7.2">
        <process id="MyLeave" name="MyLeave" isExecutable="true">
            <documentation>员工请假流程documentation>
            <startEvent id="sid-159DD77D-9878-4288-AC29-B898E08DC216" flowable:formFieldValidation="true">startEvent>
            <userTask id="zgID" name="主管审批" flowable:assignee="张主管" flowable:formFieldValidation="true">
                <extensionElements>
                    <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler">
                        modeler:initiator-can-complete>
                extensionElements>
            userTask>
            <sequenceFlow id="sid-1E8F84D7-6C11-4D88-84C9-B818474F880E" sourceRef="sid-159DD77D-9878-4288-AC29-B898E08DC216"
                          targetRef="zgID">sequenceFlow>
            <exclusiveGateway id="sid-A6E285DA-5C65-4BA7-8BB4-5F4D97AC12E0">exclusiveGateway>
            <sequenceFlow id="sid-08020782-2DDE-4C56-BFC0-224DC99FB50E" sourceRef="zgID"
                          targetRef="sid-A6E285DA-5C65-4BA7-8BB4-5F4D97AC12E0">sequenceFlow>
            <endEvent id="sid-5BFB0FC6-B2A5-4F6E-9BDB-8785F2883AEB">endEvent>
            <userTask id="jlID" name="经理审批" flowable:assignee="李经理" flowable:formFieldValidation="true">
                <extensionElements>
                    <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler">
                        modeler:initiator-can-complete>
                extensionElements>
            userTask>
            <exclusiveGateway id="sid-0DA07C30-2930-40F5-A887-FA1C5BF307EF">exclusiveGateway>
            <sequenceFlow id="sid-833DAA1C-F1C2-41A1-8455-3FAB79893C14" sourceRef="jlID"
                          targetRef="sid-0DA07C30-2930-40F5-A887-FA1C5BF307EF">sequenceFlow>
            <endEvent id="sid-8941849E-B17F-4848-BFC8-C6B05CC21A9F">endEvent>
            <endEvent id="sid-3596170A-0E0F-4C07-BD32-F04AFB375EB1">endEvent>
            <sequenceFlow id="sid-A74937CE-02B1-493B-8033-08CA2D652771" name="同意"
                          sourceRef="sid-A6E285DA-5C65-4BA7-8BB4-5F4D97AC12E0" targetRef="jlID">
                <conditionExpression xsi:type="tFormalExpression">conditionExpression>
            sequenceFlow>
            <sequenceFlow id="sid-BE2005E1-26F7-4E42-8AC2-7C4F25274F1A" name="同意"
                          sourceRef="sid-0DA07C30-2930-40F5-A887-FA1C5BF307EF"
                          targetRef="sid-3596170A-0E0F-4C07-BD32-F04AFB375EB1">
                <conditionExpression xsi:type="tFormalExpression">conditionExpression>
            sequenceFlow>
            <sequenceFlow id="sid-67F146AA-C9F5-4A21-AF26-A77A349D80B7" name="拒绝"
                          sourceRef="sid-A6E285DA-5C65-4BA7-8BB4-5F4D97AC12E0"
                 
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
  • 相关阅读:
    (笔记整理未完成)【图论】图的遍历
    MySQL数据库(一)
    新零售SaaS架构:中央库存系统架构设计
    Kubeadm搭建kubernetes集群
    Flutter ☞ 数据类型
    RK3588平台开发系列讲解(Thermal篇)Thermal的设备树配置
    MATLAB算法实战应用案例精讲-【数据分析】数据仓库-数据治理
    八股文之springcloud
    设计模式——结构型模式——责任链模式
    ssm基于微信小程序的外卖点餐系统的设计与实现毕业设计-附源码211704
  • 原文地址:https://blog.csdn.net/weixin_38192427/article/details/127574163