项目中使用工作流程

一 子流程

子流程分为内嵌子流程与调用子流程;
1.内嵌:把整个流程拆分一部分,使用 subProcess 标签标识,实际与整体使用无区别;
2.调用: 调用外部已经写好的流程;相当于两个流程;

<?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: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" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="出版" exporter="Flowable Open Source Modeler" exporterVersion="6.8.0">
  <process id="ZXBZ20231124" name="在线编纂流程20231124" isExecutable="true">
    <startEvent id="startEvent1" />
    <userTask id="sid-1A50291D-3C35-4BEC-BBF1-37A8C7396F6C" name="创建大纲" flowable:formKey="FORM_ZXBZ_SCDGGJ" flowable:assignee="${__owner}">
      <extensionElements>
        <flowable:url to="editcatalog" />
      </extensionElements>
    </userTask>
    <sequenceFlow id="sid-32C14A99-5BCD-498F-BD40-5EA03F32E510" sourceRef="startEvent1" targetRef="sid-1A50291D-3C35-4BEC-BBF1-37A8C7396F6C" />
    <userTask id="sid-C18A06C2-4990-4023-A6BB-6426EC3FC015" name="大纲审核" default="sid-8E1156A8-AFCA-4EFF-9C48-2F5940761E3D" flowable:category="审核" flowable:assignee="${__owner}">
      <extensionElements>
        <flowable:url to="verifycatalog" />
      </extensionElements>
    </userTask>
    <sequenceFlow id="sid-E75E538C-FA35-46B3-9364-0F4D809805D9" sourceRef="sid-1A50291D-3C35-4BEC-BBF1-37A8C7396F6C" targetRef="sid-C18A06C2-4990-4023-A6BB-6426EC3FC015" />
    <userTask id="sid-2A4C6C4F-48EB-40D1-963F-80557CB988A4" name="编纂任务分配" flowable:assignee="${__owner}">
      <extensionElements>
        <flowable:url to="allocateedittask" />
      </extensionElements>
    </userTask>
    <subProcess id="sid-C8BBB257-22FA-464F-801A-18D0283CC9D7" name="编纂子流程" flowable:buttons="false">
      <multiInstanceLoopCharacteristics flowable:collection="${editTaskService.getEditTasks(execution)}" flowable:elementVariable="item">
        <extensionElements />
      </multiInstanceLoopCharacteristics>
      <startEvent id="sid-2E65618A-34AF-4366-9BBD-CABB71F66CED" />
      <userTask id="sid-2266A0DE-A8B7-49CD-B826-F7721950E6E6" name="编纂执行" flowable:assignee="${item}">
        <extensionElements>
          <flowable:url to="/editor?mode=0" />
        </extensionElements>
      </userTask>
      <userTask id="sid-2BFA2798-5F3D-4FAB-B443-521677653364" name="编纂审核" default="sid-5ABB1358-698E-4F3A-86BB-2DF354D52747" flowable:category="审核" flowable:assignee="59">
        <extensionElements>
          <flowable:url to="/editor?mode=1" />
          <flowable:review ownerExpression="${item}" />
        </extensionElements>
      </userTask>
      <endEvent id="sid-AD7F9F9D-08EC-4763-A001-C21D5FB1B4D0" />
      <sequenceFlow id="sid-A76991C5-A3AC-4E0F-AB47-0AD42F509A18" sourceRef="sid-2E65618A-34AF-4366-9BBD-CABB71F66CED" targetRef="sid-2266A0DE-A8B7-49CD-B826-F7721950E6E6" />
      <sequenceFlow id="sid-DB47729E-80F9-4736-8887-D01727901795" sourceRef="sid-2266A0DE-A8B7-49CD-B826-F7721950E6E6" targetRef="sid-2BFA2798-5F3D-4FAB-B443-521677653364" />
      <sequenceFlow id="sid-5ABB1358-698E-4F3A-86BB-2DF354D52747" name="驳回" sourceRef="sid-2BFA2798-5F3D-4FAB-B443-521677653364" targetRef="sid-2266A0DE-A8B7-49CD-B826-F7721950E6E6" />
      <sequenceFlow id="sid-A09535EC-8905-40BB-AB00-DEB046D4CAF1" name="通过" sourceRef="sid-2BFA2798-5F3D-4FAB-B443-521677653364" targetRef="sid-AD7F9F9D-08EC-4763-A001-C21D5FB1B4D0">
        <conditionExpression xsi:type="tFormalExpression"><![CDATA[${__agree>0}]]></conditionExpression>
      </sequenceFlow>
    </subProcess>
    <userTask id="sid-87159C33-043E-4C1E-88F6-44859947ECB6" name="统稿" flowable:assignee="${__owner}">
      <extensionElements>
        <flowable:url to="review" />
        <flowable:review />
      </extensionElements>
    </userTask>
    <userTask id="sid-C0CFD1FC-46BC-46D3-A295-E43829372EDB" name="三审三校" flowable:assignee="${__owner}">
      <extensionElements>
        <flowable:url to="review" />
        <flowable:review />
      </extensionElements>
    </userTask>
    <sequenceFlow id="sid-56B84279-99F4-4908-A66E-994432535609" sourceRef="sid-87159C33-043E-4C1E-88F6-44859947ECB6" targetRef="sid-C0CFD1FC-46BC-46D3-A295-E43829372EDB" />
    <userTask id="sid-1465F9DB-E529-4BB8-B671-1439B90938FD" name="归档" flowable:assignee="${__owner}">
      <extensionElements>
        <flowable:url to="package" />
        <flowable:stopProject status="2" />
      </extensionElements>
    </userTask>
    <sequenceFlow id="sid-E2096C64-9CFD-4808-B523-FD643724EB57" sourceRef="sid-C0CFD1FC-46BC-46D3-A295-E43829372EDB" targetRef="sid-1465F9DB-E529-4BB8-B671-1439B90938FD" />
    <endEvent id="sid-108AF706-D470-4DE6-812B-9B584A18131F" />
    <sequenceFlow id="sid-16D7EBE0-38DB-4649-908A-E06ED0D54278" sourceRef="sid-1465F9DB-E529-4BB8-B671-1439B90938FD" targetRef="sid-108AF706-D470-4DE6-812B-9B584A18131F" />
    <sequenceFlow id="sid-8E1156A8-AFCA-4EFF-9C48-2F5940761E3D" name="驳回" sourceRef="sid-C18A06C2-4990-4023-A6BB-6426EC3FC015" targetRef="sid-1A50291D-3C35-4BEC-BBF1-37A8C7396F6C" />
    <sequenceFlow id="sid-7A13C636-0AD1-4782-82C0-4154E76A1E6B" name="通过" sourceRef="sid-C18A06C2-4990-4023-A6BB-6426EC3FC015" targetRef="sid-2A4C6C4F-48EB-40D1-963F-80557CB988A4">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${__agree>0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-27798DF8-AB59-4845-B2BE-8AC2EBBBA126" sourceRef="sid-2A4C6C4F-48EB-40D1-963F-80557CB988A4" targetRef="sid-C8BBB257-22FA-464F-801A-18D0283CC9D7" />
    <sequenceFlow id="sid-445B3D54-9F64-433B-9914-4B4C030D9C19" sourceRef="sid-C8BBB257-22FA-464F-801A-18D0283CC9D7" targetRef="sid-87159C33-043E-4C1E-88F6-44859947ECB6" flowable:buttons="false" />
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_ZXBZ2023">
    <bpmndi:BPMNPlane id="BPMNPlane_ZXBZ2023" bpmnElement="ZXBZ20231124">
      <bpmndi:BPMNShape id="BPMNShape_startEvent1" bpmnElement="startEvent1">
        <omgdc:Bounds x="280" y="183" width="30" height="30" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-1A50291D-3C35-4BEC-BBF1-37A8C7396F6C" bpmnElement="sid-1A50291D-3C35-4BEC-BBF1-37A8C7396F6C">
        <omgdc:Bounds x="420" y="158" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-C18A06C2-4990-4023-A6BB-6426EC3FC015" bpmnElement="sid-C18A06C2-4990-4023-A6BB-6426EC3FC015">
        <omgdc:Bounds x="600" y="158" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-2A4C6C4F-48EB-40D1-963F-80557CB988A4" bpmnElement="sid-2A4C6C4F-48EB-40D1-963F-80557CB988A4">
        <omgdc:Bounds x="780" y="158" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-C8BBB257-22FA-464F-801A-18D0283CC9D7" bpmnElement="sid-C8BBB257-22FA-464F-801A-18D0283CC9D7">
        <omgdc:Bounds x="305.2191320734404" y="338.739608914212" width="536.6340445430149" height="189.22010777783123" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-87159C33-043E-4C1E-88F6-44859947ECB6" bpmnElement="sid-87159C33-043E-4C1E-88F6-44859947ECB6">
        <omgdc:Bounds x="311.89572038166807" y="625.7072085334403" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-C0CFD1FC-46BC-46D3-A295-E43829372EDB" bpmnElement="sid-C0CFD1FC-46BC-46D3-A295-E43829372EDB">
        <omgdc:Bounds x="482.3159732445269" y="625.7072085334403" width="100.00000000000006" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-1465F9DB-E529-4BB8-B671-1439B90938FD" bpmnElement="sid-1465F9DB-E529-4BB8-B671-1439B90938FD">
        <omgdc:Bounds x="651.7783422223337" y="625.7072085334403" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-108AF706-D470-4DE6-812B-9B584A18131F" bpmnElement="sid-108AF706-D470-4DE6-812B-9B584A18131F">
        <omgdc:Bounds x="807.1765883082277" y="651.7072085334403" width="28" height="28" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-32C14A99-5BCD-498F-BD40-5EA03F32E510" bpmnElement="sid-32C14A99-5BCD-498F-BD40-5EA03F32E510" flowable:sourceDockerX="15.0" flowable:sourceDockerY="15.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="309.94999940317365" y="198" />
        <omgdi:waypoint x="419.99999999993753" y="198" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-E75E538C-FA35-46B3-9364-0F4D809805D9" bpmnElement="sid-E75E538C-FA35-46B3-9364-0F4D809805D9" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="519.95" y="198" />
        <omgdi:waypoint x="600" y="198" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-56B84279-99F4-4908-A66E-994432535609" bpmnElement="sid-56B84279-99F4-4908-A66E-994432535609" flowable:sourceDockerX="99.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.00000000000004" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="411.8457203816681" y="665.7072085334403" />
        <omgdi:waypoint x="482.3159732445269" y="665.7072085334403" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-E2096C64-9CFD-4808-B523-FD643724EB57" bpmnElement="sid-E2096C64-9CFD-4808-B523-FD643724EB57" flowable:sourceDockerX="50.00000000000004" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="582.265973244527" y="665.7072085334403" />
        <omgdi:waypoint x="651.7783422223337" y="665.7072085334403" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-16D7EBE0-38DB-4649-908A-E06ED0D54278" bpmnElement="sid-16D7EBE0-38DB-4649-908A-E06ED0D54278" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="14.0" flowable:targetDockerY="14.0">
        <omgdi:waypoint x="751.7283422222673" y="665.7072085334403" />
        <omgdi:waypoint x="807.1765883082277" y="665.7072085334403" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-8E1156A8-AFCA-4EFF-9C48-2F5940761E3D" bpmnElement="sid-8E1156A8-AFCA-4EFF-9C48-2F5940761E3D" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="1.0">
        <omgdi:waypoint x="650" y="158" />
        <omgdi:waypoint x="650" y="111.21074815033106" />
        <omgdi:waypoint x="470" y="111.21074815033106" />
        <omgdi:waypoint x="470" y="158" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-7A13C636-0AD1-4782-82C0-4154E76A1E6B" bpmnElement="sid-7A13C636-0AD1-4782-82C0-4154E76A1E6B" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="699.9499999999999" y="198" />
        <omgdi:waypoint x="780" y="198" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-27798DF8-AB59-4845-B2BE-8AC2EBBBA126" bpmnElement="sid-27798DF8-AB59-4845-B2BE-8AC2EBBBA126" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="268.3170222715074" flowable:targetDockerY="94.61005388891562">
        <omgdi:waypoint x="830" y="237.95000000000002" />
        <omgdi:waypoint x="830" y="288.369804457106" />
        <omgdi:waypoint x="573.5361543449478" y="288.369804457106" />
        <omgdi:waypoint x="573.5361543449478" y="338.739608914212" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-445B3D54-9F64-433B-9914-4B4C030D9C19" bpmnElement="sid-445B3D54-9F64-433B-9914-4B4C030D9C19" flowable:sourceDockerX="268.3170222715074" flowable:sourceDockerY="94.61005388891562" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="573.5361543449478" y="527.9097166920433" />
        <omgdi:waypoint x="573.5361543449478" y="577.5571122546029" />
        <omgdi:waypoint x="361.89572038166807" y="577.5571122546029" />
        <omgdi:waypoint x="361.89572038166807" y="625.7072085334403" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
  <bpmndi:BPMNDiagram>
    <bpmndi:BPMNPlane bpmnElement="sid-C8BBB257-22FA-464F-801A-18D0283CC9D7">
      <bpmndi:BPMNShape id="BPMNShape_sid-2E65618A-34AF-4366-9BBD-CABB71F66CED" bpmnElement="sid-2E65618A-34AF-4366-9BBD-CABB71F66CED">
        <omgdc:Bounds x="180" y="185" width="30" height="30" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-2266A0DE-A8B7-49CD-B826-F7721950E6E6" bpmnElement="sid-2266A0DE-A8B7-49CD-B826-F7721950E6E6">
        <omgdc:Bounds x="276.75" y="160" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-2BFA2798-5F3D-4FAB-B443-521677653364" bpmnElement="sid-2BFA2798-5F3D-4FAB-B443-521677653364">
        <omgdc:Bounds x="441.75" y="160" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_sid-AD7F9F9D-08EC-4763-A001-C21D5FB1B4D0" bpmnElement="sid-AD7F9F9D-08EC-4763-A001-C21D5FB1B4D0">
        <omgdc:Bounds x="606.75" y="186" width="28" height="28" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-A76991C5-A3AC-4E0F-AB47-0AD42F509A18" bpmnElement="sid-A76991C5-A3AC-4E0F-AB47-0AD42F509A18" flowable:sourceDockerX="15.0" flowable:sourceDockerY="15.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="209.9499989472149" y="200" />
        <omgdi:waypoint x="276.75" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-DB47729E-80F9-4736-8887-D01727901795" bpmnElement="sid-DB47729E-80F9-4736-8887-D01727901795" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="376.70000000000005" y="200" />
        <omgdi:waypoint x="441.74999999998465" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-5ABB1358-698E-4F3A-86BB-2DF354D52747" bpmnElement="sid-5ABB1358-698E-4F3A-86BB-2DF354D52747" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="1.0">
        <omgdi:waypoint x="491.75" y="160" />
        <omgdi:waypoint x="491.75" y="119.757949679538" />
        <omgdi:waypoint x="326.75" y="119.757949679538" />
        <omgdi:waypoint x="326.75" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sid-A09535EC-8905-40BB-AB00-DEB046D4CAF1" bpmnElement="sid-A09535EC-8905-40BB-AB00-DEB046D4CAF1" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="14.0" flowable:targetDockerY="14.0">
        <omgdi:waypoint x="541.699999999939" y="200" />
        <omgdi:waypoint x="606.75" y="200" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

多实例

工作流-flowable 核心表ACT_RU_EXECUTION 详解
每个多实例的 EXECUTION_id是相同的

  • 29
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值