Vue+LogicFlow+Flowable 前端+后端实现工作流
admin 阅读: 2024-03-28
后台-插件-广告管理-内容页头部广告(手机) |
一、实现效果
前端使用LogicFlow框架绘制流程图,可以导出为xml工作流标准格式数据,通过xml文件传递到后端进行Flowable流程注册,并保存到数据库中。
二、BPM传输文件格式(.xml)
如需添加承办人的话,需要在LogicFlow导出文件的基础上手动添加xmlns:flowable="http://flowable.org/bpmn"flowable插件,不然后台无法识别flowable:candidateUsers。
<bpmn:definitions xmlns:flowable="http://flowable.org/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_5588fe5_6" targetNamespace="http://logic-flow.org" exporter="logicflow" exporterVersion="1.2.0"> <bpmn:process isExecutable="true" id="Process_2a9c067_6"> <bpmn:startEvent id="Event_14efe0e" name="开始节点" flowable:candidateUsers="admin,admin1,admin2"> <bpmn:outgoing>Flow_a3e7d0c</bpmn:outgoing> </bpmn:startEvent> <bpmn:userTask id="Activity_602107f" name="普通节点" flowable:candidateUsers="uesr,uesr1,uesr2"> <bpmn:incoming>Flow_a3e7d0c</bpmn:incoming> <bpmn:outgoing>Flow_3f9a386</bpmn:outgoing> </bpmn:userTask> <bpmn:endEvent id="Event_49a11b4" name="结束节点"> <bpmn:incoming>Flow_3f9a386</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="Flow_a3e7d0c" sourceRef="Event_14efe0e" targetRef="Activity_602107f"/> <bpmn:sequenceFlow id="Flow_3f9a386" sourceRef="Activity_602107f" targetRef="Event_49a11b4"/> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_2a9c067"> <bpmndi:BPMNEdge id="Flow_a3e7d0c_di" bpmnElement="Flow_a3e7d0c"> <di:waypoint x="343" y="164"/> <di:waypoint x="448" y="164"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_3f9a386_di" bpmnElement="Flow_3f9a386"> <di:waypoint x="548" y="164"/> <di:waypoint x="665" y="164"/> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="Event_14efe0e_di" bpmnElement="Event_14efe0e"> <dc:Bounds x="305" y="144" width="40" height="40"/> <bpmndi:BPMNLabel> <dc:Bounds x="305" y="197" width="40" height="14"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_602107f_di" bpmnElement="Activity_602107f"> <dc:Bounds x="448" y="124" width="100" height="80"/> <bpmndi:BPMNLabel> <dc:Bounds x="478" y="157" width="40" height="14"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Event_49a11b4_di" bpmnElement="Event_49a11b4"> <dc:Bounds x="663" y="144" width="40" height="40"/> <bpmndi:BPMNLabel> <dc:Bounds x="663" y="197" width="40" height="14"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions>- 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
- 46
三、前端框架(LogicFlow)
- LogicFlow.vue
- 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
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
声明
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。
在线投稿:投稿 站长QQ:1888636
后台-插件-广告管理-内容页尾部广告(手机) |