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
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia con ServiceTaskXMLConverter.writeCustomProperties, chiamato durante BpmnXMLConverter.convertToXML, e riproduci il problema con lo snippet Java riportato nella segnalazione su Flowable 6.8.1. Controlla l’XML generato quando una ServiceTask ha una CustomProperty; il lavoro è completato quando gli elementi di estensione rimangono all’interno della serviceTask e il sequenceFlow, l’endEvent e il diagramma BPMN seguenti vengono emessi al livello di processo corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Java
- Stelle
- 9.5k
- Fork
- 2.9k
- Merge medio
- 1h 9m
- PR unite (30g)
- 2
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di flowable/flowable-engine
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
flowable/flowable-engine#4268 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
flowable/flowable-engine#4280 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
flowable/flowable-engine#4279 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
flowable/flowable-engine#4272 · 1 commento ·
-
Item reference is invalid - when relying on target namespace, or when using explicit namespaceAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
flowable/flowable-engine#4269 · 1 commento ·
Tutte le issue di flowable/flowable-engine
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
refinedmods/refinedstorage2#1414 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
In Java's `LongBoundedSum`, setting `lower` to `Long.MIN_VALUE` under-estimates the sensitivityAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
google/differential-privacy#489 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
link-check link-check:manual
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100