The new version of bpmn-js released today ships with fixes for a few long standing serialization and deserialization bugs. It improves the validation of incoming BPMN 2.0 XML documents and got smaller and slightly faster during import, too. Read on, if you love XML.
XML = Exchange
This release ships with a number of under-the-hood changes, improving how we handle BPMN 2.0 XML, the BPMN standard's exchange format:
FIX: De-conflict namespace prefixes during import and export (bpmn-io/moddle-xml#27)
FIX: Handle anonymous namespace elements (bpmn-io/moddle-xml#23)
FIX: Provide correct line numbers on XML parse errors
CHORE: Validate XML root element type (bpmn-io/moddle-xml#15)
CHORE: Speed up moddle element type lookups
CHORE: Always provide both, import error and warnings
FEAT: Use saxen for XML parsing
Strict Mode On
One of the bugs fixed (bpmn-io/moddle-xml#27) prevented the validation of namespace URIs when importing BPMN documents. As a result the following diagram opened nicely, despite not being valid BPMN 2.0 XML:
<bpmn:definitions xmlns:bpmn="http://not-bpmn" xmlns:camunda="http://not-camunda"> ... </bpmn>
New XML Parser
The new parser is half the size of the old one. Using it decreases the bundled size of our BPMN viewer distribution by 10%. At the same time it processes XML twice as fast. This, however does not translate into a huge percieved speed up in BPMN diagram opening. The reason is that XML parsing is only one of the many things bpmn-js does to display BPMN diagrams.
Do you miss an important feature within our BPMN toolkit? Approach us on our forums, tell us what you think and help us shape our roadmap.