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
Because of these changes bpmn-js interoperates better with BPMN diagrams created by other tools and catches more XML validation errors. It does now pass the BPMN MIWG test suite again, too.
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>
The new library behavior is to detect this miss-match and fail with an import error. If you're working with these kinds of broken diagrams, this change may require one time adjustments to fix things.
New XML Parser
With this release we're switching to saxen for XML parsing. It is a XML only parser that replaces the general purpose library sax-js for low level XML processing.
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.
As always, get the latest bpmn-js release via npm or bower.
Join Camunda and build modeling tools people .