Does BPMN Editor generate invalid UniqueId? (id attribute in XML file) [message #1855017] |
Fri, 23 September 2022 14:32  |
Eclipse User |
|
|
|
When creating a BPMN Model, the editor generates for each element the UniqueId in the model. UniqueId becomes the id attribute in the corresponding XML file.
When loading such a file into KIE JBPM, the XML parser throws an error, because some id attributes are no valid NCName fields.
(Parser in my case is com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.class of Zulu JDK 17 jrt-fs.jar.)
This is treated an error, because a NCName must start with an letter as first character, not a digit. So, if I search&replace all such occurances, everything is fine.
Example from BPMN-XML file
<scriptTask id="1aa064d1-a6e2-4dae-823e-eb6ac8c966bd" name="Script" scriptFormat="some URL here" >
<script>System.out.println("Hello World!");</script>
</scriptTask>
When I add a prefix liek "id-" to the invalid id "1aa064d1-a6...." the problem is gone.
What's wrong with Eclipse BPMN Editor, or is Red Hat JBPM the problem because it validates against different XSD?
|
|
|
Re: Does BPMN Editor generate invalid UniqueId? (id attribute in XML file) [message #1855025 is a reply to message #1855017] |
Sat, 24 September 2022 07:00   |
Eclipse User |
|
|
|
Hi,
this is an interesting observation. I double checked this in the BPMN Specification (chapter 8.2.1). The ID attribute is defined as String and is not restricted to a specific number/char format.
So it may always happen if you exchange BPMN files between different editors the ID can start with a letter or a number.
This seems to be an issue in the JBPM implementation. Can you rise this as an issue to the JBPM Team? JBPM is using Eclipse BPMN too.
===
Ralph
|
|
|
|
Powered by
FUDForum. Page generated in 0.03162 seconds