Hi,
I followed your guide on github to customize the tool adding elements and parameters.
Everything works fine, I run it with npm as explained and it looks good.
The problem is when I want to export the XML: I added this in the app.js file:
async function exportDiagram() {
try {
var result = await bpmnModeler.saveXML({ format: true });
alert('Diagram exported. Check the developer tools!');
console.log('DIAGRAM', result.xml);
} catch (err) {
console.error('could not save BPMN 2.0 diagram', err);
}
}
exportButton.addEventListener('click', (event) => {
console.log(bpmnModeler);
exportDiagram();
});
but when I click on the exportButton I get this error:
app.js:50 could not save BPMN 2.0 diagram TypeError: done is not a function
at Viewer.js:370
What am I missing? Thank you very much if you can help!