flowable / flowable/flowable-engine
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
- 主要言語
- Java
- スター
- 9.5k
- フォーク
- 2.9k
- 平均マージ
- 7時間 8分
- マージ済み PR(30日)
- 2
説明
**Describe the bug**
BpmnModel:

i got this wrong xml:
```
testSimpleValue
```
when i add another xtw.writeEndElement() in writeCustomProperties function ,ServiceTaskXMLConverter class,org.flowable.bpmn.converter package

I got xml that looks correct
```
testSimpleValue
```
**Expected behavior**
A clear and concise description of what you expected to happen.
**Code**
```java
@Test
void contextLoads() {
BpmnModel bpmnModel=new BpmnModel();
ServiceTask serviceTask=new ServiceTask();
ArrayList 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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start with ServiceTaskXMLConverter.writeCustomProperties, called during BpmnXMLConverter.convertToXML, and reproduce the issue with the Java snippet in the report on Flowable 6.8.1. Check the generated XML when a ServiceTask has a CustomProperty; done means the extension elements remain inside the serviceTask and the following sequenceFlow, endEvent, and BPMN diagram are emitted at the correct process level.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100