绘制的流程图
使用错误检测功能
没有检测到错误
下载后重名vacation.bpmn201.xml部署。
/** * 流程部署 */ @Test public void testDeploy() { //1.获取ProcessEngine对象 ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); //2、获取RepositoryService RepositoryService repositoryService = processEngine.getRepositoryService(); //3.完成流程部署操作 Deployment deployed = repositoryService.createDeployment() .addClasspathResource("vacation.bpmn201.xml") .name("FlowableUI请假流程0818") .deploy(); System.out.println("deployed.getId()=" + deployed.getId()); System.out.println("deployed.getName()=" + deployed.getName()); }
<?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:xsd="http://www.w3.org/2001/XMLSchema" 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" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef" exporter="Flowable Open Source Modeler" exporterVersion="6.8.0"> <process id="holiday-new" name="请假模型事件版" isExecutable="true"> <startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent> <userTask id="sid-8BBD1FEB-691B-41E0-B011-2E29CDBBA07B" name="创建请假流程" flowable:formFieldValidation="true"> <extensionElements> <flowable:taskListener event="create" class="org.flowable.listener.MyTaskListener"></flowable:taskListener> </extensionElements> </userTask> <sequenceFlow id="sid-09B8D43C-7CE7-4BAB-8F63-FF3F77936114" sourceRef="startEvent1" targetRef="sid-8BBD1FEB-691B-41E0-B011-2E29CDBBA07B"></sequenceFlow> <userTask id="sid-108FB04B-B0F9-4A2D-BD34-6107F5AA70DC" name="审批请假流程" flowable:formFieldValidation="true"> <extensionElements> <flowable:taskListener event="create" class="org.flowable.listener.MyTaskListener"></flowable:taskListener> </extensionElements> </userTask> <sequenceFlow id="sid-133F1A76-16FD-4516-920B-4EF24B49C185" sourceRef="sid-8BBD1FEB-691B-41E0-B011-2E29CDBBA07B" targetRef="sid-108FB04B-B0F9-4A2D-BD34-6107F5AA70DC"></sequenceFlow> <endEvent id="sid-F7AE5FDF-7E73-4032-BEB4-481970B6B082"></endEvent> <sequenceFlow id="sid-D9FCDF47-14C6-4CC1-BB74-17C3B7FA25B7" sourceRef="sid-108FB04B-B0F9-4A2D-BD34-6107F5AA70DC" targetRef="sid-F7AE5FDF-7E73-4032-BEB4-481970B6B082"></sequenceFlow> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_holiday-new"> <bpmndi:BPMNPlane bpmnElement="holiday-new" id="BPMNPlane_holiday-new"> <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1"> <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="160.75"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="sid-8BBD1FEB-691B-41E0-B011-2E29CDBBA07B" id="BPMNShape_sid-8BBD1FEB-691B-41E0-B011-2E29CDBBA07B"> <omgdc:Bounds height="80.0" width="100.0" x="165.0" y="135.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="sid-108FB04B-B0F9-4A2D-BD34-6107F5AA70DC" id="BPMNShape_sid-108FB04B-B0F9-4A2D-BD34-6107F5AA70DC"> <omgdc:Bounds height="80.0" width="100.0" x="315.0" y="135.75"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="sid-F7AE5FDF-7E73-4032-BEB4-481970B6B082" id="BPMNShape_sid-F7AE5FDF-7E73-4032-BEB4-481970B6B082"> <omgdc:Bounds height="28.0" width="28.0" x="465.0" y="161.75"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="sid-D9FCDF47-14C6-4CC1-BB74-17C3B7FA25B7" id="BPMNEdge_sid-D9FCDF47-14C6-4CC1-BB74-17C3B7FA25B7" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="14.0" flowable:targetDockerY="14.0"> <omgdi:waypoint x="414.94999999999595" y="175.75"></omgdi:waypoint> <omgdi:waypoint x="465.0" y="175.75"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="sid-133F1A76-16FD-4516-920B-4EF24B49C185" id="BPMNEdge_sid-133F1A76-16FD-4516-920B-4EF24B49C185" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0"> <omgdi:waypoint x="264.95000000000005" y="175.24975"></omgdi:waypoint> <omgdi:waypoint x="315.0" y="175.5"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="sid-09B8D43C-7CE7-4BAB-8F63-FF3F77936114" id="BPMNEdge_sid-09B8D43C-7CE7-4BAB-8F63-FF3F77936114" flowable:sourceDockerX="15.0" flowable:sourceDockerY="15.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0"> <omgdi:waypoint x="129.94958832531287" y="175.63750309788617"></omgdi:waypoint> <omgdi:waypoint x="164.99999999999406" y="175.374625"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>
原因:我给定义文件重命名为了vacation.bpmn201.xml,后来改为这样就可以了vacation1.bpmn20.xml。
日志红色框选位置,修改正常后才有的日志。
后缀必须是.bpmn20.xml,否则部署会有错误。
后缀必须是.bpmn20.xml,否则部署会有错误。
后缀必须是.bpmn20.xml,否则部署会有错误。