UNPKG

ilead-ibpmp-design-new

Version:

基于 `vue` 和 `bpmn.io@7.0` ,实现 flowable 的 modeler 模型设计器

32 lines (30 loc) 1.67 kB
import { randomStr } from '../common/util' export default function() { const startId = randomStr().slice(-7) const endId = randomStr().slice(-7) const processId = randomStr() return `<?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:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" targetNamespace="http://www.flowable.org/processdef"> <process id="process_${processId}" name="name_${randomStr()}"> <startEvent id="Event_${startId}" name="开始活动" /> <endEvent id="Event_${endId}" name="结束活动" /> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_flow"> <bpmndi:BPMNPlane id="BPMNPlane_flow" bpmnElement="process_${processId}"> <bpmndi:BPMNShape id="Event${startId}" bpmnElement="Event_${startId}"> <omgdc:Bounds x="-1688" y="-848" width="36" height="36" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="-1693" y="-805" width="47" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Event${endId}" bpmnElement="Event_${endId}"> <omgdc:Bounds x="-1688" y="-548" width="36" height="36" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="-1693" y="-505" width="47" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> ` }