89c366be
gexinzhineng/gxzn27
嵌入bpmn设计流程模块
|
1
|
export default (key, name, type) => {
|
1bb66e67
xingyuv
feat: code format
|
2
|
if (!type) type = 'camunda'
|
89c366be
gexinzhineng/gxzn27
嵌入bpmn设计流程模块
|
3
|
const TYPE_TARGET = {
|
1bb66e67
xingyuv
feat: code format
|
4
5
6
7
|
activiti: 'http://activiti.org/bpmn',
camunda: 'http://bpmn.io/schema/bpmn',
flowable: 'http://flowable.org/bpmn'
}
|
89c366be
gexinzhineng/gxzn27
嵌入bpmn设计流程模块
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
return `<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn2="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="diagram_${key}"
targetNamespace="${TYPE_TARGET[type]}">
<bpmn2:process id="${key}" name="${name}" isExecutable="true">
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${key}">
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
|
1bb66e67
xingyuv
feat: code format
|
23
24
|
</bpmn2:definitions>`
}
|