BPMN XML 文件的头部添加 Flowable 命名空间声明
<?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"
targetNamespace="http://yourcompany.com/bpmn"
expressionLanguage="http://www.w3.org/1999/XPath"
typeLanguage="http://www.w3.org/2001/XMLSchema">
<!-- ... -->
</definitions>
引入自定义json文件
import flowableModdle from '@/utils/flowable.json'
this.bpmnModeler = new BpmnModeler({
container: canvas,
moddleExtensions: {
flowable: flowableModdle
},
})