When I use the convertToXML method of BpmnXMLConverter to convert BpmnModel into an XML file, if the ServiceTask defines setCustoms Properties, the converted XML file has problems
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu với ServiceTaskXMLConverter.writeCustomProperties, được gọi trong quá trình BpmnXMLConverter.convertToXML, và tái hiện vấn đề bằng đoạn mã Java trong báo cáo trên Flowable 6.8.1. Kiểm tra XML được tạo khi một ServiceTask có một CustomProperty; hoàn tất khi các phần tử mở rộng vẫn nằm bên trong serviceTask và sequenceFlow, endEvent cùng sơ đồ BPMN tiếp theo được xuất ở cấp quy trình chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
BpmnModel:
i got this wrong xml:
<?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/test">
<process id="processid" name="process" isExecutable="true">
<startEvent id="start" name="开始" flowable:formKey="11111"></startEvent>
<sequenceFlow sourceRef="start" targetRef="serviceTask"></sequenceFlow>
<serviceTask id="serviceTask">
<extensionElements>
<flowable:field name="flowable:test">
<flowable:string>testSimpleValue</flowable:string>
</flowable:field>
</extensionElements>
<sequenceFlow sourceRef="serviceTask" targetRef="end"></sequenceFlow>
<endEvent id="end" name="结束"></endEvent>
</serviceTask>
<bpmndi:BPMNDiagram id="BPMNDiagram_processid">
<bpmndi:BPMNPlane bpmnElement="processid" id="BPMNPlane_processid"></bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</process></definitions>
when i add another xtw.writeEndElement() in writeCustomProperties function ,ServiceTaskXMLConverter class,org.flowable.bpmn.converter package
I got xml that looks correct
<?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/test">
<process id="processid" name="process" isExecutable="true">
<startEvent id="start" name="开始" flowable:formKey="11111"></startEvent>
<sequenceFlow sourceRef="start" targetRef="serviceTask"></sequenceFlow>
<serviceTask id="serviceTask">
<extensionElements>
<flowable:field name="flowable:test">
<flowable:string>testSimpleValue</flowable:string>
</flowable:field>
</extensionElements>
</serviceTask>
<sequenceFlow sourceRef="serviceTask" targetRef="end"></sequenceFlow>
<endEvent id="end" name="结束"></endEvent>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_processid">
<bpmndi:BPMNPlane bpmnElement="processid" id="BPMNPlane_processid"></bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
Expected behavior
A clear and concise description of what you expected to happen.
Code
@Test
void contextLoads() {
BpmnModel bpmnModel=new BpmnModel();
ServiceTask serviceTask=new ServiceTask();
ArrayList<CustomProperty> customProperties = new ArrayList<>();
CustomProperty customPropertyRole = new CustomProperty();
customPropertyRole.setName("flowable:test");
customPropertyRole.setSimpleValue("testSimpleValue");
customProperties.add(customPropertyRole);
serviceTask.setCustomProperties(customProperties);
serviceTask.setId("serviceTask");
Process process = new Process();
StartEvent startEvent = new StartEvent();
startEvent.setId("start");
startEvent.setName("开始");
startEvent.setFormKey("11111");
process.addFlowElement(startEvent);
SequenceFlow sequenceFlow = new SequenceFlow();
sequenceFlow.setSourceRef("start");
sequenceFlow.setTargetRef("serviceTask");
process.addFlowElement(sequenceFlow);
process.addFlowElement(serviceTask);
EndEvent endEvent = new EndEvent();
endEvent.setId("end");
endEvent.setName("结束");
SequenceFlow sequenceFlow2 = new SequenceFlow();
sequenceFlow2.setSourceRef("serviceTask");
sequenceFlow2.setTargetRef("end");
process.addFlowElement(sequenceFlow2);
process.addFlowElement(endEvent);
process.setName("process");
process.setId("processid");
bpmnModel.addProcess(process);
BpmnXMLConverter xmlConverter = new BpmnXMLConverter();
String writer = StrUtil.utf8Str(xmlConverter.convertToXML(bpmnModel));
System.out.println(writer);
}
Additional context
Add the version of Flowable that you are using, the database vendor and if you are using Flowable within Spring Boot, the Flowable Task application etc.
flowable:6.8.1
database:mysql-8.0
- Ngôn ngữ chính
- Java
- Star
- 9.6k
- Fork
- 2.9k
- Merge trung bình
- 1 giờ 9 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flowable/flowable-engine
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
flowable/flowable-engine#4268 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
flowable/flowable-engine#4293 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
flowable/flowable-engine#4292 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
flowable/flowable-engine#4291 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
flowable/flowable-engine#4290 ·
Tất cả issue của flowable/flowable-engine
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
apache/arrow-java#1311 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
IBM/networking-java-sdk#204 ·
-
bug Technical Debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
avniproject/avni-server#1080 ·